diff --git a/.changeset/000_merge_upstream.md b/.changeset/000_merge_upstream.md deleted file mode 100644 index d04b7f25..00000000 --- a/.changeset/000_merge_upstream.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -sable: minor ---- - -Merge Voice Call updates from upstream. diff --git a/.changeset/221.md b/.changeset/221.md deleted file mode 100644 index eb3b1007..00000000 --- a/.changeset/221.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -sable: minor ---- - -Allow for replying to state events. diff --git a/.changeset/add_setting_to_enable_picture_in_picture_in_element_call.md b/.changeset/add_setting_to_enable_picture_in_picture_in_element_call.md deleted file mode 100644 index fd212c46..00000000 --- a/.changeset/add_setting_to_enable_picture_in_picture_in_element_call.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -sable: minor ---- - -Add setting to enable picture-in-picture in element-call diff --git a/.changeset/add_support_for_audio_and_video_previews_in_url_previews_and_reuse_attachment_components.md b/.changeset/add_support_for_audio_and_video_previews_in_url_previews_and_reuse_attachment_components.md deleted file mode 100644 index f176d8de..00000000 --- a/.changeset/add_support_for_audio_and_video_previews_in_url_previews_and_reuse_attachment_components.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -sable: minor ---- - -Add support for audio and video in URL previews if homeserver provides it. diff --git a/.changeset/change_indexdb_warning.md b/.changeset/change_indexdb_warning.md deleted file mode 100644 index 68cebe4d..00000000 --- a/.changeset/change_indexdb_warning.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -sable: patch ---- - -change indexdb warning phrasing to include low disk space as possible reason diff --git a/.changeset/element-call-dm-video-calls.md b/.changeset/element-call-dm-video-calls.md deleted file mode 100644 index 99841dc1..00000000 --- a/.changeset/element-call-dm-video-calls.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -sable: patch ---- - -Fix Element Call video/audio calls in DM and non-voice rooms: after joining through the lobby, the in-call grid now displays correctly instead of showing only the control bar. diff --git a/.changeset/emoji_autocomplete_setting.md b/.changeset/emoji_autocomplete_setting.md deleted file mode 100644 index 4fb710e7..00000000 --- a/.changeset/emoji_autocomplete_setting.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -sable: minor ---- - -Added a new setting "Emoji Selector Character Threshold" to set the number of characters to type before the suggestions pop up. diff --git a/.changeset/fix_autocorrectspellcheck_issue_on_login_page.md b/.changeset/fix_autocorrectspellcheck_issue_on_login_page.md deleted file mode 100644 index 9852f7cf..00000000 --- a/.changeset/fix_autocorrectspellcheck_issue_on_login_page.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -sable: patch ---- - -Disable autocorrect and spellcheck on the login page. diff --git a/.changeset/keyboard-navigation-aria-accessibility.md b/.changeset/keyboard-navigation-aria-accessibility.md deleted file mode 100644 index 94845a64..00000000 --- a/.changeset/keyboard-navigation-aria-accessibility.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -sable: minor ---- - -Add keyboard navigation shortcuts for unread rooms (Alt+N, Alt+Shift+Up/Down), ARIA form label associations for screen reader accessibility, and a keyboard shortcuts settings page. diff --git a/.changeset/member_avatar_room_scope.md b/.changeset/member_avatar_room_scope.md deleted file mode 100644 index 7d419fd8..00000000 --- a/.changeset/member_avatar_room_scope.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -sable: patch ---- - -Timeline message avatars now use the room-specific avatar and display name instead of the user's global profile, when set via `/myroomavatar` or `/myroomnick`. diff --git a/.changeset/notification_banner_dm_default.md b/.changeset/notification_banner_dm_default.md deleted file mode 100644 index e9355419..00000000 --- a/.changeset/notification_banner_dm_default.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -sable: patch ---- - -In-app notification banners now appear for DMs by default; desktop banner setting defaults to off; fixed space room navigation from banner tap. diff --git a/.changeset/pr207-myroomnick-unset.md b/.changeset/pr207-myroomnick-unset.md deleted file mode 100644 index 76252010..00000000 --- a/.changeset/pr207-myroomnick-unset.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -sable: patch ---- - -Executing /myroomnick or /myroomavatar without a new nickname/avatar now removes the nickname/avatar. diff --git a/.changeset/split_typing_and_read.md b/.changeset/split_typing_and_read.md deleted file mode 100644 index bd1aed0c..00000000 --- a/.changeset/split_typing_and_read.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -sable: patch ---- - -Split typing and read status settings, allowing toggling off one and not the other. diff --git a/.changeset/y_always_underline_links.md b/.changeset/y_always_underline_links.md deleted file mode 100644 index 793daf3e..00000000 --- a/.changeset/y_always_underline_links.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -sable: minor ---- - -Added setting to always underline links. diff --git a/.changeset/y_autoplay.md b/.changeset/y_autoplay.md deleted file mode 100644 index 7d24ecbe..00000000 --- a/.changeset/y_autoplay.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -sable: minor ---- - -Added settings for disabling autoplay of gifs (& banners), stickers, and emojis. diff --git a/.changeset/y_reduced_motion_option.md b/.changeset/y_reduced_motion_option.md deleted file mode 100644 index 4cec37f5..00000000 --- a/.changeset/y_reduced_motion_option.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -sable: minor ---- - -Added reduced motion setting. Let us know if any elements were missed! diff --git a/.changeset/y_saturation_slider.md b/.changeset/y_saturation_slider.md deleted file mode 100644 index 77fbb35b..00000000 --- a/.changeset/y_saturation_slider.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -sable: minor ---- - -Replaced the monochrome mode with a saturation slider for more control. diff --git a/.changeset/z_cat_settings.md b/.changeset/z_cat_settings.md deleted file mode 100644 index 686fc480..00000000 --- a/.changeset/z_cat_settings.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -sable: minor ---- - -Added settings to Account that let you set if you are a cat or have cats, or not display other peoples cat status. diff --git a/CHANGELOG.md b/CHANGELOG.md index 54ee1933..d30fe089 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,51 @@ # Sable Client Changelog +## 1.5.2 (2026-03-08) + +### Fixes + +* Add `/hug`, `/cuddle`, `/wave`, `/headpat`, and `/poke` slash commands. +* Swap Caddy port to 8080 + fixes for MDAD setups. +* Adjust media sizing and URL preview layout +* Fix picture in picture setting not effecting element-call +* Fixed an issue where the app would fail to load after completing SSO login (e.g., logging in with matrix.org). Users are now correctly redirected to the app after SSO authentication completes. + +## 1.5.1 (2026-03-08) + +### Fixes + +* Fix recent emojis ignoring letter threshold. +* Disable in-app banners on desktop. + +## 1.5.0 (2026-03-08) + +### Features + +* Merge Voice Call updates from upstream. +* Allow for replying to state events. +* Add message forwarding with metadata +* Add setting to enable picture-in-picture in element-call +* Add support for audio and video in URL previews if homeserver provides it. +* Added a new setting "Emoji Selector Character Threshold" to set the number of characters to type before the suggestions pop up. +* Add keyboard navigation shortcuts for unread rooms (Alt+N, Alt+Shift+Up/Down), ARIA form label associations for screen reader accessibility, and a keyboard shortcuts settings page. +* Added setting to always underline links. +* Added settings for disabling autoplay of gifs (& banners), stickers, and emojis. +* Added reduced motion setting. Let us know if any elements were missed! +* Replaced the monochrome mode with a saturation slider for more control. +* Added settings to Account that let you set if you are a cat or have cats, or not display other peoples cat status. + +### Fixes + +* change indexdb warning phrasing to include low disk space as possible reason +* Fix Element Call video/audio calls in DM and non-voice rooms: after joining through the lobby, the in-call grid now displays correctly instead of showing only the control bar. +* Disable autocorrect and spellcheck on the login page. +* Fix Tuwunel quotes often breaking timezones +* Improved the UI of file descriptions +* Timeline message avatars now use the room-specific avatar and display name instead of the user's global profile, when set via `/myroomavatar` or `/myroomnick`. +* In-app notification banners now appear for DMs by default; desktop banner setting defaults to off; fixed space room navigation from banner tap. +* Executing /myroomnick or /myroomavatar without a new nickname/avatar now removes the nickname/avatar. +* Split typing and read status settings, allowing toggling off one and not the other. + ## 1.4.0 (2026-03-06) ### Features diff --git a/Caddyfile b/Caddyfile new file mode 100644 index 00000000..d807e8c2 --- /dev/null +++ b/Caddyfile @@ -0,0 +1,18 @@ +{ + servers { + protocols h1 h2c + } +} + +:8080 { + root * /app + + # Enable on-the-fly compression for things not pre-compressed + encode zstd gzip + + file_server { + precompressed br + } + + try_files {path} /index.html +} diff --git a/Dockerfile b/Dockerfile index aebd72f1..a0b76dfd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,10 +19,13 @@ FROM scratch AS site-dist COPY --from=builder /src/dist / ## App -FROM nginx:1.29.5-alpine +FROM caddy:2-alpine + +# Strip the file capability set by the base image (cap_net_bind_service=+ep). +# With --cap-drop=ALL the bounding set is empty, and the kernel refuses to exec +# any binary that has file capabilities not present in the bounding set — even +# if those capabilities aren't actually needed at runtime (we listen on :8080). +RUN setcap -r /usr/bin/caddy COPY --from=site-dist / /app -COPY docker-nginx.conf /etc/nginx/conf.d/default.conf - -RUN rm -rf /usr/share/nginx/html \ - && ln -s /app /usr/share/nginx/html +COPY Caddyfile /etc/caddy/Caddyfile diff --git a/docker-nginx.conf b/docker-nginx.conf deleted file mode 100644 index aea395ae..00000000 --- a/docker-nginx.conf +++ /dev/null @@ -1,21 +0,0 @@ -server { - listen 80; - listen [::]:80; - - location / { - root /usr/share/nginx/html; - - rewrite ^/config.json$ /config.json break; - rewrite ^/manifest.json$ /manifest.json break; - - rewrite ^/sw.js$ /sw.js break; - rewrite ^/pdf.worker.min.js$ /pdf.worker.min.js break; - - rewrite ^/public/(.*)$ /public/$1 break; - rewrite ^/assets/(.*)$ /assets/$1 break; - - rewrite ^/element-call/dist/(.*)$ /element-call/dist/$1 break; - - rewrite ^(.+)$ /index.html break; - } -} diff --git a/index.html b/index.html index 403a0618..21c34e6d 100644 --- a/index.html +++ b/index.html @@ -92,6 +92,6 @@
- + diff --git a/package-lock.json b/package-lock.json index a8d5b0a2..4a903025 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "sable", - "version": "1.4.0", + "version": "1.5.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "sable", - "version": "1.4.0", + "version": "1.5.2", "hasInstallScript": true, "license": "AGPL-3.0-only", "dependencies": { @@ -98,6 +98,7 @@ "prettier": "3.8.1", "typescript": "^5.9.3", "vite": "^7.3.1", + "vite-plugin-compression2": "2.5.0", "vite-plugin-pwa": "^1.2.0", "vite-plugin-static-copy": "^3.2.0", "vite-plugin-svgr": "4.5.0", @@ -14923,6 +14924,13 @@ "url": "https://opencollective.com/webpack" } }, + "node_modules/tar-mini": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/tar-mini/-/tar-mini-0.2.0.tgz", + "integrity": "sha512-+qfUHz700DWnRutdUsxRRVZ38G1Qr27OetwaMYTdg8hcPxf46U0S1Zf76dQMWRBmusOt2ZCK5kbIaiLkoGO7WQ==", + "dev": true, + "license": "MIT" + }, "node_modules/temp-dir": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", @@ -16035,6 +16043,17 @@ } } }, + "node_modules/vite-plugin-compression2": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/vite-plugin-compression2/-/vite-plugin-compression2-2.5.0.tgz", + "integrity": "sha512-bHxtBibPxxSn5eZSe0IAzvYucP/hg8Bz8ppjbH7lndU5kIHT+92qTkB4z9xWYfnyV0YHuir1SjOuyO0fzU4Vgg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^5.1.0", + "tar-mini": "^0.2.0" + } + }, "node_modules/vite-plugin-pwa": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/vite-plugin-pwa/-/vite-plugin-pwa-1.2.0.tgz", @@ -25820,6 +25839,12 @@ "integrity": "sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==", "dev": true }, + "tar-mini": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/tar-mini/-/tar-mini-0.2.0.tgz", + "integrity": "sha512-+qfUHz700DWnRutdUsxRRVZ38G1Qr27OetwaMYTdg8hcPxf46U0S1Zf76dQMWRBmusOt2ZCK5kbIaiLkoGO7WQ==", + "dev": true + }, "temp-dir": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", @@ -26369,6 +26394,16 @@ } } }, + "vite-plugin-compression2": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/vite-plugin-compression2/-/vite-plugin-compression2-2.5.0.tgz", + "integrity": "sha512-bHxtBibPxxSn5eZSe0IAzvYucP/hg8Bz8ppjbH7lndU5kIHT+92qTkB4z9xWYfnyV0YHuir1SjOuyO0fzU4Vgg==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^5.1.0", + "tar-mini": "^0.2.0" + } + }, "vite-plugin-pwa": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/vite-plugin-pwa/-/vite-plugin-pwa-1.2.0.tgz", diff --git a/package.json b/package.json index 70f2fa95..080f9e7a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sable", - "version": "1.4.0", + "version": "1.5.2", "description": "Yet another matrix client fork", "type": "module", "packageManager": "npm@11.11.0", @@ -114,6 +114,7 @@ "prettier": "3.8.1", "typescript": "^5.9.3", "vite": "^7.3.1", + "vite-plugin-compression2": "2.5.0", "vite-plugin-pwa": "^1.2.0", "vite-plugin-static-copy": "^3.2.0", "vite-plugin-svgr": "4.5.0", diff --git a/src/app/components/RenderMessageContent.tsx b/src/app/components/RenderMessageContent.tsx index 6811b116..3c2ded07 100644 --- a/src/app/components/RenderMessageContent.tsx +++ b/src/app/components/RenderMessageContent.tsx @@ -2,10 +2,10 @@ import { memo, useMemo, useCallback } from 'react'; import { MsgType } from '$types/matrix-sdk'; import { testMatrixTo } from '$plugins/matrix-to'; import { useSetting } from '$state/hooks/settings'; -import { settingsAtom } from '$state/settings'; +import { settingsAtom, CaptionPosition } from '$state/settings'; import { HTMLReactParserOptions } from 'html-react-parser'; import { Opts } from 'linkifyjs'; -import { config } from 'folds'; +import { Box, config } from 'folds'; import { AudioContent, DownloadFile, @@ -33,6 +33,7 @@ import { ImageViewer } from './image-viewer'; import { PdfViewer } from './Pdf-viewer'; import { TextViewer } from './text-viewer'; import { ClientSideHoverFreeze } from './ClientSideHoverFreeze'; +import { CuteEventType, MCuteEvent } from './message/MCuteEvent'; type RenderMessageContentProps = { displayName: string; @@ -74,6 +75,13 @@ function RenderMessageContentInternal({ const content = useMemo(() => getContent(), [getContent]); const [autoplayGifs] = useSetting(settingsAtom, 'autoplayGifs'); + const [captionPosition] = useSetting(settingsAtom, 'captionPosition'); + const captionPositionMap = { + [CaptionPosition.Above]: 'column-reverse', + [CaptionPosition.Below]: 'column', + [CaptionPosition.Inline]: 'row', + [CaptionPosition.Hidden]: 'row', + } satisfies Record; const renderBody = useCallback( (props: any) => ( @@ -112,54 +120,89 @@ function RenderMessageContentInternal({ ); const renderCaption = () => { + if (captionPosition === CaptionPosition.Hidden) return null; if (content.filename && content.filename !== content.body) { + if (captionPosition !== CaptionPosition.Inline) + return ( + + ); return ( - + + + ); } return null; }; const renderFile = () => ( - <> - ( - ( - +
+ ( + ( + } + /> + )} + renderAsTextFile={() => ( + } + /> + )} + > + } + info={info} /> - )} - renderAsTextFile={() => ( - } - /> - )} - > - - - )} - outlined={outlineAttachment} - /> + + )} + outlined={outlineAttachment} + /> +
{renderCaption()} - + ); if (msgType === MsgType.Text) { @@ -205,79 +248,100 @@ function RenderMessageContentInternal({ (typeof content.url === 'string' && content.url.toLowerCase().includes('gif')); return ( - <> - ( - { - if (isGif && !autoplayGifs && p.src) { - return ( - - - - ); - } - return ; - }} - renderViewer={(p) => } - /> - )} - outlined={outlineAttachment} - /> +
+
+ ( + { + if (isGif && !autoplayGifs && p.src) { + return ( + + + + ); + } + return ; + }} + renderViewer={(p) => } + /> + )} + outlined={outlineAttachment} + /> +
{renderCaption()} - +
); } if (msgType === MsgType.Video) { return ( - <> - ( - ( - ( - {body} - )} - /> - ) - : undefined - } - renderVideo={(p) =>