fix: mobile onboarding viewport + filebrowser demo fixes
Onboarding: - Fixed viewport to use dvh units with position:fixed container - All views use scrollable glass containers that fit within viewport - Responsive typography and spacing (mobile-first breakpoints) - Tighter padding/margins on small screens - RootRedirect checks localStorage first for instant redirect - Spinner only appears after 500ms delay to avoid flash Filebrowser: - Fix CloudFolder null initialPath crash (watch both useNativeUI + section) - Remove unused `host` computed (was causing TS error) - Add mock GET /app/filebrowser/ landing page - Increase express.json limit to 50mb Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
<template>
|
||||
<div class="min-h-screen flex items-center justify-center bg-black/40">
|
||||
<div class="flex flex-col items-center gap-4">
|
||||
<svg class="animate-spin h-10 w-10 text-white/80" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
|
||||
<div class="min-h-full flex items-center justify-center">
|
||||
<div class="flex flex-col items-center gap-4 opacity-0 root-redirect-fade">
|
||||
<svg class="animate-spin h-8 w-8 text-white/60" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
|
||||
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
|
||||
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
|
||||
</svg>
|
||||
<p class="text-white/60 text-sm">Loading...</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -24,16 +23,33 @@ onMounted(async () => {
|
||||
return
|
||||
}
|
||||
|
||||
// Check localStorage first for instant redirect (avoids 5s timeout)
|
||||
const localComplete = localStorage.getItem('neode_onboarding_complete') === '1'
|
||||
if (localComplete) {
|
||||
router.replace('/login').catch(() => {})
|
||||
return
|
||||
}
|
||||
|
||||
let seenOnboarding = false
|
||||
try {
|
||||
const result = await Promise.race([
|
||||
isOnboardingComplete(),
|
||||
new Promise<boolean>((resolve) => setTimeout(() => resolve(false), 5000)),
|
||||
new Promise<boolean>((resolve) => setTimeout(() => resolve(false), 3000)),
|
||||
])
|
||||
seenOnboarding = result
|
||||
} catch {
|
||||
seenOnboarding = localStorage.getItem('neode_onboarding_complete') === '1'
|
||||
seenOnboarding = false
|
||||
}
|
||||
router.replace(seenOnboarding ? '/login' : '/onboarding/intro').catch(() => {})
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* Only show spinner after 500ms delay — most redirects happen instantly */
|
||||
.root-redirect-fade {
|
||||
animation: root-fade-in 0.3s ease 0.5s forwards;
|
||||
}
|
||||
@keyframes root-fade-in {
|
||||
to { opacity: 1; }
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user