From b61bd493653fed88f1491d99febb0c0eef7d41c7 Mon Sep 17 00:00:00 2001 From: TheMeinerLP Date: Sat, 28 Nov 2026 18:13:54 +0100 Subject: [PATCH 1/3] fix(ui): draw the account and settings errors with the shared alert Password, second factor, backup and domain settings messages were hand-built paragraphs, so they looked and announced differently from the other dashboard errors. They now use MdAlert in the error tone, so a failed load or refused change is announced once, with the same container everywhere. --- .../components/account/PasswordCard.test.ts | 2 + .../src/components/account/PasswordCard.vue | 9 +-- .../account/SecondFactorsCard.test.ts | 54 ++++++++++++++++ .../components/account/SecondFactorsCard.vue | 32 +++++----- .../maintenance/SettingsBackupPanel.test.ts | 62 +++++++++++++++++++ .../maintenance/SettingsBackupPanel.vue | 9 +-- .../settings/DomainSettingsPanel.test.ts | 54 ++++++++++++++++ .../settings/DomainSettingsPanel.vue | 9 +-- 8 files changed, 203 insertions(+), 28 deletions(-) create mode 100644 reposilite-frontend/src/components/maintenance/SettingsBackupPanel.test.ts create mode 100644 reposilite-frontend/src/components/settings/DomainSettingsPanel.test.ts diff --git a/reposilite-frontend/src/components/account/PasswordCard.test.ts b/reposilite-frontend/src/components/account/PasswordCard.test.ts index c820057128..df90b9b61b 100644 --- a/reposilite-frontend/src/components/account/PasswordCard.test.ts +++ b/reposilite-frontend/src/components/account/PasswordCard.test.ts @@ -152,6 +152,8 @@ describe('PasswordCard', () => { await submit() expect(wrapper.find('[role="alert"]').text()).toContain('The current password is wrong') + expect(wrapper.find('[data-ingot-component="md-alert"]').attributes('data-tone'), 'the wrong password is drawn with the error tone').toBe('error') + expect(wrapper.find('[data-ingot-component="md-alert"]').attributes('data-ingot-state'), 'the error alert carries the error state').toBe('error') expect(toast.success).not.toHaveBeenCalled() expect(wrapper.find('#account-new-password').element.value, 'the new password stays for another try').toBe('new-password-123') }) diff --git a/reposilite-frontend/src/components/account/PasswordCard.vue b/reposilite-frontend/src/components/account/PasswordCard.vue index 30c4f2396c..9dde3ee9c2 100644 --- a/reposilite-frontend/src/components/account/PasswordCard.vue +++ b/reposilite-frontend/src/components/account/PasswordCard.vue @@ -17,6 +17,7 @@