diff options
| author | Hazelnoot <acomputerdog@gmail.com> | 2025-03-31 14:53:02 -0400 |
|---|---|---|
| committer | Hazelnoot <acomputerdog@gmail.com> | 2025-03-31 14:53:02 -0400 |
| commit | c371af34e877845e01cd92683aca0ff3334e314a (patch) | |
| tree | e34c80fc5c134a87f6ce01cbd93d6163c08c0a7d /packages/frontend/src/utility/boost-quote.ts | |
| parent | regenerate misskey-js (diff) | |
| download | sharkey-c371af34e877845e01cd92683aca0ff3334e314a.tar.gz sharkey-c371af34e877845e01cd92683aca0ff3334e314a.tar.bz2 sharkey-c371af34e877845e01cd92683aca0ff3334e314a.zip | |
copy sharkey settings into new frontend preferences model
Diffstat (limited to 'packages/frontend/src/utility/boost-quote.ts')
| -rw-r--r-- | packages/frontend/src/utility/boost-quote.ts | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/packages/frontend/src/utility/boost-quote.ts b/packages/frontend/src/utility/boost-quote.ts index feb949772b..b5d2c7e6fe 100644 --- a/packages/frontend/src/utility/boost-quote.ts +++ b/packages/frontend/src/utility/boost-quote.ts @@ -3,11 +3,13 @@ * SPDX-License-Identifier: AGPL-3.0-only */ -import { ref, Ref, computed, ComputedRef } from 'vue'; +import { ref, computed } from 'vue'; import * as Misskey from 'misskey-js'; +import type { Ref, ComputedRef } from 'vue'; +import type { MenuItem } from '@/types/menu.js'; import { i18n } from '@/i18n.js'; -import { defaultStore } from '@/store.js'; -import { MenuItem } from '@/types/menu.js'; +import { prefer } from '@/preferences'; +import { store } from '@/store.js'; /* this script should eventually contain all Sharkey-specific bits of @@ -30,7 +32,7 @@ export function visibilityIsAtLeast(a: Visibility | string, b: Visibility | stri } export function boostMenuItems(appearNote: Ref<Misskey.entities.Note>, renote: (v: Visibility, l: boolean) => void): MenuItem[] { - const localOnly = ref(defaultStore.state.rememberNoteVisibility ? defaultStore.state.localOnly : defaultStore.state.defaultNoteLocalOnly); + const localOnly = ref(prefer.s.rememberNoteVisibility ? store.s.localOnly : prefer.s.defaultNoteLocalOnly); const effectiveVisibility = ( appearNote.value.channel?.isSensitive ? smallerVisibility(appearNote.value.visibility, 'home') @@ -83,7 +85,7 @@ export function boostMenuItems(appearNote: Ref<Misskey.entities.Note>, renote: ( 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; + if (prefer.s.showVisibilitySelectorOnBoost) return i18n.ts.renote; return i18n.ts.renoteShift; }); } |