serve frontend

This commit is contained in:
2025-05-15 12:47:15 +08:00
parent d6fea884cf
commit 578aab36c3
24 changed files with 400 additions and 155 deletions

View File

@@ -1,12 +1,19 @@
import {User} from "./network/models.ts";
interface MyWindow extends Window {
serverName?: string;
cloudflareTurnstileSiteKey?: string;
}
class App {
appName = "资源库"
appName = "Nysoure"
user: User | null = null;
token: string | null = null;
cloudflareTurnstileSiteKey: string | null = null;
constructor() {
this.init();
}
@@ -20,6 +27,8 @@ class App {
if (tokenJson) {
this.token = JSON.parse(tokenJson);
}
this.appName = (window as MyWindow).serverName || this.appName;
this.cloudflareTurnstileSiteKey = (window as MyWindow).cloudflareTurnstileSiteKey || null;
}
saveData() {