优化个人中心与界面交互
This commit is contained in:
@@ -151,6 +151,13 @@ describe("permission management custom roles", () => {
|
||||
expect(source).not.toContain("project.members.manage");
|
||||
});
|
||||
|
||||
it("shows member names without avatar icons in the member management table", () => {
|
||||
const source = readSource();
|
||||
|
||||
expect(source).not.toContain("member-avatar");
|
||||
expect(source).not.toContain("memberInitial(row.full_name)");
|
||||
});
|
||||
|
||||
it("uses QA and CTA as preset project permission role keys", () => {
|
||||
const source = readSource();
|
||||
|
||||
|
||||
@@ -84,7 +84,6 @@
|
||||
<el-table-column prop="full_name" label="姓名" min-width="140">
|
||||
<template #default="{ row }">
|
||||
<div class="member-name-cell">
|
||||
<span class="member-avatar">{{ (row.full_name || '?')[0] }}</span>
|
||||
<span class="member-name">{{ row.full_name }}</span>
|
||||
</div>
|
||||
</template>
|
||||
@@ -1782,21 +1781,6 @@ onMounted(async () => {
|
||||
.member-name-cell {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.member-avatar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 8px;
|
||||
background: linear-gradient(135deg, #6366f1, #8b5cf6);
|
||||
color: #fff;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.member-name {
|
||||
|
||||
@@ -32,6 +32,14 @@ describe("Admin users table layout", () => {
|
||||
expect(viewSource).toContain("width: 28px;");
|
||||
expect(viewSource).toContain("gap: 4px;");
|
||||
});
|
||||
|
||||
it("shows names without avatar icons in the account management table", () => {
|
||||
const viewSource = readUsersView();
|
||||
|
||||
expect(viewSource).not.toContain("user-avatar");
|
||||
expect(viewSource).not.toContain("getInitials(scope.row.full_name)");
|
||||
expect(viewSource).not.toContain("linear-gradient(135deg, #3f8f6b, #2d7a5a)");
|
||||
});
|
||||
});
|
||||
|
||||
describe("Admin users summary header", () => {
|
||||
|
||||
@@ -87,9 +87,6 @@
|
||||
<el-table-column :label="TEXT.common.fields.name" width="360">
|
||||
<template #default="scope">
|
||||
<div class="user-cell">
|
||||
<div class="user-avatar" :class="'avatar--' + (scope.row.status || '').toLowerCase()">
|
||||
{{ getInitials(scope.row.full_name) }}
|
||||
</div>
|
||||
<div class="user-info">
|
||||
<span class="user-name">{{ scope.row.full_name }}</span>
|
||||
<span class="user-email">{{ scope.row.email }}</span>
|
||||
@@ -195,13 +192,6 @@ const activeCount = computed(() => allUsers.value.filter(u => u.status === 'ACTI
|
||||
const pendingCount = computed(() => allUsers.value.filter(u => u.status === 'PENDING').length);
|
||||
const disabledCount = computed(() => allUsers.value.filter(u => u.status === 'DISABLED').length);
|
||||
|
||||
const getInitials = (name: string) => {
|
||||
if (!name) return '?';
|
||||
const parts = name.trim().split(/\s+/);
|
||||
if (parts.length >= 2) return (parts[0][0] + parts[1][0]).toUpperCase();
|
||||
return name.slice(0, 2).toUpperCase();
|
||||
};
|
||||
|
||||
const statusType = (status: string) => {
|
||||
switch (status) {
|
||||
case "ACTIVE": return "success";
|
||||
@@ -487,37 +477,6 @@ onBeforeUnmount(() => {
|
||||
.user-cell {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.user-avatar {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
color: #fff;
|
||||
flex-shrink: 0;
|
||||
background: var(--ctms-primary);
|
||||
}
|
||||
|
||||
.user-avatar.avatar--active {
|
||||
background: linear-gradient(135deg, #3f8f6b, #2d7a5a);
|
||||
}
|
||||
|
||||
.user-avatar.avatar--pending {
|
||||
background: linear-gradient(135deg, #c58b2a, #a87420);
|
||||
}
|
||||
|
||||
.user-avatar.avatar--disabled {
|
||||
background: linear-gradient(135deg, #94a3b8, #64748b);
|
||||
}
|
||||
|
||||
.user-avatar.avatar--rejected {
|
||||
background: linear-gradient(135deg, #c24b4b, #a83a3a);
|
||||
}
|
||||
|
||||
.user-info {
|
||||
|
||||
Reference in New Issue
Block a user