feat: first time user spotlight animation (#3977)

This commit is contained in:
Nivedin
2024-04-22 12:21:30 +05:30
committed by GitHub
parent 18652ce400
commit 0e2887b4e9
11 changed files with 327 additions and 78 deletions

View File

@@ -73,7 +73,7 @@ import { useI18n } from "~/composables/i18n"
import { useToast } from "~/composables/toast"
import { InvocationTriggers, defineActionHandler } from "~/helpers/actions"
import { hookKeybindingsListener } from "~/helpers/keybindings"
import { applySetting } from "~/newstore/settings"
import { applySetting, toggleSetting } from "~/newstore/settings"
import { platform } from "~/platform"
import { HoppSpotlightSessionEventData } from "~/platform/analytics"
import { PersistenceService } from "~/services/persistence"
@@ -97,6 +97,8 @@ const t = useI18n()
const persistenceService = useService(PersistenceService)
const spotlightService = useService(SpotlightService)
const HAS_OPENED_SPOTLIGHT = useSetting("HAS_OPENED_SPOTLIGHT")
onBeforeMount(() => {
if (!mdAndLarger.value) {
rightSidebar.value = false
@@ -160,6 +162,7 @@ defineActionHandler("modals.search.toggle", (_, trigger) => {
})
showSearch.value = !showSearch.value
!HAS_OPENED_SPOTLIGHT.value && toggleSetting("HAS_OPENED_SPOTLIGHT")
})
defineActionHandler("modals.support.toggle", () => {