summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarie <github@yuugi.dev>2024-10-03 19:51:35 +0000
committerMarie <github@yuugi.dev>2024-10-03 19:51:35 +0000
commitaedc5fba8177f1d53b9aee34f2aa35e75855d022 (patch)
treed98db40832614d656c27f281c8a192f92884afe5
parentmerge: maybe fix #510 - try to not edit visibility (!631) (diff)
parentcover case of author speaking as cat while not being cat (diff)
downloadsharkey-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>
-rw-r--r--locales/en-US.yml3
-rw-r--r--locales/index.d.ts4
-rw-r--r--locales/ja-JP.yml1
-rw-r--r--packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts3
-rw-r--r--packages/frontend/src/pages/settings/general.vue2
-rw-r--r--packages/frontend/src/pages/settings/preferences-backups.vue1
-rw-r--r--packages/frontend/src/store.ts4
7 files changed, 15 insertions, 3 deletions
diff --git a/locales/en-US.yml b/locales/en-US.yml
index 1f73b09325..32282cc44e 100644
--- a/locales/en-US.yml
+++ b/locales/en-US.yml
@@ -184,7 +184,7 @@ flagAsBotDescription: "Enable this option if this account is controlled by a pro
flagAsCat: "Mark this account as a cat"
flagAsCatDescription: "Enable this option to mark this account as a cat."
flagSpeakAsCat: "Speak as a cat"
-flagSpeakAsCatDescription: "Your posts will get nyanified when in cat mode."
+flagSpeakAsCatDescription: "Your posts will get nyanified when in cat mode. If this isn't working, then please check that you dont have 'Disable cat speak' on under General/Note Display"
flagShowTimelineReplies: "Show replies in timeline"
flagShowTimelineRepliesDescription: "Shows replies of users to notes of other users in the timeline if turned on."
autoAcceptFollowed: "Automatically approve follow requests from users you're following"
@@ -778,6 +778,7 @@ lockedAccountInfo: "Unless you set your note visiblity to \"Followers only\", yo
alwaysMarkSensitive: "Mark as sensitive by default"
loadRawImages: "Load original images instead of showing thumbnails"
showTickerOnReplies: "Show instance ticker on replies"
+disableCatSpeak: "Disable cat speak"
searchEngine: "Search Engine For Search MFM"
searchEngineOther: "Other"
searchEngineCustomURIDescription: "The custom URI must be input in the format like \"https://www.google.com/search?q=\\{query}\" or \"https://www.google.com/search?q=%s\"."
diff --git a/locales/index.d.ts b/locales/index.d.ts
index ceda912d3f..ca9001c34d 100644
--- a/locales/index.d.ts
+++ b/locales/index.d.ts
@@ -4430,6 +4430,10 @@ export interface Locale extends ILocale {
*/
"disableFederationOk": string;
/**
+ * 猫の話し方を無効にする
+ */
+ "disableCatSpeak": string;
+ /**
* 現在このサーバーは招待制です。招待コードをお持ちの方のみ登録できます。
*/
"invitationRequiredToRegister": string;
diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml
index 9307e9e81e..2deca654b8 100644
--- a/locales/ja-JP.yml
+++ b/locales/ja-JP.yml
@@ -778,6 +778,7 @@ lockedAccountInfo: "フォローを承認制にしても、ノートの公開範
alwaysMarkSensitive: "デフォルトでメディアをセンシティブ設定にする"
loadRawImages: "添付画像のサムネイルをオリジナル画質にする"
showTickerOnReplies: "返信にサーバー情報を表示する"
+disableCatSpeak: "猫の話し方を無効にする"
searchEngine: "検索MFMの検索エンジン"
searchEngineOther: "カスタム"
searchEngineCustomURIDescription: "カスタム検索エンジンのURIは、\"https://www.google.com/search?q=\\{query}\" や \"https://www.google.com/search?q=%s\" のような形式で入力する必要があります。"
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