feat: add introduce
This commit is contained in:
parent
521ad7a332
commit
4885b165df
6 changed files with 87 additions and 1 deletions
|
@ -1,5 +1,10 @@
|
|||
import { STORAGE_KEY_FIRST_VISIT } from '~/constants'
|
||||
|
||||
export const isFirstVisit = useLocalStorage(STORAGE_KEY_FIRST_VISIT, true)
|
||||
|
||||
export const isUserSwitcherOpen = ref(false)
|
||||
export const isSigninDialogOpen = ref(false)
|
||||
export const isPreviewHelpOpen = ref(isFirstVisit.value)
|
||||
|
||||
export function openUserSwitcher() {
|
||||
isUserSwitcherOpen.value = true
|
||||
|
@ -9,3 +14,13 @@ export function openSigninDialog() {
|
|||
isSigninDialogOpen.value = true
|
||||
isUserSwitcherOpen.value = false
|
||||
}
|
||||
|
||||
export function openPreviewHelp() {
|
||||
isPreviewHelpOpen.value = true
|
||||
}
|
||||
|
||||
if (isPreviewHelpOpen.value) {
|
||||
watch(isPreviewHelpOpen, () => {
|
||||
isFirstVisit.value = false
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue