move tooltip message to computed

This commit is contained in:
HellhoundSoftware 2025-01-15 16:14:35 -05:00
parent 2c90eebe86
commit 3717654309
No known key found for this signature in database
6 changed files with 36 additions and 6 deletions

View file

@ -128,7 +128,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<button
v-if="canRenote"
ref="renoteButton"
v-tooltip="renoted ? i18n.ts.unrenote : (!defaultStore.state.showVisibilitySelectorOnBoost ? i18n.ts.renoteShift : i18n.ts.renote)"
v-tooltip="renoteTooltip"
:class="$style.footerButton"
class="_button"
:style="renoted ? 'color: var(--MI_THEME-accent) !important;' : ''"
@ -339,6 +339,11 @@ const pleaseLoginContext = computed<OpenOnRemoteOptions>(() => ({
url: `https://${host}/notes/${appearNote.value.id}`,
}));
const renoteTooltip = computed(() => {
if (renoted.value) return i18n.ts.unrenote;
return defaultStore.state.showVisibilitySelectorOnBoost ? i18n.ts.renote : i18n.ts.renoteShift;
});
/* Overload FunctionLint
function checkMute(noteToCheck: Misskey.entities.Note, mutedWords: Array<string | string[]> | undefined | null, checkOnly: true): boolean;
function checkMute(noteToCheck: Misskey.entities.Note, mutedWords: Array<string | string[]> | undefined | null, checkOnly: false): boolean | 'sensitiveMute';