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

+25
View File
@@ -0,0 +1,25 @@
// @vitest-environment jsdom
import {afterEach, beforeEach, describe, expect, it, vi} from 'vitest';
import {cleanup, screen} from '@testing-library/react';
import AccountInfoCard from './AccountInfoCard.jsx';
import {fetchRoutes, json} from '../test/fetchRoutes.js';
import {renderWithProviders} from '../test/renderWithProviders.jsx';
vi.mock('react-i18next', () => import('../test/i18n-mock.js'));
beforeEach(() => localStorage.setItem('tbp_session', '1'));
afterEach(() => {
cleanup();
localStorage.clear();
});
describe('AccountInfoCard', () => {
it('shows the role by its translated name, not the enum value', async () => {
fetchRoutes({'GET /api/users/me': json(200, {email: 'a@b.de', role: 'PLATFORM_ADMIN', settings: {}})});
renderWithProviders(<AccountInfoCard/>, {path: '/settings', entries: ['/settings']});
expect(await screen.findByText('ROLES.PLATFORM_ADMIN')).toBeTruthy();
expect(screen.queryByText('PLATFORM_ADMIN')).toBeNull();
});
});