* fix: properly strip HTML tags and resolve entities in feed article summaries
Fixes#146
The parseTextFromHtml function was using document.textContent directly on
the parsed HTML document, which could leave raw HTML tags and unresolved
entities in feed article summaries.
Changes:
- Extract text from body element to avoid document wrapper artifacts
- Collapse multiple whitespace/newlines into single spaces for cleaner output
- Add early return for empty/whitespace-only input
- Use optional chaining for safer null handling
* fix: preserve single line breaks, only collapse 2+ consecutive whitespace
Address review feedback: the previous \s+ regex was too aggressive and
broke text-only summaries with legitimate line breaks.
Now:
- Collapse runs of 2+ non-newline whitespace into a single space
- Collapse 3+ consecutive newlines into double newline (paragraph break)
- Single line breaks are preserved
---------
Co-authored-by: User <user@example.com>
This implements a huge change, where Fresh is removed as a framework and serving files, allowing more control over importing, bundling, and serving files and components.
The biggest challenge was to continue making sure that there weren't too many places to look into for import versions, and `PasswordlessPasskeyLogin.tsx` became a prototype in migrating a component to fully SSR, no need for frontend parsing (via Babel) or bundling (via a custom-script, downloading frontend dependencies from esm.sh). Still, there are too many components to migrate like that, and it's all working, so I likely won't even attempt it unless there's some bug, new feature, or security vulnerability to address that warrants a rewrite of those.
This also updates all dependencies (except `@libs/xml` because that still causes some breaking in DAV endpoints), including Deno!
All other advantages can be seen in the related issues, and the breaking change this (v4.0.0) introduces is related simply to `config.email.tlsMode` (which had a deprecation warning throughout v3), and because, while I tested many things exhaustively, it's not impossible something broke that I didn't see.
Closes#141Closes#132
* Expose new `tlsMode` and `tlsVerify` options for connecting to the mail submission agent
* Make `tlsVerify` default to opportunistic StartTLS on ports other than 465 to prevent breaking change
---------
Co-authored-by: Bruno Bernardino <me@brunobernardino.com>
* Use OS default Sans-Serif font instead of Google Nunito Sans Font
* Link calendar event locations to OSM instead of Google Maps
Better would be to use https://www.mediawiki.org/wiki/GeoHack – which is used
by WikiPedia to show an interactive selector for the mapping service to use –,
but it requires geo coordinates. Some systems also support generic geo:-URIs,
but they require coodinates and outside Android support is pretty spotty
(Apple wants you to use Apple Maps links instead, desktop platforms generally
require installed third-party apps …). Android does support an extension (`?q=`)
(https://developer.android.com/guide/components/intents-common#Maps) to search
by address via geo:-links though.
Remove file share when deleting a file/directory (#121)
Keep a consistent logged-out-view of file shares (#123)
Simplify README, add FAQ with more info, including `.env`-based config (#90)
Closes#121Closes#123Closes#90
This allows not enabling Dashboard and Files. It also sorts the apps in the menu according to the order in the `config.core.enabledApps` array.
Since this will require a major version upgrade (`v3.0.0`), I also took the opportunity to upgrade PostgreSQL. You can [follow this guide on how to upgrade PostgreSQL on Docker containers](https://news.onbrn.com/step-by-step-guide-upgrading-postgresql-docker-containers/).
Finally, this has some minor security improvements (confirming API endpoints won't work if their app is disabled in the config).
Closes#114Closes#108
* Add directory download as zip feature
Implements the ability for users to download directories as zip files if enabled in config. Adds a new API route for directory zipping, updates UI components to show a download button for directories, and introduces related config and type changes. Also includes a new download icon.
* Windows path bugfix
* Include empty directories in zip archive
* Address feedback
- `isDirectoryDownloadsAllowed` -> `areDirectoryDownloadsAllowed`
- send `parentPath` & `name` to API instead of resolving `fullPath` on client
- call `ensureUserPathIsValidAndSecurelyAccessible` before zipping
- set config `allowDirectoryDownloads` default to `false`
- add `zip` to Dockerfile and replace in-house zip algorithm
- replace `download.svg` with heroicon's `arrow-down-tray`
- `replace` with glob -> `replaceAll` with string
* Cleanup apt-get command
* Remove unused zip archive and directory functions
This takes part of the work being done in #96 that was reverted but still useful.
Note Tailwind and Fresh weren't upgraded because there's no security vulnerability in either, and I have found the new versions to be worse in performance. Thos will likely stay at those fixed versions going forward.
This implements a basic CalDav UI, titled "Calendar". It allows creating new calendars and events with a start and end date, URL, location, and description.
You can also import and export ICS (VCALENDAR + VEVENT) files.
It allows editing the ICS directly, for power users.
Additionally, you can hide/display events from certain calendars, change their names and their colors. If there's no calendar created yet in your CalDav server (first-time setup), it'll automatically create one, titled "Calendar".
You can also change the display timezone for the calendar from the settings.
Finally, there's some minor documentation fixes and some other minor tweaks.
Closes#56Closes#89
This fixes a problem with the contacts app displaying an error on a clean install, due to the fact that `tsdav`'s address book listing didn't ask for a main address first, so Radicale wouldn't create the user directory.
It also upgrades `deno`'s version.
This implements a basic CardDav UI, titled "Contacts". It allows creating new contacts with a first name + last name, and editing their first and last names, main email, main phone, and notes.
You can also import and export VCF (VCARD) files.
It also allows editing the VCARD directly, for power users.
Additionally, you can choose, create, or delete address books, and if there's no address book created yet in your CardDav server (first-time setup), it'll automatically create one, titled "Contacts".
Finally, there are some dependency updates and a fix for the config not allowing disabling the `cardDav` or the `calDav` server.
Related to #56
* Add CardDav and CalDav servers
This implements the servers, but not the clients (yet). The implementation is essentially a proxy to Radicale (as a container in `docker-compose.yml`), with certain security assurances.
If you're upgrading, basically you'll need to create a new `data-radicale` directory, and everything else should just work.
This will also release v2.3.0 with those enabled by default. Tested with Thunderbird and Apple Calendar + Contacts.
To disable these, simply add the new config details and comment out or don't add the new `radicale` service from `docker-compose.yml`.
Related to #56
* Public File Sharing
This implements public file sharing (read-only) with and without passwords (#57).
It also fixes a problem with filenames including special characters like `#` not working properly (#71).
You can share a directory or a single file, by using the new share icon on the right of the directories/files, and click on it to manage an existing file share (setting a new password, or deleting the file share).
There is some other minor cleanup and other copy updates in the README.
Closes#57Fixes#71
* Hide UI elements when sharing isn't allowed
This adds Email as a multi-factor authentication method/option. It reuses the `VerificationCode` for the code generation and validation.
It also refactors the email templating for easier repurposing.
Finally, it has a small Deno version bump.
Closes#25
This means we now need to have the text and HTML content set in the code, which is arguably better.
In order to avoid allowing legacy Brevo API Key support, this will also introduce breaking changes and will be released as v2.0.0.
I took the opportunity to remove a few deprecated things (like legacy ENV-based config), upgrade PostgreSQL, and pin a specific version in `docker-compose.yml`, since I don't plan to do breaking releases anytime soon, and upgrading PostgreSQL should be fine from now on if the version is pinned.
If you were using Brevo with an API Key, they support SMTP as well, just update your config.
If you were using ENV-based config, check `bewcloud.config.sample.ts`to create your `bewcloud.config.ts`.
If you need help upgrading you PostgreSQL container, I've written a simple guide [step-by-step guide](https://news.onbrn.com/step-by-step-guide-upgrading-postgresql-docker-containers/).
This implements optional SSO via OIDC for logging in and signing up (for the first admin sign up or if sign up is allowed). The most requested feature!
Tested with Authentik and Google!
It includes a new `SimpleCache` interface (in-memory, using [`caches`](https://developer.mozilla.org/en-US/docs/Web/API/Window/caches)) for storing the state and code challenges.
Closes#13
* Add TOTP MFA Support
* Add Passkey MFA Support
It's not impossible I missed some minor cleanup, but most things make sense and there isn't a lot of obvious duplication anymore.
---------
Co-authored-by: Bruno Bernardino <me@brunobernardino.com>
* Implement a more robust Config
This moves the configuration variables from the `.env` file to a new `bewcloud.config.ts` file. Note that DB connection and secrets are still in the `.env` file.
This will allow for more reliable and easier personalized configurations, and was a requirement to start working on adding SSO (#13).
For now, `.env`-based config will still be allowed and respected (overriden by `bewcloud.config.ts`), but in the future I'll probably remove it (some major upgrade).
* Update deploy script to also copy the new config file
This refactors the data handlers into a more standard/understood model-like architecture, to prepare for a new, more robust config system.
It also fixes a problem with creating new Notes and uploading new Photos via the web interface (related to #58).
Finally, it speeds up docker builds by sending in less files, which aren't necessary or will be built anyway.
This is all in preparation to allow building #13 more robustly.
This implements the option to choose directories when uploading files via the Web UI (The most important part of #52).
When you choose a directory, its file and sub-directory structure will be maintained.
Tested with the latest Safari, Firefox, and Chrome.
Additionally, the Deno version was updated, which required some accessibility improvements as well.
If you're using a reverse proxy like Cloudflare Tunnels, you can now set `CONFIG_SKIP_COOKIE_DOMAIN_SECURITY="true"` to avoid login issues.
Also makes some UX tweaks to Expenses, and fixes a style issue for Chrome in Windows (#44).
Fixes#43Fixes#44
Additionally:
- Make expense and budget modal "reset" once closed, saved, or deleted.
- Make manifest icons dark
- Budgets in small screens should be full-screen
- Minor code cleanup
Fixes#48
A UI based on [Budget Zen](https://github.com/BrunoBernardino/budgetzen-web) but slightly updated and adjusted for bewCloud. It also features a chart with available money and spent by budgets.
This is useful for envelope-based budgeting.