2026-02-17 19:19:54 +00:00
|
|
|
import { defineStore } from 'pinia'
|
|
|
|
|
import { ref } from 'vue'
|
|
|
|
|
|
|
|
|
|
/** Signals that we just logged in - Dashboard uses this for zoom + oomph */
|
|
|
|
|
export const useLoginTransitionStore = defineStore('loginTransition', () => {
|
|
|
|
|
const justLoggedIn = ref(false)
|
2026-04-22 04:45:33 -04:00
|
|
|
/**
|
|
|
|
|
* True only when the user just finished the onboarding wizard
|
|
|
|
|
* (first password setup), as distinct from a regular re-login.
|
|
|
|
|
* Dashboard uses this to decide whether to play the full glitchy
|
|
|
|
|
* reveal vs just a quick interface-draw.
|
|
|
|
|
*/
|
|
|
|
|
const justCompletedOnboarding = ref(false)
|
2026-02-17 19:19:54 +00:00
|
|
|
/** Show empty welcome block until typing starts (hide static text) */
|
|
|
|
|
const pendingWelcomeTyping = ref(false)
|
|
|
|
|
/** Trigger welcome typing on Home - set true after dashboard animation finishes */
|
|
|
|
|
const startWelcomeTyping = ref(false)
|
|
|
|
|
|
|
|
|
|
function setJustLoggedIn(value: boolean) {
|
|
|
|
|
justLoggedIn.value = value
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-22 04:45:33 -04:00
|
|
|
function setJustCompletedOnboarding(value: boolean) {
|
|
|
|
|
justCompletedOnboarding.value = value
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-17 19:19:54 +00:00
|
|
|
function setPendingWelcomeTyping(value: boolean) {
|
|
|
|
|
pendingWelcomeTyping.value = value
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function setStartWelcomeTyping(value: boolean) {
|
|
|
|
|
startWelcomeTyping.value = value
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
justLoggedIn,
|
|
|
|
|
setJustLoggedIn,
|
2026-04-22 04:45:33 -04:00
|
|
|
justCompletedOnboarding,
|
|
|
|
|
setJustCompletedOnboarding,
|
2026-02-17 19:19:54 +00:00
|
|
|
pendingWelcomeTyping,
|
|
|
|
|
setPendingWelcomeTyping,
|
|
|
|
|
startWelcomeTyping,
|
|
|
|
|
setStartWelcomeTyping,
|
|
|
|
|
}
|
|
|
|
|
})
|