From 672f05c66ac451902491137bce6f0f4d08269700 Mon Sep 17 00:00:00 2001 From: ymy Date: Fri, 31 Jul 2026 14:57:01 +0800 Subject: [PATCH] =?UTF-8?q?chore(filelib-web):=20=E5=B7=A6=E6=A0=8F?= =?UTF-8?q?=E5=8A=A0=E3=80=8C=E6=95=99=E7=A0=94=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E3=80=8D=E6=A0=87=E9=A2=98,=E7=94=A8=E6=88=B7=E8=BA=AB?= =?UTF-8?q?=E4=BB=BD+=E9=80=80=E5=87=BA=E7=A7=BB=E8=87=B3=E6=A0=8F?= =?UTF-8?q?=E5=BA=95,=E9=A1=B6=E6=A0=8F=E5=8E=BB=E6=8E=89=E8=BA=AB?= =?UTF-8?q?=E4=BB=BD=E5=8C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/lib/GridLibraryView.svelte | 12 ----- hub/filelib-web/src/routes/app/+page.svelte | 45 +++++++++++++------ 2 files changed, 32 insertions(+), 25 deletions(-) diff --git a/hub/filelib-web/src/lib/GridLibraryView.svelte b/hub/filelib-web/src/lib/GridLibraryView.svelte index 4edde8b..1dbcc80 100644 --- a/hub/filelib-web/src/lib/GridLibraryView.svelte +++ b/hub/filelib-web/src/lib/GridLibraryView.svelte @@ -11,7 +11,6 @@ import { onMount } from "svelte"; import { api } from "./api.js"; import { me, toastErr, toastOk } from "./stores.js"; - import { logout } from "./session.js"; import { selectedFilePath, clearSelectedFile } from "./browser.js"; import { ROLE_LABEL } from "./labels.js"; import type { FileEntry, NodeChild, NodeDetail, Role } from "./types.js"; @@ -61,7 +60,6 @@ currentFolder === null ? ($me?.isWebsiteAdmin ?? false) : atLeast(currentFolder.role, "EDIT"), ); const projectCanEdit = $derived(projectNode !== null && projectNode.role !== "VIEW"); - const initial = $derived(($me?.displayName ?? $me?.userId ?? "U").slice(0, 1).toUpperCase()); /* ------------------------------------------------------------ 数据加载 */ @@ -387,16 +385,6 @@ {/if} - -
- {initial} - {$me?.displayName ?? $me?.userId ?? ""} - -
diff --git a/hub/filelib-web/src/routes/app/+page.svelte b/hub/filelib-web/src/routes/app/+page.svelte index 9cb2e19..a1e071c 100644 --- a/hub/filelib-web/src/routes/app/+page.svelte +++ b/hub/filelib-web/src/routes/app/+page.svelte @@ -2,7 +2,7 @@ /** 老师端。未登录显示登录卡片;登录后是带左栏导航的文件库(ADR-0031)。 */ import { onMount } from "svelte"; import { me, authChecked } from "$lib/stores.js"; - import { loadSession } from "$lib/session.js"; + import { loadSession, logout } from "$lib/session.js"; import LoginView from "$lib/LoginView.svelte"; import GridLibraryView from "$lib/GridLibraryView.svelte"; import BinView from "$lib/BinView.svelte"; @@ -17,27 +17,46 @@ ["library", "文件库", "layers"], ["bin", "回收站", "trash"], ]; + + const initial = $derived(($me?.displayName ?? $me?.userId ?? "U").slice(0, 1).toUpperCase()); -文件库 +教研数据库 {#if !$authChecked}
加载中…
{:else if $me}
-