enhance(client): Friendly UIで通知領域をオン/オフできるように
This commit is contained in:
parent
b93b84f593
commit
5e86d02694
|
@ -1097,6 +1097,7 @@ additionalEmojiDictionary: "Additional emoji dictionaries"
|
|||
installed: "Installed"
|
||||
performanceWarning: "High resource usage can result in higher device temperatures and faster battery consumption"
|
||||
photosensitiveSeizuresWarning: "Can cause photosensitive seizures"
|
||||
friendlyEnableNotification: "Enable notification area (Friendly UI only)"
|
||||
_initialAccountSetting:
|
||||
accountCreated: "Your account was successfully created!"
|
||||
letsStartAccountSetup: "For starters, let's set up your profile."
|
||||
|
|
1
locales/index.d.ts
vendored
1
locales/index.d.ts
vendored
|
@ -1100,6 +1100,7 @@ export interface Locale {
|
|||
"installed": string;
|
||||
"performanceWarning": string;
|
||||
"photosensitiveSeizuresWarning": string;
|
||||
"friendlyEnableNotification": string;
|
||||
"_initialAccountSetting": {
|
||||
"accountCreated": string;
|
||||
"letsStartAccountSetup": string;
|
||||
|
|
|
@ -1097,6 +1097,7 @@ additionalEmojiDictionary: "絵文字の追加辞書"
|
|||
installed: "インストール済み"
|
||||
performanceWarning: "リソースを多く使用するため、デバイスの温度が高くなり、バッテリーの消耗が速くなる可能性があります"
|
||||
photosensitiveSeizuresWarning: "光敏感性発作を起こす可能性があります"
|
||||
friendlyEnableNotification: "通知領域を有効にする(Friendly UIのみ)"
|
||||
|
||||
_initialAccountSetting:
|
||||
accountCreated: "アカウントの作成が完了しました!"
|
||||
|
|
|
@ -1098,6 +1098,7 @@ additionalEmojiDictionary: "이모지 추가 사전"
|
|||
installed: "설치됨"
|
||||
performanceWarning: "리소스를 많이 사용하므로, 디바이스의 온도가 높아지고 배터리의 소모가 빨라질 수 있어요"
|
||||
photosensitiveSeizuresWarning: "광과민성 발작을 일으킬 수 있어요"
|
||||
friendlyEnableNotification: "알림 영역 활성화(Friendly UI 전용)"
|
||||
_initialAccountSetting:
|
||||
accountCreated: "계정 생성이 완료되었어요!"
|
||||
letsStartAccountSetup: "계정의 초기 설정을 진행해 볼까요?"
|
||||
|
|
|
@ -119,6 +119,9 @@
|
|||
<MkSwitch v-model="forceShowAds">{{ i18n.ts.forceShowAds }}</MkSwitch>
|
||||
<MkSwitch v-model="enableDataSaverMode">{{ i18n.ts.dataSaver }}</MkSwitch>
|
||||
</div>
|
||||
<div class="_gaps_s">
|
||||
<MkSwitch v-model="friendlyEnableNotification">{{ i18n.ts.friendlyEnableNotification }}</MkSwitch>
|
||||
</div>
|
||||
<div>
|
||||
<MkRadios v-model="emojiStyle">
|
||||
<template #label>{{ i18n.ts.emojiStyle }}</template>
|
||||
|
@ -317,6 +320,7 @@ const useEnterToSend = computed(defaultStore.makeGetterSetter('useEnterToSend'))
|
|||
const postFormVisibilityHotkey = computed(defaultStore.makeGetterSetter('postFormVisibilityHotkey'));
|
||||
const newNoteRecivedNotificationBehavior = computed(defaultStore.makeGetterSetter('newNoteRecivedNotificationBehavior'));
|
||||
const fontSize = computed(defaultStore.makeGetterSetter('fontSize'));
|
||||
const friendlyEnableNotification = computed(defaultStore.makeGetterSetter('friendlyEnableNotification'));
|
||||
|
||||
watch(lang, () => {
|
||||
miLocalStorage.setItem('lang', lang.value as string);
|
||||
|
|
|
@ -90,6 +90,7 @@ const defaultStoreSaveKeys: (keyof typeof defaultStore['state'])[] = [
|
|||
'useEnterToSend',
|
||||
'postFormVisibilityHotkey',
|
||||
'newNoteRecivedNotificationBehavior',
|
||||
'friendlyEnableNotification',
|
||||
];
|
||||
const coldDeviceStorageSaveKeys: (keyof typeof ColdDeviceStorage.default)[] = [
|
||||
'lightTheme',
|
||||
|
|
|
@ -359,6 +359,10 @@ export const defaultStore = markRaw(new Storage('base', {
|
|||
where: 'device',
|
||||
default: {} as Record<string, Record<string, string[]>>,
|
||||
},
|
||||
friendlyEnableNotification: {
|
||||
where: 'device',
|
||||
default: true,
|
||||
},
|
||||
}));
|
||||
|
||||
// TODO: 他のタブと永続化されたstateを同期
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<div v-if="!(mainRouter.currentRoute.value.name === 'messaging-room' || mainRouter.currentRoute.value.name === 'messaging-room-group')" :class="$style.spacer"></div>
|
||||
</MkStickyContainer>
|
||||
|
||||
<div v-if="isDesktop && mainRouter.currentRoute.value.name !== 'my-notifications'" :class="$style.notificationWidgets">
|
||||
<div v-if="isDesktop && defaultStore.state.friendlyEnableNotification && mainRouter.currentRoute.value.name !== 'my-notifications'" :class="$style.notificationWidgets">
|
||||
<XNotifications/>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue