frontend: polish app launch and release experience
This commit is contained in:
17
neode-ui/src/utils/introSplash.ts
Normal file
17
neode-ui/src/utils/introSplash.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
export interface IntroSplashDecisionInput {
|
||||
seenIntro: boolean
|
||||
routePath: string
|
||||
fromBoot: boolean
|
||||
devMode?: string
|
||||
onboardingComplete: boolean | null
|
||||
}
|
||||
|
||||
export function shouldShowIntroSplash(input: IntroSplashDecisionInput): boolean {
|
||||
if (input.seenIntro) return false
|
||||
if (input.onboardingComplete === true) return false
|
||||
|
||||
const isDirectRoute = input.routePath !== '/'
|
||||
if (input.fromBoot) return true
|
||||
if (input.devMode === 'boot') return false
|
||||
return !isDirectRoute
|
||||
}
|
||||
Reference in New Issue
Block a user