diff --git a/src/app/pages/settings/settings.page.css b/src/app/pages/settings/settings.page.css index 5592fbf..e4d7bc8 100644 --- a/src/app/pages/settings/settings.page.css +++ b/src/app/pages/settings/settings.page.css @@ -484,7 +484,8 @@ .documents-table th, .documents-table td { 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; border-bottom: 1px solid var(--color-card-border); /* Fixed layout fits the card; wrap long tokens so a cell never widens the table. */ @@ -509,6 +510,7 @@ */ .documents-actions { align-items: flex-start; + justify-content: center; flex-wrap: wrap; } diff --git a/src/app/pages/settings/settings.page.html b/src/app/pages/settings/settings.page.html index dd354d3..fb229cc 100644 --- a/src/app/pages/settings/settings.page.html +++ b/src/app/pages/settings/settings.page.html @@ -555,8 +555,8 @@ @if (doc.status === 'ready' && !isReviewNeeded(doc) && isAdmin()) { - @if (togglingDocId() === doc.id) { -
+ @if (togglingDocId() === doc.id) { +
{ } }); + 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', () => { const fixture = TestBed.createComponent(SettingsPage); fixture.detectChanges();