diff --git a/README.md b/README.md index d635e9a..a089d80 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,10 @@ +

+ + + Parsimony + +

+ # parsimony A modern, single-binary mailing list manager: an evolution of Mailman. @@ -316,6 +323,6 @@ Sending is bounded by the SMTP round trips to your relay: raise `relay.concurren ## Licence Parsimony is free software, released under the GNU General Public License, version 3 or (at your option) any later -version. See [LICENSE](LICENSE). The components in `admin/src/components/ui` come from shadcn/ui (MIT); the Go +version. See [LICENSE](LICENSE). The logo in `assets/` (generated by `assets/make-logo.py`) is released under the same licence. The components in `admin/src/components/ui` come from shadcn/ui (MIT); the Go dependencies (go-smtp, go-message, go-msgauth, modernc.org/sqlite, yaml.v3) use MIT, BSD or Apache 2.0 licences, which are compatible with the GPL. diff --git a/admin/index.html b/admin/index.html index 4fe18a5..599a256 100644 --- a/admin/index.html +++ b/admin/index.html @@ -4,7 +4,7 @@ - admin + Parsimony
diff --git a/admin/src/App.test.tsx b/admin/src/App.test.tsx index d5df5e4..f87ffc1 100644 --- a/admin/src/App.test.tsx +++ b/admin/src/App.test.tsx @@ -3,6 +3,26 @@ import { describe, expect, it } from 'vitest' import { aList, installFakeApi, newState } from '@/test/fakeApi' import { renderApp } from '@/test/render' +describe('branding', () => { + it('shows the logo on the login page', async () => { + installFakeApi(newState()) + renderApp('/login') + const logo = await screen.findByRole('img', { name: 'Parsimony' }) + expect(logo).toHaveAttribute('src', '/logo.svg') + }) + + it('shows the mark next to the name in the header, as a decoration', async () => { + installFakeApi(newState()) + renderApp('/', { token: 'good' }) + const brand = await screen.findByRole('link', { name: 'Parsimony' }) + expect(brand).toHaveAttribute('href', '/') + const mark = brand.querySelector('img') + expect(mark).not.toBeNull() + expect(mark).toHaveAttribute('src', '/favicon.svg') + expect(mark).toHaveAttribute('alt', '') // the name is already text: a screen reader must not say it twice + }) +}) + describe('authentication', () => { it('does not keep the token when the check fails for another reason than 401', async () => { installFakeApi(newState({ fail: { 'GET /lists': { status: 500, error: 'database is locked' } } })) diff --git a/admin/src/components/Shell.tsx b/admin/src/components/Shell.tsx index 865716e..06cb062 100644 --- a/admin/src/components/Shell.tsx +++ b/admin/src/components/Shell.tsx @@ -12,7 +12,8 @@ export function Shell() {
- + + Parsimony diff --git a/admin/src/pages/LoginPage.tsx b/admin/src/pages/LoginPage.tsx index 6b1c4c1..2ef9a4a 100644 --- a/admin/src/pages/LoginPage.tsx +++ b/admin/src/pages/LoginPage.tsx @@ -33,7 +33,8 @@ export function LoginPage() { } return ( -
+
+ Parsimony diff --git a/assets/logo-mark-512.png b/assets/logo-mark-512.png new file mode 100644 index 0000000..3e6d237 Binary files /dev/null and b/assets/logo-mark-512.png differ diff --git a/assets/logo.png b/assets/logo.png new file mode 100644 index 0000000..b7291a3 Binary files /dev/null and b/assets/logo.png differ