fix: report
This commit is contained in:
1 parent
07e83132c0
commit
4445ff68d4
46 files changed
+3904
-897
No files matched your search
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/**
|
||||
* shared/styles/components-ds.css
|
||||
* 设计系统组件样式(按钮、表格、表单等)。
|
||||
*/
|
||||
@@ -394,6 +394,42 @@
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.admin-report-table--compact tbody td {
|
||||
@apply align-middle py-2;
|
||||
line-height: 1.25rem;
|
||||
}
|
||||
|
||||
/* 反馈表必须为操作列保留横向按钮空间;内容详情始终由浮层承载,避免撑高数据行。 */
|
||||
.admin-report-table--feedback {
|
||||
min-width: 58rem;
|
||||
}
|
||||
|
||||
.admin-report-table--feedback th:last-child,
|
||||
.admin-report-table--feedback td:last-child {
|
||||
min-width: 7rem;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.admin-report-feedback-action {
|
||||
@apply inline-flex items-center justify-center whitespace-nowrap px-2.5 py-1;
|
||||
min-width: 6rem;
|
||||
}
|
||||
|
||||
.admin-report-feedback-content-trigger {
|
||||
@apply w-full max-w-full truncate rounded px-0.5 py-0.5 text-left text-sm text-secondary transition-colors;
|
||||
}
|
||||
|
||||
.admin-report-feedback-content-trigger:hover,
|
||||
.admin-report-feedback-content-trigger:focus-visible {
|
||||
@apply text-brand-700 outline-none;
|
||||
background-color: color-mix(in srgb, #0ea5e9 8%, transparent);
|
||||
}
|
||||
|
||||
.admin-report-feedback-content-popover {
|
||||
@apply absolute left-0 top-full z-30 mt-1 max-h-48 w-72 overflow-auto whitespace-pre-wrap break-words rounded-xl border border-default p-3 text-sm text-secondary shadow-elevated;
|
||||
background-color: var(--bg-surface);
|
||||
}
|
||||
|
||||
.admin-report-filter-input {
|
||||
@apply w-full max-w-full min-w-0 box-border px-1.5 py-1 text-xs border rounded outline-none font-normal normal-case;
|
||||
border-color: var(--border-default);
|
||||
@@ -442,6 +478,16 @@
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
/* 应用运营汇总卡:激活(被点击)时更深蓝高亮 */
|
||||
.app-ops-summary-card {
|
||||
@apply cursor-pointer;
|
||||
}
|
||||
.app-ops-summary-card--active {
|
||||
border-color: color-mix(in srgb, #2563eb 45%, var(--border-default));
|
||||
background-color: color-mix(in srgb, #2563eb 14%, var(--bg-surface));
|
||||
box-shadow: 0 0 0 1px color-mix(in srgb, #2563eb 35%, transparent);
|
||||
}
|
||||
|
||||
.admin-report-panel {
|
||||
@apply p-4 md:p-5 rounded-2xl border border-default shadow-sm;
|
||||
background-color: var(--bg-surface);
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* shared/utils/user-avatar.ts
|
||||
* 用途:统一生成用户头像中的姓名缩写。
|
||||
* 依赖:用户对象的 real_name 与 username 字段。
|
||||
* 逻辑:优先显示真实姓名最后两个 Unicode 字符;无真实姓名时回退到账号首字母。
|
||||
*/
|
||||
|
||||
/**
|
||||
* 生成用户头像文字,供用户管理和个人中心等用户头像展示位置复用。
|
||||
* @param user 用户信息,必须包含 username,可选 real_name。
|
||||
* @returns 真实姓名后两个字符;姓名不足两字时返回全部姓名;无姓名时返回账号首字母。
|
||||
*/
|
||||
export function getUserAvatarLabel(user: { real_name?: string | null; username?: string | null }): string {
|
||||
const realName = String(user.real_name || '').trim();
|
||||
if (realName) return Array.from(realName).slice(-2).join('');
|
||||
return String(user.username || 'U').charAt(0).toUpperCase();
|
||||
}
|
||||
Reference in new issue
Block a user