Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc23dbeb69 | ||
|
|
102ce9b909 | ||
|
|
3dddf1f12b |
@@ -484,7 +484,8 @@
|
|||||||
.documents-table th,
|
.documents-table th,
|
||||||
.documents-table td {
|
.documents-table td {
|
||||||
padding: 0.6rem 0.75rem;
|
padding: 0.6rem 0.75rem;
|
||||||
text-align: right;
|
/* Every column — labels and row content alike — is centred in the RTL table. */
|
||||||
|
text-align: center;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
border-bottom: 1px solid var(--color-card-border);
|
border-bottom: 1px solid var(--color-card-border);
|
||||||
/* Fixed layout fits the card; wrap long tokens so a cell never widens the table. */
|
/* Fixed layout fits the card; wrap long tokens so a cell never widens the table. */
|
||||||
@@ -509,6 +510,7 @@
|
|||||||
*/
|
*/
|
||||||
.documents-actions {
|
.documents-actions {
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
|
justify-content: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -555,8 +555,8 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="px-3 py-2.5 align-top">
|
<td class="px-3 py-2.5 align-top">
|
||||||
@if (doc.status === 'ready' && !isReviewNeeded(doc) && isAdmin()) {
|
@if (doc.status === 'ready' && !isReviewNeeded(doc) && isAdmin()) {
|
||||||
@if (togglingDocId() === doc.id) {
|
@if (togglingDocId() === doc.id) {
|
||||||
<div class="flex items-center gap-1.5 text-xs text-[var(--text-muted)]">
|
<div class="flex items-center justify-center gap-1.5 text-xs text-[var(--text-muted)]">
|
||||||
<svg
|
<svg
|
||||||
class="w-3 h-3 animate-spin"
|
class="w-3 h-3 animate-spin"
|
||||||
viewBox="0 0 24 24"
|
viewBox="0 0 24 24"
|
||||||
|
|||||||
@@ -166,6 +166,26 @@ describe('SettingsPage — document filters', () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('centres the documents table headers and row cells', () => {
|
||||||
|
// Regression: headers and cells both inherited the `text-align: right` of the
|
||||||
|
// RTL table, leaving the whole table visually skewed to one side.
|
||||||
|
const fixture = TestBed.createComponent(SettingsPage);
|
||||||
|
fixture.detectChanges();
|
||||||
|
const el = fixture.nativeElement as HTMLElement;
|
||||||
|
|
||||||
|
const headers = Array.from(el.querySelectorAll('.documents-table thead th'));
|
||||||
|
expect(headers.length).toBe(6);
|
||||||
|
for (const header of headers) {
|
||||||
|
expect(getComputedStyle(header).textAlign).toBe('center');
|
||||||
|
}
|
||||||
|
|
||||||
|
const cells = Array.from(el.querySelectorAll('.documents-table tbody td'));
|
||||||
|
expect(cells.length).toBe(6);
|
||||||
|
for (const cell of cells) {
|
||||||
|
expect(getComputedStyle(cell).textAlign).toBe('center');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
it('confirms before removing: the bin button opens a modal, cancel keeps the doc, confirm shows the MVP notice', () => {
|
it('confirms before removing: the bin button opens a modal, cancel keeps the doc, confirm shows the MVP notice', () => {
|
||||||
const fixture = TestBed.createComponent(SettingsPage);
|
const fixture = TestBed.createComponent(SettingsPage);
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|||||||
Reference in New Issue
Block a user