From 5a76b7069f5120f4b1698b4c254111ad8cce78d9 Mon Sep 17 00:00:00 2001 From: HellhoundSoftware Date: Sat, 18 Jan 2025 08:28:57 -0500 Subject: Refactor renote tooltip text --- packages/frontend/src/scripts/boost-quote.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'packages/frontend/src/scripts') 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, renote: ( } as MenuItem, ]; } + +export function computeRenoteTooltip(renoted: Ref): ComputedRef { + return computed(() => { + if (renoted.value) return i18n.ts.unrenote; + if (defaultStore.state.showVisibilitySelectorOnBoost) return i18n.ts.renote; + return i18n.ts.renoteShift; + }); +} -- cgit v1.2.3-freya