diff options
| author | dakkar <dakkar@thenautilus.net> | 2025-01-18 17:28:02 +0000 |
|---|---|---|
| committer | dakkar <dakkar@thenautilus.net> | 2025-01-18 17:28:02 +0000 |
| commit | 60c937606bf77eec0670e32e4358fb1d69ffb003 (patch) | |
| tree | 14fa7bc28284488acd0c4865404ba73729c81590 /packages/frontend/src/scripts | |
| parent | merge: Fix: Emoji categories with subfolders, but no emoji, erroneously dupli... (diff) | |
| parent | Refactor renote tooltip text (diff) | |
| download | sharkey-60c937606bf77eec0670e32e4358fb1d69ffb003.tar.gz sharkey-60c937606bf77eec0670e32e4358fb1d69ffb003.tar.bz2 sharkey-60c937606bf77eec0670e32e4358fb1d69ffb003.zip | |
merge: enhance: Open boost visibility menu on shift-click (!859)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/859
Approved-by: dakkar <dakkar@thenautilus.net>
Approved-by: Marie <github@yuugi.dev>
Diffstat (limited to 'packages/frontend/src/scripts')
| -rw-r--r-- | packages/frontend/src/scripts/boost-quote.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/frontend/src/scripts/boost-quote.ts b/packages/frontend/src/scripts/boost-quote.ts index 4e025f5d4f..feb949772b 100644 --- a/packages/frontend/src/scripts/boost-quote.ts +++ b/packages/frontend/src/scripts/boost-quote.ts @@ -3,7 +3,7 @@ * SPDX-License-Identifier: AGPL-3.0-only */ -import { ref, Ref } from 'vue'; +import { ref, Ref, computed, ComputedRef } from 'vue'; import * as Misskey from 'misskey-js'; import { i18n } from '@/i18n.js'; import { defaultStore } from '@/store.js'; @@ -79,3 +79,11 @@ export function boostMenuItems(appearNote: Ref<Misskey.entities.Note>, renote: ( } as MenuItem, ]; } + +export function computeRenoteTooltip(renoted: Ref<boolean>): ComputedRef<string> { + return computed(() => { + if (renoted.value) return i18n.ts.unrenote; + if (defaultStore.state.showVisibilitySelectorOnBoost) return i18n.ts.renote; + return i18n.ts.renoteShift; + }); +} |