From 18fb7a208057307613acfa9473fb2151f0a9a4e6 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 22 Oct 2023 16:05:32 +0900 Subject: [PATCH] =?UTF-8?q?enhance(frontend):=20=E3=82=A2=E3=82=A4?= =?UTF-8?q?=E3=82=B3=E3=83=B3=E3=81=AE=E3=83=87=E3=82=B3=E3=83=AC=E3=83=BC?= =?UTF-8?q?=E3=82=B7=E3=83=A7=E3=83=B3=E3=82=92=E9=9D=9E=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E3=81=AB=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locales/index.d.ts | 1 + locales/ja-JP.yml | 1 + packages/frontend/src/components/global/MkAvatar.vue | 6 +++++- packages/frontend/src/pages/settings/general.vue | 4 +++- .../src/pages/settings/profile.avatar-decoration-dialog.vue | 2 +- packages/frontend/src/pages/settings/profile.vue | 4 ++-- packages/frontend/src/store.ts | 4 ++++ 7 files changed, 17 insertions(+), 5 deletions(-) diff --git a/locales/index.d.ts b/locales/index.d.ts index 562ed2fc7..003c453a4 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -1151,6 +1151,7 @@ export interface Locale { "detach": string; "angle": string; "flip": string; + "showAvatarDecorations": string; "_announcement": { "forExistingUsers": string; "forExistingUsersDescription": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 0a12487c5..33a39ad08 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1148,6 +1148,7 @@ attach: "付ける" detach: "外す" angle: "角度" flip: "反転" +showAvatarDecorations: "アイコンのデコレーションを表示" _announcement: forExistingUsers: "既存ユーザーのみ" diff --git a/packages/frontend/src/components/global/MkAvatar.vue b/packages/frontend/src/components/global/MkAvatar.vue index e22ed29b7..1bb6d0322 100644 --- a/packages/frontend/src/components/global/MkAvatar.vue +++ b/packages/frontend/src/components/global/MkAvatar.vue @@ -24,7 +24,7 @@ SPDX-License-Identifier: AGPL-3.0-only {{ i18n.ts.disableShowingAnimatedImages }} {{ i18n.ts.highlightSensitiveMedia }} {{ i18n.ts.squareAvatars }} + {{ i18n.ts.showAvatarDecorations }} {{ i18n.ts.useSystemFont }} {{ i18n.ts.disableDrawer }} {{ i18n.ts.forceShowAds }} @@ -203,7 +204,7 @@ import { unisonReload } from '@/scripts/unison-reload.js'; import { i18n } from '@/i18n.js'; import { definePageMetadata } from '@/scripts/page-metadata.js'; import { miLocalStorage } from '@/local-storage.js'; -import { globalEvents } from '@/events'; +import { globalEvents } from '@/events.js'; import { claimAchievement } from '@/scripts/achievements.js'; const lang = ref(miLocalStorage.getItem('lang')); @@ -248,6 +249,7 @@ const instanceTicker = computed(defaultStore.makeGetterSetter('instanceTicker')) const enableInfiniteScroll = computed(defaultStore.makeGetterSetter('enableInfiniteScroll')); const useReactionPickerForContextMenu = computed(defaultStore.makeGetterSetter('useReactionPickerForContextMenu')); const squareAvatars = computed(defaultStore.makeGetterSetter('squareAvatars')); +const showAvatarDecorations = computed(defaultStore.makeGetterSetter('showAvatarDecorations')); const mediaListWithOneImageAppearance = computed(defaultStore.makeGetterSetter('mediaListWithOneImageAppearance')); const notificationPosition = computed(defaultStore.makeGetterSetter('notificationPosition')); const notificationStackAxis = computed(defaultStore.makeGetterSetter('notificationStackAxis')); diff --git a/packages/frontend/src/pages/settings/profile.avatar-decoration-dialog.vue b/packages/frontend/src/pages/settings/profile.avatar-decoration-dialog.vue index c4bdf4a49..4d571bc9b 100644 --- a/packages/frontend/src/pages/settings/profile.avatar-decoration-dialog.vue +++ b/packages/frontend/src/pages/settings/profile.avatar-decoration-dialog.vue @@ -17,7 +17,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ decoration.name }}
- +
diff --git a/packages/frontend/src/pages/settings/profile.vue b/packages/frontend/src/pages/settings/profile.vue index 8d9c3cf73..90c10d3e7 100644 --- a/packages/frontend/src/pages/settings/profile.vue +++ b/packages/frontend/src/pages/settings/profile.vue @@ -7,7 +7,7 @@ SPDX-License-Identifier: AGPL-3.0-only
- + {{ i18n.ts._profile.changeAvatar }}
{{ i18n.ts._profile.changeBanner }} @@ -95,7 +95,7 @@ SPDX-License-Identifier: AGPL-3.0-only @click="openDecoration(avatarDecoration)" >
{{ avatarDecoration.name }}
- +
diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts index 92d01e4ca..6196e684e 100644 --- a/packages/frontend/src/store.ts +++ b/packages/frontend/src/store.ts @@ -293,6 +293,10 @@ export const defaultStore = markRaw(new Storage('base', { where: 'device', default: false, }, + showAvatarDecorations: { + where: 'device', + default: true, + }, postFormWithHashtags: { where: 'device', default: false,