From 582a9847a15ec4331522cf33ba9e951547a04fe7 Mon Sep 17 00:00:00 2001 From: TAKAHASHI Shuuji Date: Sun, 7 May 2023 00:52:33 +0900 Subject: [PATCH] feat: add 'use star favorite icon' preference (#2067) --- components/account/AccountMoreButton.vue | 3 ++- components/nav/NavSide.vue | 3 ++- components/status/StatusActions.vue | 13 +++++++++---- components/status/StatusActionsMore.vue | 15 ++++++++++++--- composables/settings/definition.ts | 2 ++ locales/en.json | 1 + locales/ja-JP.json | 1 + pages/favourites.vue | 3 ++- pages/settings/preferences/index.vue | 6 ++++++ 9 files changed, 37 insertions(+), 10 deletions(-) diff --git a/components/account/AccountMoreButton.vue b/components/account/AccountMoreButton.vue index 47ddeabc..3dd5252b 100644 --- a/components/account/AccountMoreButton.vue +++ b/components/account/AccountMoreButton.vue @@ -16,6 +16,7 @@ const isSelf = $(useSelfAccount(() => account)) const { t } = useI18n() const { client } = $(useMasto()) +const useStarFavoriteIcon = usePreferences('useStarFavoriteIcon') async function toggleMute() { if (!relationship!.muting && await openConfirmDialog({ @@ -198,7 +199,7 @@ async function removeUserNote() { - + diff --git a/components/nav/NavSide.vue b/components/nav/NavSide.vue index 81acd580..91ac359d 100644 --- a/components/nav/NavSide.vue +++ b/components/nav/NavSide.vue @@ -3,6 +3,7 @@ const { command } = defineProps<{ command?: boolean }>() const { notifications } = useNotifications() +const useStarFavoriteIcon = usePreferences('useStarFavoriteIcon') - + diff --git a/components/status/StatusActions.vue b/components/status/StatusActions.vue index 15f6ee71..eb75e707 100644 --- a/components/status/StatusActions.vue +++ b/components/status/StatusActions.vue @@ -12,6 +12,7 @@ const focusEditor = inject('focus-editor', noop) const { details, command } = $(props) const userSettings = useUserSettings() +const useStarFavoriteIcon = usePreferences('useStarFavoriteIcon') const { status, @@ -77,9 +78,11 @@ function reply() { status.account.id === currentUser.value?.account.id) @@ -149,8 +150,13 @@ function showFavoritedAndBoostedBy() { t('nav.favourites'), @@ -14,7 +15,7 @@ useHydratedHead({ diff --git a/pages/settings/preferences/index.vue b/pages/settings/preferences/index.vue index 0951b755..c79335b0 100644 --- a/pages/settings/preferences/index.vue +++ b/pages/settings/preferences/index.vue @@ -49,6 +49,12 @@ const userSettings = useUserSettings() > {{ $t('settings.preferences.enable_pinch_to_zoom') }} + + {{ $t('settings.preferences.use_star_favorite_icon') }} +

{{ $t('settings.preferences.wellbeing') }}