feat: optimize user management and add account deletion

This commit is contained in:
巫凤萍
2026-08-07 17:08:56 +08:00
parent 5670a7939b
commit 1f1887c860
5 changed files with 329 additions and 23 deletions

View File

@@ -2877,25 +2877,42 @@ label small {
.user-management-layout {
display: grid;
grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
gap: 18px;
grid-template-columns: 1fr;
gap: 16px;
min-width: 0;
}
.user-create-panel,
.user-list-panel {
align-self: start;
min-width: 0;
padding: 22px;
}
.user-create-form {
display: flex;
flex-direction: column;
margin-top: 24px;
display: grid;
gap: 12px;
align-items: end;
margin-top: 18px;
}
.user-create-form.with-role {
grid-template-columns: minmax(190px, 1.15fr) minmax(190px, 1fr) minmax(150px, 0.72fr) 132px;
}
.user-create-form.without-role {
grid-template-columns: minmax(190px, 1fr) minmax(190px, 1fr) 132px;
}
.user-create-form label {
min-width: 0;
margin-bottom: 0;
}
.user-create-form .primary-button {
width: 100%;
height: 45px;
margin-top: 3px;
height: 40px;
min-height: 40px;
}
.user-management-message {
@@ -2908,7 +2925,9 @@ label small {
}
.user-table {
margin-top: 18px;
width: 100%;
max-width: 100%;
margin-top: 16px;
border: 1px solid var(--line);
border-radius: 12px;
overflow: hidden;
@@ -2917,10 +2936,10 @@ label small {
.user-table-head,
.user-table-row {
display: grid;
grid-template-columns: minmax(130px, 1.4fr) minmax(90px, 0.8fr) minmax(90px, 0.8fr) 82px;
grid-template-columns: minmax(160px, 1.4fr) minmax(100px, 0.7fr) minmax(110px, 0.75fr) minmax(180px, auto);
gap: 12px;
align-items: center;
padding: 12px 14px;
padding: 14px 16px;
}
.user-table-head {
@@ -2934,6 +2953,10 @@ label small {
font-size: 10px;
}
.user-table-row:hover {
background: #fbfcfa;
}
.user-table-row > span:not(.role-pill) {
color: #84908c;
}
@@ -2958,6 +2981,77 @@ label small {
background: #e5f5ed;
}
.user-row-actions {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 8px;
}
.user-action-button {
min-height: 30px;
padding: 0 10px;
border: 1px solid #dce5e1;
border-radius: 8px;
color: var(--green-deep);
background: white;
font-size: 9px;
font-weight: 650;
}
.user-action-button:hover {
border-color: #a8cbbd;
background: #f4faf7;
}
.user-action-button.danger {
border-color: #efd7d3;
color: #a8473b;
}
.user-action-button.danger:hover {
border-color: #dfb5ae;
background: #fff7f5;
}
.danger-button {
display: inline-flex;
min-height: 38px;
align-items: center;
justify-content: center;
padding: 0 15px;
border: 1px solid #a83f34;
border-radius: 9px;
color: white;
background: #b94d41;
font-size: 11px;
font-weight: 650;
}
.danger-button:hover {
background: #9f3e34;
}
.danger-button:disabled {
cursor: wait;
opacity: 0.62;
}
.eyebrow.danger {
color: #b04b40;
}
.user-delete-warning {
margin: 0;
padding: 13px 14px;
border: 1px solid #f0dedb;
border-radius: 10px;
color: #7f5049;
background: #fff8f6;
font-size: 10px;
line-height: 1.65;
}
.toast {
position: fixed;
right: 24px;
@@ -3101,6 +3195,15 @@ label small {
.schedule-grid {
grid-template-columns: 1fr;
}
.user-create-form.with-role,
.user-create-form.without-role {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.user-create-form .primary-button {
align-self: end;
}
}
@media (max-width: 900px) {
@@ -3216,7 +3319,17 @@ label small {
.user-table-head,
.user-table-row {
min-width: 560px;
min-width: 660px;
}
.user-create-panel,
.user-list-panel {
padding: 18px;
}
.user-create-form.with-role,
.user-create-form.without-role {
grid-template-columns: 1fr;
}
.topbar {