refactor: unify user settings (#821)

Co-authored-by: 三咲智子 <sxzz@sxzz.moe>
This commit is contained in:
Anthony Fu 2023-01-06 18:39:37 +01:00 committed by GitHub
parent 35c9a871be
commit 1aa118283e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 105 additions and 61 deletions

View file

@ -1,6 +1,6 @@
import type { Attachment, Status, StatusEdit } from 'masto'
import type { Draft } from '~/types'
import { STORAGE_KEY_FIRST_VISIT, STORAGE_KEY_ZEN_MODE } from '~/constants'
import { STORAGE_KEY_FIRST_VISIT } from '~/constants'
export const mediaPreviewList = ref<Attachment[]>([])
export const mediaPreviewIndex = ref(0)
@ -11,7 +11,6 @@ export const dialogDraftKey = ref<string>()
export const commandPanelInput = ref('')
export const isFirstVisit = useLocalStorage(STORAGE_KEY_FIRST_VISIT, !process.mock)
export const isZenMode = useLocalStorage(STORAGE_KEY_ZEN_MODE, false)
export const isSigninDialogOpen = ref(false)
export const isPublishDialogOpen = ref(false)
@ -22,8 +21,6 @@ export const isCommandPanelOpen = ref(false)
export const lastPublishDialogStatus = ref<Status | null>(null)
export const toggleZenMode = useToggle(isZenMode)
export function openSigninDialog() {
isSigninDialogOpen.value = true
}