调整文件结构;跑通admin端;初步设计页面结构

This commit is contained in:
2026-01-22 18:19:15 +08:00
parent 67ef2d6d6d
commit 2b0ee0c8b6
31 changed files with 5798 additions and 198 deletions

View File

@@ -3,14 +3,19 @@ import { SUPA_URL, SUPA_KEY } from '@/ak/config.uts'
const supa = new AkSupa(SUPA_URL, SUPA_KEY)
// Do not perform hard-coded auto sign-in during page preload (development mode may preload pages).
// Instead, mark supa as ready if an existing session is present; otherwise defer sign-in to explicit user action.
const supaReady: Promise<boolean> = (async () => {
try {
// await supa.signIn('akoo@163.com', 'Hf2152111')
await supa.signIn('am@163.com', 'kookoo')
return true
const sess = supa.getSession();
if (sess != null && sess.session != null) {
return true;
}
// No session found — do not auto sign-in with hard-coded credentials.
return true;
} catch (err) {
console.error('Supabase auto sign-in failed', err)
return false
console.error('Supabase instance init failed', err)
return false;
}
})()