From 61f5c545953bb4ee20b123bf9671ac35d7f1f3c1 Mon Sep 17 00:00:00 2001 From: "Somhairle H. Marisol" Date: Fri, 18 Sep 2026 12:03:32 +0800 Subject: [变更性质] feat(frontend) [新增功能] round3 页面组件全量迁移 shadcn-svelte(12 页面 + Modal/DatasetWizard/DatasetCard/Status) [实现方案] .btn→Button、.banner→Alert、table.data→Table.Root、.badge→Badge、.tabs→Tabs.Root、.metric-card/form.card→Card.Root;ProjectStrategyTab div 配对修复 [影响范围] src/pages/*.svelte、src/components/*.svelte MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/AccountPage.svelte | 112 ++++++++++++++++++---------------- 1 file changed, 59 insertions(+), 53 deletions(-) (limited to 'frontend/src/pages/AccountPage.svelte') diff --git a/frontend/src/pages/AccountPage.svelte b/frontend/src/pages/AccountPage.svelte index ef6d1a3..9e90e78 100644 --- a/frontend/src/pages/AccountPage.svelte +++ b/frontend/src/pages/AccountPage.svelte @@ -6,6 +6,12 @@ import { extractStatusMessage } from '../lib/state'; import { fmtDateTime } from '../lib/format'; import type { SessionInfo } from '../lib/types'; + import { Button } from '$lib/components/ui/button'; + import { Input } from '$lib/components/ui/input'; + import { Label } from '$lib/components/ui/label'; + import * as Card from '$lib/components/ui/card'; + import { Badge } from '$lib/components/ui/badge'; + import * as Table from '$lib/components/ui/table'; let nameInput = $state(session.me?.name ?? ''); let profileBusy = $state(false); @@ -99,91 +105,91 @@
-
-

个人信息

+ + 个人信息
- +
+ + +
邮箱 -
{session.me?.email ?? '—'}
+
{session.me?.email ?? "—"}
角色
{session.me?.role === 'admin' ? '管理员' : '成员'}{session.me?.active === false ? ' · 已停用' : ''}
- +
-
+ -
-

修改密码

+ + 修改密码
- - - +
+ + +
+
+ + +
+
+ + +
- +
-
+ -
-

登录会话

+ + 登录会话 {#if !sessBusy && !sessErr && sessions.length === 0} {/if} {#if sessions.length > 0} - - - - - - - - - - + + + + 创建 + 最近活跃 + 设备/UA + + + + {#each sessions as s (s.id)} - - - - - - + + {/each} - -
创建最近活跃设备/UA
{fmtDateTime(s.created_at)}{fmtDateTime(s.last_seen_at)}{s.user_agent?.slice(0, 60) ?? '—'} + + {fmtDateTime(s.created_at)} + {fmtDateTime(s.last_seen_at)} + {s.user_agent?.slice(0, 60) ?? '—'} +
- {#if s.current}当前会话{/if} - +
-
+ + {/if}

更改密码或被管理员停用时,其他会话将自动失效。

-
+
-
+ \ No newline at end of file -- cgit v1.2.3