From c9ca1dd3f13cfe6211fbc313d84f44e26a424dd7 Mon Sep 17 00:00:00 2001 From: Marie Date: Mon, 1 Jan 2024 20:34:18 +0100 Subject: upd: add boost settings --- .../frontend/src/components/MkNoteDetailed.vue | 64 ++++++++++++---------- 1 file changed, 34 insertions(+), 30 deletions(-) (limited to 'packages/frontend/src/components/MkNoteDetailed.vue') diff --git a/packages/frontend/src/components/MkNoteDetailed.vue b/packages/frontend/src/components/MkNoteDetailed.vue index 6558e24630..4da72898a4 100644 --- a/packages/frontend/src/components/MkNoteDetailed.vue +++ b/packages/frontend/src/components/MkNoteDetailed.vue @@ -441,39 +441,43 @@ function smallerVisibility(a: Visibility | string, b: Visibility | string): Visi } function boostVisibility() { - os.popupMenu([ - { - type: 'button', - icon: 'ph-globe-hemisphere-west ph-bold ph-lg', - text: i18n.ts._visibility['public'], - action: () => { - renote('public'); - }, - }, - { - type: 'button', - icon: 'ph-house ph-bold ph-lg', - text: i18n.ts._visibility['home'], - action: () => { - renote('home'); + if (!defaultStore.state.showVisibilitySelectorOnBoost) { + renote(defaultStore.state.visibilityOnBoost); + } else { + os.popupMenu([ + { + type: 'button', + icon: 'ph-globe-hemisphere-west ph-bold ph-lg', + text: i18n.ts._visibility['public'], + action: () => { + renote('public'); + }, }, - }, - { - type: 'button', - icon: 'ph-lock ph-bold ph-lg', - text: i18n.ts._visibility['followers'], - action: () => { - renote('followers'); + { + type: 'button', + icon: 'ph-house ph-bold ph-lg', + text: i18n.ts._visibility['home'], + action: () => { + renote('home'); + }, }, - }, - { - type: 'button', - icon: 'ph-planet ph-bold ph-lg', - text: i18n.ts._timelines.local, - action: () => { - renote('local'); + { + type: 'button', + icon: 'ph-lock ph-bold ph-lg', + text: i18n.ts._visibility['followers'], + action: () => { + renote('followers'); + }, }, - }], renoteButton.value); + { + type: 'button', + icon: 'ph-planet ph-bold ph-lg', + text: i18n.ts._timelines.local, + action: () => { + renote('local'); + }, + }], renoteButton.value); + } } function renote(visibility: Visibility | 'local') { -- cgit v1.2.3-freya