fix(ux): apply UX quick wins (#54)

Get started links to registration and says an admin approves accounts.
Back navigation restores the library scroll; search no longer fills history.
Steam and PSN unlink ask first. Any close marks news as seen.
Confetti plays only when the level rises on the page.
Count-ups respect reduced motion. Html lang follows the UI language.
Add a 404 page, translated role and dialog close label.
This commit is contained in:
lobo committed 2026-10-21 08:21:39 +02:00
1 parent 60dcfe8992
commit a60010e055
28 files changed
+427 -58

No files matched your search

+15
View File
@@ -36,6 +36,21 @@ describe('LandingPage', () => {
expect(screen.getByText('2025')).toBeTruthy();
});
it('links "get started" to the registration and shows the approval hint, but not when logged in', async () => {
answer({});
const {unmount} = renderPage();
expect(screen.getByRole('link', {name: /MAIN.GET_STARTED/}).getAttribute('href')).toBe('/register');
expect(screen.getByText('MAIN.APPROVAL_HINT')).toBeTruthy();
await vi.waitFor(() => expect(fetch).toHaveBeenCalled());
unmount();
session.active = true;
renderPage();
expect(screen.queryByText('MAIN.APPROVAL_HINT')).toBeNull();
await vi.waitFor(() => expect(fetch).toHaveBeenCalled());
});
it('hides the three blocks while their lists are empty', async () => {
answer({gamesPerPlatform: [], topGenres: [], finishedPerYear: []});
renderPage();