Public Access
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:
1 parent
60dcfe8992
commit
a60010e055
28 files changed
+427
-58
No files matched your search
@@ -15,15 +15,15 @@ export const celebrationLevel = (game) => {
|
||||
};
|
||||
|
||||
/**
|
||||
* The confetti to play when the page shows this game: on opening a finished game, and when the level rises on the
|
||||
* same page (e.g. the user sets FINISHED). A reload of the same game plays nothing.
|
||||
* The confetti to play: only when the level rises while the page shows the game (the user sets Finished or completes
|
||||
* it here). Opening a finished game and a reload play nothing.
|
||||
*
|
||||
* @param before {appid, level} of the game shown before, null on opening the page
|
||||
* @returns 'small', 'big' or null
|
||||
*/
|
||||
export const celebrationFor = (before, game) => {
|
||||
if (before?.appid !== game.appid) return null;
|
||||
const level = celebrationLevel(game);
|
||||
const from = before?.appid === game.appid ? before.level : 0;
|
||||
if (level <= from) return null;
|
||||
if (level <= before.level) return null;
|
||||
return level === 2 ? 'big' : 'small';
|
||||
};
|
||||
Reference in new issue
Block a user