Skip to main content

Module profile

Module profile 

Source
Expand description

后台「个人资料」页面(/admin/profile)。

三个分区纵向排列:个人信息(头像、只读用户名、显示名称、邮箱,改动后才能保存)、 修改密码(当前密码、新密码与强度条、确认)、退出登录。username 是唯一登录凭据, 只读展示。启用 ADMIN_* 环境变量时顶部提示重启后以环境变量为准。保存成功后用 响应里的 PublicUser 刷新 UserContext,侧栏即时更新。密码强度条只在浏览器端 提示,不改变服务端校验。样式见 styles/pages/admin-profile.css。

Structs§

InfoSectionProps 🔒
Props for the InfoSection component.
PasswordSectionProps 🔒
Props for the PasswordSection component.
ProfileProps 🔒
Props for the Profile component.
ProfileRoute
个人资料路由(无 SSR 数据,资料在客户端读取)。

Constants§

MIN_PASSWORD 🔒
新密码最短字符数,与服务端校验一致。

Functions§

InfoSection 🔒
个人信息:头像、用户名、显示名称、邮箱。
PasswordSection 🔒
修改密码:当前密码、新密码(强度条)、确认新密码。
Profile 🔒
后台个人资料页面。
__ProfileRoute_View 🔒
password_hint 🔒
强度条下方的说明。
password_level 🔒
密码强度 0–4:空、不足 8 位、8–11 位、12 位以上、12 位以上且含符号。