-
-
+
+
+
-
-
+
+
{/if}
diff --git a/hub/filelib-web/src/lib/LoginView.svelte b/hub/filelib-web/src/lib/LoginView.svelte
index a5cf7f2..8b950f2 100644
--- a/hub/filelib-web/src/lib/LoginView.svelte
+++ b/hub/filelib-web/src/lib/LoginView.svelte
@@ -1,18 +1,13 @@
+
+
+ {@render children()}
+
+
+
diff --git a/hub/filelib-web/src/routes/+layout.ts b/hub/filelib-web/src/routes/+layout.ts
new file mode 100644
index 0000000..adc15e4
--- /dev/null
+++ b/hub/filelib-web/src/routes/+layout.ts
@@ -0,0 +1,7 @@
+/**
+ * 纯 SPA:关掉 SSR 与预渲染,构建产物只有一个 fallback index.html
+ * (adapter-static + fallback,见 svelte.config.js),由 hub 后端在
+ * /app 与 /database/* 两个前缀下原样送出。
+ */
+export const ssr = false;
+export const prerender = false;
diff --git a/hub/filelib-web/src/routes/+page.svelte b/hub/filelib-web/src/routes/+page.svelte
new file mode 100644
index 0000000..389dc3a
--- /dev/null
+++ b/hub/filelib-web/src/routes/+page.svelte
@@ -0,0 +1,11 @@
+
+
+
跳转中…
diff --git a/hub/filelib-web/src/routes/app/+page.svelte b/hub/filelib-web/src/routes/app/+page.svelte
new file mode 100644
index 0000000..26fd7c1
--- /dev/null
+++ b/hub/filelib-web/src/routes/app/+page.svelte
@@ -0,0 +1,22 @@
+
+
+
文件库
+
+{#if !$authChecked}
+
加载中…
+{:else if $me}
+
+
+
+{:else}
+
+{/if}
diff --git a/hub/filelib-web/src/routes/database/+page.svelte b/hub/filelib-web/src/routes/database/+page.svelte
new file mode 100644
index 0000000..eaa5117
--- /dev/null
+++ b/hub/filelib-web/src/routes/database/+page.svelte
@@ -0,0 +1,11 @@
+
+
+
跳转中…
diff --git a/hub/filelib-web/src/routes/database/admin/+page.svelte b/hub/filelib-web/src/routes/database/admin/+page.svelte
new file mode 100644
index 0000000..d7b2c8e
--- /dev/null
+++ b/hub/filelib-web/src/routes/database/admin/+page.svelte
@@ -0,0 +1,63 @@
+
+
+
Database Admin · 登录
+
+
+
+
Database Admin
+
使用飞书登录以管理数据库
+
+ {#if !$authChecked}
+
加载中…
+ {:else if info}
+
使用飞书登录
+
+ {#if info.devLoginEnabled}
+
+ 开发模式
+
+
+
⚡ 一键登录管理员
+
仅开发环境可见 · 跳过飞书 OAuth
+ {/if}
+ {:else if loadFailed}
+
无法加载登录配置,请稍后重试
+ {:else}
+
加载中…
+ {/if}
+
+
diff --git a/hub/filelib-web/src/routes/database/dashboard/+layout.svelte b/hub/filelib-web/src/routes/database/dashboard/+layout.svelte
new file mode 100644
index 0000000..655f099
--- /dev/null
+++ b/hub/filelib-web/src/routes/database/dashboard/+layout.svelte
@@ -0,0 +1,99 @@
+
+
+
Database Admin
+
+{#if !$authChecked}
+
加载中…
+{:else if $me === null}
+
跳转到登录页…
+{:else if !$me.isWebsiteAdmin}
+
+
+
无权访问管理后台
+
+ 当前账号不是本组织的所有者或管理员。普通老师请到文件库使用。
+
+
前往文件库
+
+
+
+{:else}
+
+
+
+
+ {@render children()}
+
+
+{/if}
diff --git a/hub/filelib-web/src/routes/database/dashboard/+page.svelte b/hub/filelib-web/src/routes/database/dashboard/+page.svelte
new file mode 100644
index 0000000..2654946
--- /dev/null
+++ b/hub/filelib-web/src/routes/database/dashboard/+page.svelte
@@ -0,0 +1,67 @@
+
+
+
+ 概览
+ 文件库实时数据
+
+ {#if error}
+ {error}
+ {:else}
+
+ {#each cards as card (card.label)}
+
+
{card.label}
+
{card.value ?? "—"}
+
+ {/each}
+
+
+
+
最近活动
+ {#if stats === null}
+
加载中…
+ {:else if stats.recent.length === 0}
+
暂无文件库活动 · 到「文件库」里创建第一个文件夹吧
+ {:else}
+ {#each stats.recent as row (row.action + row.when + row.label)}
+
+ {row.action}
+ {row.label}
+ {row.actor} · {fmtWhen(row.when)}
+
+ {/each}
+ {/if}
+
+ {/if}
+
diff --git a/hub/filelib-web/src/routes/database/dashboard/groups/+page.svelte b/hub/filelib-web/src/routes/database/dashboard/groups/+page.svelte
new file mode 100644
index 0000000..5f6de69
--- /dev/null
+++ b/hub/filelib-web/src/routes/database/dashboard/groups/+page.svelte
@@ -0,0 +1,10 @@
+
+
+
+
+
diff --git a/hub/filelib-web/src/routes/database/dashboard/library/+page.svelte b/hub/filelib-web/src/routes/database/dashboard/library/+page.svelte
new file mode 100644
index 0000000..e3c6512
--- /dev/null
+++ b/hub/filelib-web/src/routes/database/dashboard/library/+page.svelte
@@ -0,0 +1,8 @@
+
+
+
+
+
diff --git a/hub/filelib-web/src/routes/database/dashboard/search/+page.svelte b/hub/filelib-web/src/routes/database/dashboard/search/+page.svelte
new file mode 100644
index 0000000..6154d90
--- /dev/null
+++ b/hub/filelib-web/src/routes/database/dashboard/search/+page.svelte
@@ -0,0 +1,4 @@
+
diff --git a/hub/filelib-web/src/routes/database/dashboard/settings/+page.svelte b/hub/filelib-web/src/routes/database/dashboard/settings/+page.svelte
new file mode 100644
index 0000000..67201bb
--- /dev/null
+++ b/hub/filelib-web/src/routes/database/dashboard/settings/+page.svelte
@@ -0,0 +1,4 @@
+
diff --git a/hub/filelib-web/src/routes/database/dashboard/users/+page.svelte b/hub/filelib-web/src/routes/database/dashboard/users/+page.svelte
new file mode 100644
index 0000000..fbaede7
--- /dev/null
+++ b/hub/filelib-web/src/routes/database/dashboard/users/+page.svelte
@@ -0,0 +1,168 @@
+
+
+
+ 用户管理
+
+
+
+
+
+
成员列表
+
+ {#if error}
+
{error}
+ {:else if members === null}
+
加载中…
+ {:else if members.length === 0}
+
暂无成员
+ {:else}
+
+
+
+ | 成员 |
+ userId |
+ 角色 |
+ |
+
+
+
+ {#each members as m (m.userId)}
+
+ | {m.displayName || m.userId} |
+ {m.userId} |
+
+
+ |
+
+
+ |
+
+ {/each}
+
+
+ {/if}
+
+
+