You can now disable cat speak in settings (client side)
This commit is contained in:
parent
bc8c6592ea
commit
d55c86548d
6 changed files with 15 additions and 1 deletions
|
|
@ -89,6 +89,8 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext<MfmEven
|
|||
* @param disableNyaize Whether nyaize is disabled or not
|
||||
*/
|
||||
const genEl = (ast: mfm.MfmNode[], scale: number, disableNyaize = false) => ast.map((token): VNode | string | (VNode | string)[] => {
|
||||
if (defaultStore.state.disableCatSpeak)
|
||||
disableNyaize = true
|
||||
switch (token.type) {
|
||||
case 'text': {
|
||||
let text = token.props.text.replace(/(\r\n|\n|\r)/g, '\n');
|
||||
|
|
|
|||
|
|
@ -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'));
|
||||
|
|
|
|||
|
|
@ -288,6 +288,10 @@ export const defaultStore = markRaw(new Storage('base', {
|
|||
where: 'device',
|
||||
default: window.matchMedia('(prefers-reduced-motion)').matches,
|
||||
},
|
||||
disableCatSpeak: {
|
||||
where: 'device',
|
||||
default: false,
|
||||
},
|
||||
emojiStyle: {
|
||||
where: 'device',
|
||||
default: 'twemoji', // twemoji / fluentEmoji / native
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue