From c5f2c3ac9e516d6ab79da0bcf4eb94b66433e4d7 Mon Sep 17 00:00:00 2001 From: tusooa Date: Wed, 25 Jun 2025 17:14:41 -0400 Subject: [PATCH 1/9] Improve action buttons behaviour in the menu --- changelog.d/action-button-extra-counter.add | 1 + changelog.d/bookmark-button-align.fix | 1 + src/components/popover/popover.scss | 11 +++++++---- .../status_action_buttons/action_button.scss | 16 ++++++++++++++++ .../status_action_buttons/action_button.vue | 2 +- 5 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 changelog.d/action-button-extra-counter.add create mode 100644 changelog.d/bookmark-button-align.fix diff --git a/changelog.d/action-button-extra-counter.add b/changelog.d/action-button-extra-counter.add new file mode 100644 index 000000000..7d5c77447 --- /dev/null +++ b/changelog.d/action-button-extra-counter.add @@ -0,0 +1 @@ +Display counter for status action buttons when they are on the menu diff --git a/changelog.d/bookmark-button-align.fix b/changelog.d/bookmark-button-align.fix new file mode 100644 index 000000000..64bc2c807 --- /dev/null +++ b/changelog.d/bookmark-button-align.fix @@ -0,0 +1 @@ +Fix bookmark button alignment in the extra actions menu diff --git a/src/components/popover/popover.scss b/src/components/popover/popover.scss index 828b81cd1..a166e2196 100644 --- a/src/components/popover/popover.scss +++ b/src/components/popover/popover.scss @@ -60,11 +60,14 @@ } .extra-button { - border-left: 1px solid var(--icon); + border-left: 1px solid; + border-image-source: linear-gradient(to bottom, transparent 0%, var(--icon) var(--__horizontal-gap) calc(100% - var(--__horizontal-gap)), transparent 100%); + border-image-slice: 1; padding-left: calc(var(--__horizontal-gap) - 1px); - border-right: var(--__horizontal-gap) solid transparent; - border-top: var(--__horizontal-gap) solid transparent; - border-bottom: var(--__horizontal-gap) solid transparent; + padding-right: var(--__horizontal-gap); + padding-top: var(--__horizontal-gap); + padding-bottom: var(--__horizontal-gap); + max-width: fit-content; } .main-button { diff --git a/src/components/status_action_buttons/action_button.scss b/src/components/status_action_buttons/action_button.scss index c0a9824df..8c6924871 100644 --- a/src/components/status_action_buttons/action_button.scss +++ b/src/components/status_action_buttons/action_button.scss @@ -102,4 +102,20 @@ } } } + + &.-extra { + .action-counter { + justify-self: end; + margin-right: 1em; + } + + .chevron-icon { + justify-self: end; + } + + .extra-button { + justify-self: end; + justify-content: end; + } + } } diff --git a/src/components/status_action_buttons/action_button.vue b/src/components/status_action_buttons/action_button.vue index ad2d349c6..a9aedb9e3 100644 --- a/src/components/status_action_buttons/action_button.vue +++ b/src/components/status_action_buttons/action_button.vue @@ -60,7 +60,7 @@ /> {{ button.counter?.(funcArg) }} From 61fcc4885426b49ccfad71d4dade38d08b85dad2 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sat, 28 Jun 2025 19:12:13 +0300 Subject: [PATCH 2/9] only fetch pleroma:chat_mention type if chats are supported --- .../notifications_fetcher/notifications_fetcher.service.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/services/notifications_fetcher/notifications_fetcher.service.js b/src/services/notifications_fetcher/notifications_fetcher.service.js index 9af973226..04c0d637c 100644 --- a/src/services/notifications_fetcher/notifications_fetcher.service.js +++ b/src/services/notifications_fetcher/notifications_fetcher.service.js @@ -14,7 +14,6 @@ const mastoApiNotificationTypes = [ 'move', 'poll', 'pleroma:emoji_reaction', - 'pleroma:chat_mention', 'pleroma:report' ] @@ -29,6 +28,10 @@ const fetchAndUpdate = ({ store, credentials, older = false, since }) => { const timelineData = rootState.notifications const hideMutedPosts = getters.mergedConfig.hideMutedPosts + if (store.rootState.instance.pleromaChatMessagesAvailable) { + mastoApiNotificationTypes.push('pleroma:chat_mention') + } + args.includeTypes = mastoApiNotificationTypes args.withMuted = !hideMutedPosts From 1a577cfcfc35f1c2d7b3bade5b00c612b9c8f391 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sat, 28 Jun 2025 21:02:26 +0300 Subject: [PATCH 3/9] theme previews --- .../settings_modal/tabs/appearance_tab.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/components/settings_modal/tabs/appearance_tab.js b/src/components/settings_modal/tabs/appearance_tab.js index fd18b91e5..c1fdd8c1a 100644 --- a/src/components/settings_modal/tabs/appearance_tab.js +++ b/src/components/settings_modal/tabs/appearance_tab.js @@ -391,7 +391,6 @@ const AppearanceTab = { inputRuleset: [...input, paletteRule].filter(x => x), ultimateBackgroundColor: '#000000', liteMode: true, - debug: true, onlyNormalState: true }) } @@ -400,7 +399,6 @@ const AppearanceTab = { inputRuleset: [], ultimateBackgroundColor: '#000000', liteMode: true, - debug: true, onlyNormalState: true }) } @@ -409,10 +407,16 @@ const AppearanceTab = { this.compilationCache[key] = theme3 } - return getScopedVersion( - getCssRules(theme3.eager), - '#theme-preview-' + key - ).join('\n') + const styleEl = document.getElementById('theme-holder') + const styleSheet = styleEl.sheet + styleSheet.insertRule([ + '#theme-preview-', + key, + ' {\n', + getCssRules(theme3.eager).join('\n'), + '\n}' + ].join(''), 'index-max') + } } } From ec367ad761f057bc34196204a603caef81b4b630 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sat, 28 Jun 2025 21:16:21 +0300 Subject: [PATCH 4/9] don't try to access serviceworker if it doesn't exist --- src/services/sw/sw.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/services/sw/sw.js b/src/services/sw/sw.js index a986e98dd..8c5edc9ed 100644 --- a/src/services/sw/sw.js +++ b/src/services/sw/sw.js @@ -18,6 +18,7 @@ function isPushSupported () { } function getOrCreateServiceWorker () { + if (!isSWSupported()) return const swType = process.env.HAS_MODULE_SERVICE_WORKER ? 'module' : 'classic' return navigator.serviceWorker.register('/sw-pleroma.js', { type: swType }) .catch((err) => console.error('Unable to get or create a service worker.', err)) From 5cafdca8555e2169f0b78b9536c5d698bb3eabee Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sat, 28 Jun 2025 21:23:41 +0300 Subject: [PATCH 5/9] properly check for scrobbles support --- src/modules/statuses.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/statuses.js b/src/modules/statuses.js index efdfc5894..d260a5a5a 100644 --- a/src/modules/statuses.js +++ b/src/modules/statuses.js @@ -110,17 +110,17 @@ const sortTimeline = (timeline) => { } const getLatestScrobble = (state, user) => { - const scrobbles = state.pleromaScrobblesAvailable - if (!scrobbles) return + const scrobblesSupport = state.pleromaScrobblesAvailable + if (!scrobblesSupport) return if (state.scrobblesNextFetch[user.id] && state.scrobblesNextFetch[user.id] > Date.now()) { return } state.scrobblesNextFetch[user.id] = Date.now() + 24 * 60 * 60 * 1000 - if (!scrobbles) return + if (!scrobblesSupport) return apiService.fetchScrobbles({ accountId: user.id }).then((scrobbles) => { - if (scrobbles?.error?.status === 501) { + if (scrobbles?.error) { state.pleromaScrobblesAvailable = false return } From ee0c73446e002c7b72b3193c33cb628c85c7b2fe Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sat, 28 Jun 2025 21:24:19 +0300 Subject: [PATCH 6/9] changelog --- changelog.d/akkoma.skip | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 changelog.d/akkoma.skip diff --git a/changelog.d/akkoma.skip b/changelog.d/akkoma.skip new file mode 100644 index 000000000..e69de29bb From 9fbf426388a756ba51ab72e0eb0d1be2cd611ffa Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sat, 28 Jun 2025 21:43:50 +0300 Subject: [PATCH 7/9] stricter CSP compat in appearance tab --- .../settings_modal/tabs/appearance_tab.js | 4 +++- .../settings_modal/tabs/appearance_tab.vue | 22 ++----------------- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/src/components/settings_modal/tabs/appearance_tab.js b/src/components/settings_modal/tabs/appearance_tab.js index c1fdd8c1a..df6f5d8a3 100644 --- a/src/components/settings_modal/tabs/appearance_tab.js +++ b/src/components/settings_modal/tabs/appearance_tab.js @@ -155,13 +155,15 @@ const AppearanceTab = { })) }) + this.previewTheme('stock', 'v3') + if (window.IntersectionObserver) { this.intersectionObserver = new IntersectionObserver((entries, observer) => { entries.forEach(({ target, isIntersecting }) => { if (!isIntersecting) return const theme = this.availableStyles.find(x => x.key === target.dataset.themeKey) this.$nextTick(() => { - if (theme) theme.ready = true + if (theme) this.previewTheme(theme.key, theme.version, theme.data) }) observer.unobserve(target) }) diff --git a/src/components/settings_modal/tabs/appearance_tab.vue b/src/components/settings_modal/tabs/appearance_tab.vue index d49a28651..593aa3000 100644 --- a/src/components/settings_modal/tabs/appearance_tab.vue +++ b/src/components/settings_modal/tabs/appearance_tab.vue @@ -16,15 +16,7 @@ :disabled="switchInProgress" @click="resetTheming" > - - - - - - +

{{ $t('settings.style.stock_theme_used') }} v3 @@ -61,17 +53,7 @@ :disabled="switchInProgress" @click="style.version === 'v2' ? setTheme(style.key) : setStyle(style.key)" > - - -
- -
- - - +

{{ style.name }} {{ style.version }} From 8dc45514ef90fcdfe7caf57b7d3544eee37d7e73 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sat, 28 Jun 2025 21:45:08 +0300 Subject: [PATCH 8/9] lint --- src/components/settings_modal/tabs/appearance_tab.js | 3 +-- src/components/settings_modal/tabs/appearance_tab.vue | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/settings_modal/tabs/appearance_tab.js b/src/components/settings_modal/tabs/appearance_tab.js index df6f5d8a3..941aa6f06 100644 --- a/src/components/settings_modal/tabs/appearance_tab.js +++ b/src/components/settings_modal/tabs/appearance_tab.js @@ -12,8 +12,7 @@ import { newImporter } from 'src/services/export_import/export_import.js' import { convertTheme2To3 } from 'src/services/theme_data/theme2_to_theme3.js' import { init } from 'src/services/theme_data/theme_data_3.service.js' import { - getCssRules, - getScopedVersion + getCssRules } from 'src/services/theme_data/css_utils.js' import { deserialize } from 'src/services/theme_data/iss_deserializer.js' diff --git a/src/components/settings_modal/tabs/appearance_tab.vue b/src/components/settings_modal/tabs/appearance_tab.vue index 593aa3000..cbbb8ff9c 100644 --- a/src/components/settings_modal/tabs/appearance_tab.vue +++ b/src/components/settings_modal/tabs/appearance_tab.vue @@ -16,7 +16,7 @@ :disabled="switchInProgress" @click="resetTheming" > - +

{{ $t('settings.style.stock_theme_used') }} v3 @@ -53,7 +53,7 @@ :disabled="switchInProgress" @click="style.version === 'v2' ? setTheme(style.key) : setStyle(style.key)" > - +

{{ style.name }} {{ style.version }} From ba48c875db6c693df6cb7dd2acbb633a6fe18b86 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sat, 28 Jun 2025 22:21:07 +0300 Subject: [PATCH 9/9] intersectionless support --- src/components/settings_modal/tabs/appearance_tab.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/settings_modal/tabs/appearance_tab.js b/src/components/settings_modal/tabs/appearance_tab.js index 941aa6f06..996f3a20c 100644 --- a/src/components/settings_modal/tabs/appearance_tab.js +++ b/src/components/settings_modal/tabs/appearance_tab.js @@ -169,6 +169,8 @@ const AppearanceTab = { }, { root: this.$refs.themeList }) + } else { + this.availableStyles.forEach(theme => this.previewTheme(theme.key, theme.version, theme.data)) } }, updated () {