diff options
| author | Marie <github@yuugi.dev> | 2024-10-03 19:51:35 +0000 |
|---|---|---|
| committer | Marie <github@yuugi.dev> | 2024-10-03 19:51:35 +0000 |
| commit | aedc5fba8177f1d53b9aee34f2aa35e75855d022 (patch) | |
| tree | d98db40832614d656c27f281c8a192f92884afe5 /packages/frontend/src | |
| parent | merge: maybe fix #510 - try to not edit visibility (!631) (diff) | |
| parent | cover case of author speaking as cat while not being cat (diff) | |
| download | sharkey-aedc5fba8177f1d53b9aee34f2aa35e75855d022.tar.gz sharkey-aedc5fba8177f1d53b9aee34f2aa35e75855d022.tar.bz2 sharkey-aedc5fba8177f1d53b9aee34f2aa35e75855d022.zip | |
merge: Disabling cat speak on the client (!609)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/609
Closes #604
Approved-by: fEmber <acomputerdog@gmail.com>
Approved-by: Marie <github@yuugi.dev>
Diffstat (limited to 'packages/frontend/src')
4 files changed, 8 insertions, 2 deletions
diff --git a/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts b/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts index a3a2b9f319..5046f17357 100644 --- a/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts +++ b/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts @@ -58,8 +58,7 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext<MfmEven provide('linkNavigationBehavior', props.linkNavigationBehavior); const isNote = props.isNote ?? true; - const shouldNyaize = props.nyaize ? props.nyaize === 'respect' ? props.author?.isCat ? props.author.speakAsCat : false : false : false; - + const shouldNyaize = props.nyaize === 'respect' && props.author?.isCat && props.author?.speakAsCat && !defaultStore.state.disableCatSpeak; // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition if (props.text == null || props.text === '') return; diff --git a/packages/frontend/src/pages/settings/general.vue b/packages/frontend/src/pages/settings/general.vue index 637c1b24b9..8cd1caf6bd 100644 --- a/packages/frontend/src/pages/settings/general.vue +++ b/packages/frontend/src/pages/settings/general.vue @@ -68,6 +68,7 @@ SPDX-License-Identifier: AGPL-3.0-only <MkSwitch v-model="showGapBetweenNotesInTimeline">{{ i18n.ts.showGapBetweenNotesInTimeline }}</MkSwitch> <MkSwitch v-model="loadRawImages">{{ i18n.ts.loadRawImages }}</MkSwitch> <MkSwitch v-model="showTickerOnReplies">{{ i18n.ts.showTickerOnReplies }}</MkSwitch> + <MkSwitch v-model="disableCatSpeak">{{ i18n.ts.disableCatSpeak }}</MkSwitch> <MkSelect v-model="searchEngine" placeholder="Other"> <template #label>{{ i18n.ts.searchEngine }}</template> <option @@ -400,6 +401,7 @@ const disableShowingAnimatedImages = computed(defaultStore.makeGetterSetter('dis const forceShowAds = computed(defaultStore.makeGetterSetter('forceShowAds')); const oneko = computed(defaultStore.makeGetterSetter('oneko')); const loadRawImages = computed(defaultStore.makeGetterSetter('loadRawImages')); +const disableCatSpeak = computed(defaultStore.makeGetterSetter('disableCatSpeak')); const highlightSensitiveMedia = computed(defaultStore.makeGetterSetter('highlightSensitiveMedia')); const imageNewTab = computed(defaultStore.makeGetterSetter('imageNewTab')); const enableFaviconNotificationDot = computed(defaultStore.makeGetterSetter('enableFaviconNotificationDot')); diff --git a/packages/frontend/src/pages/settings/preferences-backups.vue b/packages/frontend/src/pages/settings/preferences-backups.vue index f9fd494ce9..b0a79ddc39 100644 --- a/packages/frontend/src/pages/settings/preferences-backups.vue +++ b/packages/frontend/src/pages/settings/preferences-backups.vue @@ -77,6 +77,7 @@ const defaultStoreSaveKeys: (keyof typeof defaultStore['state'])[] = [ 'enableFaviconNotificationDot', 'imageNewTab', 'dataSaver', + 'disableCatSpeak', 'disableShowingAnimatedImages', 'emojiStyle', 'disableDrawer', diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts index dda320dbac..036e43a4b6 100644 --- a/packages/frontend/src/store.ts +++ b/packages/frontend/src/store.ts @@ -288,6 +288,10 @@ export const defaultStore = markRaw(new Storage('base', { where: 'device', default: window.matchMedia('(prefers-reduced-motion)').matches, }, + disableCatSpeak: { + where: 'account', + default: false, + }, emojiStyle: { where: 'device', default: 'twemoji', // twemoji / fluentEmoji / native |