feat: 用安装页和编排完成部署,并整理登录页
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
export let installed: boolean | null = null;
|
||||
|
||||
export async function refreshInstalled() {
|
||||
const response = await fetch("/api/install/status");
|
||||
installed = Boolean((await response.json()).installed);
|
||||
return installed;
|
||||
}
|
||||
|
||||
export function markInstalled() {
|
||||
installed = true;
|
||||
}
|
||||
@@ -22,3 +22,9 @@ export function setThemeChoice(choice: ThemeChoice) {
|
||||
themeChoice.value = choice;
|
||||
localStorage.setItem(STORAGE_KEY, choice);
|
||||
}
|
||||
|
||||
export function cycleTheme() {
|
||||
const order: ThemeChoice[] = ["system", "dark", "light"];
|
||||
const index = order.indexOf(themeChoice.value);
|
||||
setThemeChoice(order[(index + 1) % order.length]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user