fix(admin): center message actions with balanced cell padding

Center the operations heading and row buttons, with 20px padding on both
sides of the cell. Add a regression contract for alignment and spacing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
kate522andClaude Fable 5 committed 2026-10-30 17:56:31 +08:00
1 parent 479b324f95
commit f208424a26
2 files changed
+5 -2

No files matched your search

+2 -2
View File
@@ -24,7 +24,7 @@
.aksrt-messages-admin__table .column-user { width: 16%; }
.aksrt-messages-admin__table .column-read { width: 8%; }
.aksrt-messages-admin__table .column-time { width: 16%; }
.aksrt-messages-admin__table .column-actions { width: 18%; text-align: right; }
.aksrt-messages-admin .aksrt-messages-admin__table .column-actions { width: 18%; padding-left: 20px; padding-right: 20px; text-align: center; }
.aksrt-messages-admin__table td { vertical-align: middle; }
.aksrt-messages-admin__table .row-title { font-weight: 600; word-break: break-word; line-height: 1.5; }
.aksrt-messages-admin__table tr.is-unread .row-title { font-weight: 700; }
@@ -32,7 +32,7 @@
.aksrt-messages-admin__table tr.is-selected > td,
.aksrt-messages-admin__table tr.is-selected > th { background: var(--an-primary-soft); }
.aksrt-messages-admin__desc { margin-top: 3px; color: var(--an-text-2); word-break: break-word; }
.aksrt-msg-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 12px; }
.aksrt-msg-row-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 12px; }
.aksrt-msg-row-actions button { padding: 0; font-size: 12px; text-decoration: none; white-space: nowrap; }
/* 类型徽章(可点击筛选) */
@@ -96,6 +96,9 @@ test('message row actions live only in a dedicated rightmost operations column',
assert.match(cells[6], /data-aksrt-msg-action="delete"/);
});
assert.match(empty, /colspan="7"/);
const css = read('assets/css/admin/messages.css');
assert.match(css, /\.aksrt-messages-admin \.aksrt-messages-admin__table \.column-actions\s*\{[^}]*padding-left:\s*20px;[^}]*padding-right:\s*20px;[^}]*text-align:\s*center;/);
assert.match(css, /\.aksrt-msg-row-actions\s*\{[^}]*justify-content:\s*center;/);
});
test('details preserve full content, escape HTML and unsafe links, and never mark read', () => {