将 web-admin 从子模块改为仓库内普通目录,便于单仓克隆与维护。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
2e9d020d50
commit
c87732fcd5
515 files changed
+74372
-1
No files matched your search
@@ -0,0 +1,14 @@
|
||||
/** 未设置头像时统一使用系统默认 logo(与登录页、侧栏 ArtLogo 一致) */
|
||||
export const DEFAULT_USER_AVATAR_URL = '/logo1.jpg'
|
||||
|
||||
/** @deprecated 各角色默认已统一为 logo,保留参数仅为兼容旧调用 */
|
||||
export function defaultAvatarPathByRole(_role: string | undefined): string {
|
||||
return DEFAULT_USER_AVATAR_URL
|
||||
}
|
||||
|
||||
/** 展示用头像:有自定义 URL 用自定义,否则用系统默认 logo */
|
||||
export function resolveUserAvatarUrl(avatarUrl: string | null | undefined, role: string | undefined): string {
|
||||
const u = avatarUrl != null ? String(avatarUrl).trim() : ''
|
||||
if (u) return u
|
||||
return defaultAvatarPathByRole(role)
|
||||
}
|
||||
Reference in new issue
Block a user