fix: suppress login screen flash on load when already authenticated
Adds a synchronous inline script that checks localStorage before first paint and sets html.ns-authed, hiding #setup-screen via CSS immediately. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
43312be65d
commit
eeb822bbb2
2 files changed
+2
No files matched your search
@@ -19,6 +19,7 @@
|
|||||||
<script type="module" src="/src/main.js"></script>
|
<script type="module" src="/src/main.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<script>(function(){try{if(localStorage.getItem('ns_cfg'))document.documentElement.classList.add('ns-authed');}catch(e){}})()</script>
|
||||||
|
|
||||||
<!-- ─── SETUP ─── -->
|
<!-- ─── SETUP ─── -->
|
||||||
<div id="setup-screen">
|
<div id="setup-screen">
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ html,body{height:100%;font-family:var(--font);background:var(--bg);color:var(--t
|
|||||||
::-webkit-scrollbar{width:4px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--surface2);border-radius:2px}
|
::-webkit-scrollbar{width:4px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--surface2);border-radius:2px}
|
||||||
|
|
||||||
/* ── SETUP ── */
|
/* ── SETUP ── */
|
||||||
|
html.ns-authed #setup-screen{display:none}
|
||||||
#setup-screen{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;background:var(--bg);background-image:radial-gradient(ellipse 60% 50% at 30% 50%,rgba(232,160,32,.08) 0%,transparent 70%),radial-gradient(ellipse 40% 60% at 80% 30%,rgba(80,60,160,.1) 0%,transparent 70%)}
|
#setup-screen{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;background:var(--bg);background-image:radial-gradient(ellipse 60% 50% at 30% 50%,rgba(232,160,32,.08) 0%,transparent 70%),radial-gradient(ellipse 40% 60% at 80% 30%,rgba(80,60,160,.1) 0%,transparent 70%)}
|
||||||
.setup-card{width:min(420px,calc(100vw - 32px));background:var(--surface);border:1px solid var(--border2);border-radius:20px;padding:40px 36px;box-shadow:0 40px 80px rgba(0,0,0,.6),0 0 0 1px rgba(255,255,255,.04)}
|
.setup-card{width:min(420px,calc(100vw - 32px));background:var(--surface);border:1px solid var(--border2);border-radius:20px;padding:40px 36px;box-shadow:0 40px 80px rgba(0,0,0,.6),0 0 0 1px rgba(255,255,255,.04)}
|
||||||
.setup-logo{display:flex;align-items:center;gap:12px;margin-bottom:28px}
|
.setup-logo{display:flex;align-items:center;gap:12px;margin-bottom:28px}
|
||||||
|
|||||||
Reference in new issue
Block a user