From 5e86d026946846450bc0dcb2382f6d5829e0dc42 Mon Sep 17 00:00:00 2001 From: NoriDev Date: Fri, 2 Jun 2023 23:31:22 +0900 Subject: [PATCH] =?UTF-8?q?enhance(client):=20Friendly=20UI=E3=81=A7?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E9=A0=98=E5=9F=9F=E3=82=92=E3=82=AA=E3=83=B3?= =?UTF-8?q?/=E3=82=AA=E3=83=95=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locales/en-US.yml | 1 + locales/index.d.ts | 1 + locales/ja-JP.yml | 1 + locales/ko-KR.yml | 1 + packages/frontend/src/pages/settings/general.vue | 4 ++++ packages/frontend/src/pages/settings/preferences-backups.vue | 1 + packages/frontend/src/store.ts | 4 ++++ packages/frontend/src/ui/friendly.vue | 2 +- 8 files changed, 14 insertions(+), 1 deletion(-) diff --git a/locales/en-US.yml b/locales/en-US.yml index ee8f1bdfe8..9cad956750 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -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." diff --git a/locales/index.d.ts b/locales/index.d.ts index 1eba7e77dd..addb9fc962 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -1100,6 +1100,7 @@ export interface Locale { "installed": string; "performanceWarning": string; "photosensitiveSeizuresWarning": string; + "friendlyEnableNotification": string; "_initialAccountSetting": { "accountCreated": string; "letsStartAccountSetup": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 3408b99b27..c6b8975b76 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1097,6 +1097,7 @@ additionalEmojiDictionary: "絵文字の追加辞書" installed: "インストール済み" performanceWarning: "リソースを多く使用するため、デバイスの温度が高くなり、バッテリーの消耗が速くなる可能性があります" photosensitiveSeizuresWarning: "光敏感性発作を起こす可能性があります" +friendlyEnableNotification: "通知領域を有効にする(Friendly UIのみ)" _initialAccountSetting: accountCreated: "アカウントの作成が完了しました!" diff --git a/locales/ko-KR.yml b/locales/ko-KR.yml index 3a409f0db5..684e33718c 100644 --- a/locales/ko-KR.yml +++ b/locales/ko-KR.yml @@ -1098,6 +1098,7 @@ additionalEmojiDictionary: "이모지 추가 사전" installed: "설치됨" performanceWarning: "리소스를 많이 사용하므로, 디바이스의 온도가 높아지고 배터리의 소모가 빨라질 수 있어요" photosensitiveSeizuresWarning: "광과민성 발작을 일으킬 수 있어요" +friendlyEnableNotification: "알림 영역 활성화(Friendly UI 전용)" _initialAccountSetting: accountCreated: "계정 생성이 완료되었어요!" letsStartAccountSetup: "계정의 초기 설정을 진행해 볼까요?" diff --git a/packages/frontend/src/pages/settings/general.vue b/packages/frontend/src/pages/settings/general.vue index 1601081db8..0796893099 100644 --- a/packages/frontend/src/pages/settings/general.vue +++ b/packages/frontend/src/pages/settings/general.vue @@ -119,6 +119,9 @@ {{ i18n.ts.forceShowAds }} {{ i18n.ts.dataSaver }} +
+ {{ i18n.ts.friendlyEnableNotification }} +
@@ -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); diff --git a/packages/frontend/src/pages/settings/preferences-backups.vue b/packages/frontend/src/pages/settings/preferences-backups.vue index e08e585b91..d0577f4b62 100644 --- a/packages/frontend/src/pages/settings/preferences-backups.vue +++ b/packages/frontend/src/pages/settings/preferences-backups.vue @@ -90,6 +90,7 @@ const defaultStoreSaveKeys: (keyof typeof defaultStore['state'])[] = [ 'useEnterToSend', 'postFormVisibilityHotkey', 'newNoteRecivedNotificationBehavior', + 'friendlyEnableNotification', ]; const coldDeviceStorageSaveKeys: (keyof typeof ColdDeviceStorage.default)[] = [ 'lightTheme', diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts index 0821d15853..8a212c7133 100644 --- a/packages/frontend/src/store.ts +++ b/packages/frontend/src/store.ts @@ -359,6 +359,10 @@ export const defaultStore = markRaw(new Storage('base', { where: 'device', default: {} as Record>, }, + friendlyEnableNotification: { + where: 'device', + default: true, + }, })); // TODO: 他のタブと永続化されたstateを同期 diff --git a/packages/frontend/src/ui/friendly.vue b/packages/frontend/src/ui/friendly.vue index 3aa2909223..549b16c7dd 100644 --- a/packages/frontend/src/ui/friendly.vue +++ b/packages/frontend/src/ui/friendly.vue @@ -8,7 +8,7 @@
-
+