From 71cac325a4ae40ca33c051944a36d3180625368d Mon Sep 17 00:00:00 2001 From: Patrick Schiller Date: Thu, 3 Dec 2026 23:58:47 +0100 Subject: [PATCH] fix: update settings footer attribution Signed-off-by: Patrick Schiller --- apps/web/src/app/AppShell.spec.tsx | 47 +++++++++++++++--------------- apps/web/src/app/i18n.tsx | 4 +-- 2 files changed, 26 insertions(+), 25 deletions(-) diff --git a/apps/web/src/app/AppShell.spec.tsx b/apps/web/src/app/AppShell.spec.tsx index 69b2b00..8a82c3f 100644 --- a/apps/web/src/app/AppShell.spec.tsx +++ b/apps/web/src/app/AppShell.spec.tsx @@ -48,6 +48,7 @@ vi.mock('./ThemeToggle', () => ({ describe('AppShell', () => { afterEach(() => { delete runtimeWindow.__OPENClockwork_CONFIG__; + vi.restoreAllMocks(); }); it('keeps the demo notice within the available page width', () => { @@ -132,25 +133,30 @@ describe('AppShell', () => { expect(screen.queryByRole('menu')).toBeNull(); }); - it('shows the attribution footer on admin routes only', () => { - const { unmount } = render( - - - }> - Approval inbox} /> - - - , + describe.each([ + { locale: 'de', versionLabel: 'OpenClockwork-Version' }, + { locale: 'en', versionLabel: 'OpenClockwork version' }, + ])('attribution footer in $locale', ({ locale, versionLabel }) => { + it.each(['/settings', '/admin/requests'])( + 'shows the attribution and version on %s', + (path) => { + vi.spyOn(navigator, 'languages', 'get').mockReturnValue([locale]); + render( + + + , + ); + + const footer = screen.getByRole('contentinfo'); + expect(Array.from(footer.children, (line) => line.textContent)).toEqual([ + 'Crafted with ❤️ in Würzburg by Patrick & AI', + `${versionLabel} ${APP_VERSION}`, + ]); + }, ); + }); - expect( - screen.getByText('Crafted with ❤️ in Würzburg by Patrick Schiller'), - ).toBeDefined(); - expect( - screen.getByText(`OpenClockwork-Version ${APP_VERSION}`), - ).toBeDefined(); - - unmount(); + it('omits the attribution footer on the dashboard', () => { render( @@ -161,12 +167,7 @@ describe('AppShell', () => { , ); - expect( - screen.queryByText('Crafted with ❤️ in Würzburg by Patrick Schiller'), - ).toBeNull(); - expect( - screen.queryByText(`OpenClockwork-Version ${APP_VERSION}`), - ).toBeNull(); + expect(screen.queryByRole('contentinfo')).toBeNull(); }); it('constrains full Solo bottom labels in five narrow columns without shrinking touch targets', () => { diff --git a/apps/web/src/app/i18n.tsx b/apps/web/src/app/i18n.tsx index 6e6cf10..a9cdd00 100644 --- a/apps/web/src/app/i18n.tsx +++ b/apps/web/src/app/i18n.tsx @@ -302,7 +302,7 @@ const de: Catalog = { 'shell.installHint': 'OpenClockwork als App installieren — schneller Zugriff und Offline-Hinweis.', 'shell.closeInstall': 'Installations-Hinweis schließen', - 'shell.adminFooter': 'Crafted with ❤️ in Würzburg by Patrick Schiller', + 'shell.adminFooter': 'Crafted with ❤️ in Würzburg by Patrick & AI', 'shell.adminVersion': 'OpenClockwork-Version {version}', 'login.description': 'Anmeldung mit E-Mail und Passwort', 'login.password': 'Passwort', @@ -1122,7 +1122,7 @@ const en: Catalog = { 'shell.installHint': 'Install OpenClockwork as an app for faster access and offline notices.', 'shell.closeInstall': 'Close installation notice', - 'shell.adminFooter': 'Crafted with ❤️ in Würzburg by Patrick Schiller', + 'shell.adminFooter': 'Crafted with ❤️ in Würzburg by Patrick & AI', 'shell.adminVersion': 'OpenClockwork version {version}', 'login.description': 'Sign in with email and password', 'login.password': 'Password',