diff --git a/CHANGELOG.md b/CHANGELOG.md index 20a0881240..edad9abc77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ (デスクトップ表示ではusernameの右側のボタンからも追加可能) ### Client +- 通知の表示をカスタマイズできるように - コントロールパネルのカスタム絵文字ページおよびaboutのカスタム絵文字の検索インプットで、`:emojiname1::emojiname2:`のように検索して絵文字を検索できるように * 絵文字ピッカーから入力可能になります - データセーバーモードを追加 diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index ff0a2ac9f3..9a526e67e9 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1001,6 +1001,15 @@ accountMoved: "このユーザーは新しいアカウントに引っ越しま forceShowAds: "常に広告を表示する" addMemo: "メモを追加" editMemo: "メモを編集" +notificationDisplay: "通知の表示" +leftTop: "左上" +rightTop: "右上" +leftBottom: "左下" +rightBottom: "右下" +stackAxis: "スタック方向" +vertical: "縦" +horizontal: "横" +position: "位置" _accountMigration: moveTo: "このアカウントを新しいアカウントに引っ越す" diff --git a/packages/frontend/src/pages/settings/general.vue b/packages/frontend/src/pages/settings/general.vue index a487a4622a..0a53ed2c8d 100644 --- a/packages/frontend/src/pages/settings/general.vue +++ b/packages/frontend/src/pages/settings/general.vue @@ -92,6 +92,26 @@ + + {{ i18n.ts.notificationDisplay }} + + + + {{ i18n.ts.position }} + {{ i18n.ts.leftTop }} + {{ i18n.ts.rightTop }} + {{ i18n.ts.leftBottom }} + {{ i18n.ts.rightBottom }} + + + + {{ i18n.ts.stackAxis }} + {{ i18n.ts.vertical }} + {{ i18n.ts.horizontal }} + + + + {{ i18n.ts.aiChanMode }} @@ -181,6 +201,8 @@ const useReactionPickerForContextMenu = computed(defaultStore.makeGetterSetter(' const squareAvatars = computed(defaultStore.makeGetterSetter('squareAvatars')); const aiChanMode = computed(defaultStore.makeGetterSetter('aiChanMode')); const mediaListWithOneImageAppearance = computed(defaultStore.makeGetterSetter('mediaListWithOneImageAppearance')); +const notificationPosition = computed(defaultStore.makeGetterSetter('notificationPosition')); +const notificationStackAxis = computed(defaultStore.makeGetterSetter('notificationStackAxis')); watch(lang, () => { miLocalStorage.setItem('lang', lang.value as string); diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts index a4f0f65e14..710b08d9e0 100644 --- a/packages/frontend/src/store.ts +++ b/packages/frontend/src/store.ts @@ -314,6 +314,14 @@ export const defaultStore = markRaw(new Storage('base', { where: 'device', default: 'expand' as 'expand' | '16_9' | '1_1' | '2_3', }, + notificationPosition: { + where: 'device', + default: 'rightBottom' as 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom', + }, + notificationStackAxis: { + where: 'device', + default: 'horizontal' as 'vertical' | 'horizontal', + }, })); // TODO: 他のタブと永続化されたstateを同期 diff --git a/packages/frontend/src/ui/_common_/common.vue b/packages/frontend/src/ui/_common_/common.vue index 5a32c076a4..71a4285e9d 100644 --- a/packages/frontend/src/ui/_common_/common.vue +++ b/packages/frontend/src/ui/_common_/common.vue @@ -10,14 +10,16 @@ - + + + @@ -30,7 +32,7 @@