diff --git a/README.md b/README.md index 4c18376..81eb4fb 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,9 @@ To Be Played is split into three repositories: ## Features -- **Dashboard**: most played games, games in progress, "Pile of Shame" with backlog hours, its trend of the last 90 +- **Dashboard** with an edit mode ("Customize"): the user orders, hides and resizes the tiles (small = half width + and less content, large = double width and more), and can add the stat groups of "Your stats" as tiles. Stored + in Auth, so it follows the user to the phone; "Reset" goes back to the default. Tiles: most played games, games in progress, "Pile of Shame" with backlog hours, its trend of the last 90 days ("this month: +N added, -N off the pile") and a random suggestion, Steam avatar and a banner from the most played game of the last two weeks, and an achievement card: unlocked total, perfect games, average completion and the 5 games closest to 100 %. @@ -50,9 +52,9 @@ To Be Played is split into three repositories: the proved Steam ID, never a typed-in one. A Steam ID typed in before shows as "not verified" with a button to verify it; unlinking is possible. - **Public profile** at `/u/`, opt-in in the settings, with perfect games and average completion. - The user picks in the settings which stat groups of "Your stats" it shows (none by default), and designs its - look: accent, corners, banner and background from own game art ("Profile art" on a game's page), and which - sections it shows in which order. Visitors see the owner's look on that page only; light or dark mode stays theirs. + The owner arranges it with the same edit mode on the profile page itself (the tiles, incl. the stat groups of + "Your stats"), and sets its look in the settings: accent, corners, banner and background from own game art + ("Profile art" on a game's page). Visitors see the owner's look on that page only; light or dark mode stays theirs. - **Appearance**: accent color, corner style, wide layout, page background and banner from your own game art. Saved in Auth, so it follows you to every device. - **Broken pictures**: a Steam cover or achievement icon that does not load shows a placeholder and is reported diff --git a/public/i18n/de.json b/public/i18n/de.json index 2e26457..6d337be 100644 --- a/public/i18n/de.json +++ b/public/i18n/de.json @@ -35,25 +35,12 @@ "ERROR_TOO_MANY_ATTEMPTS": "Zu viele fehlgeschlagene Versuche. Bitte in {{minutes}} Minuten erneut versuchen." }, "SETTINGS": { - "PROFILE_STATS": "Statistik im öffentlichen Profil", - "PROFILE_STATS_HINT": "Wähle die Statistiken, die Besucher sehen. Sie erscheinen, wenn der Abschnitt Statistiken unten an ist.", - "PROFILE_STATS_NEEDS_PUBLIC": "Mach dein Profil zuerst öffentlich.", "PROFILE_STYLE": "Aussehen des Profils", "PROFILE_STYLE_HINT": "So sehen Besucher dein öffentliches Profil. Das Aussehen deiner App bleibt, wie es ist.", "PROFILE_BANNER": "Banner", "PROFILE_BACKGROUND": "Hintergrund", "PROFILE_ART_HINT": "Wähle das Bild auf der Seite eines Spiels: \"Profilbild\".", "PROFILE_ART_REMOVE": "Entfernen", - "PROFILE_SECTIONS": "Abschnitte und Reihenfolge", - "PROFILE_SECTION": { - "SUMMARY": "Summen", - "STATUS": "Statusleiste", - "PLAYING": "Spielt gerade", - "FINISHED": "Beendete Spiele", - "STATS": "Statistiken" - }, - "PROFILE_SECTION_UP": "{{name}} nach oben", - "PROFILE_SECTION_DOWN": "{{name}} nach unten", "TITLE": "Einstellungen", "LOADING": "Einstellungen werden geladen …", "ACCOUNT": "Konto", @@ -137,7 +124,8 @@ "WRONG_PASSWORD": "Das Passwort ist falsch.", "TOO_MANY": "Zu viele falsche Passwörter. Bitte in {{minutes}} Minuten erneut versuchen.", "ERROR": "Das Konto konnte nicht gelöscht werden. Bitte später erneut versuchen." - } + }, + "PROFILE_TILES_HINT": "Wähle, was dein Profil zeigt und wo: öffne dein Profil und klicke auf \"Anpassen\"." }, "VALIDATION": { "EMAIL_REQUIRED": "Email ist erforderlich.", @@ -615,5 +603,23 @@ "RANGE": "{{start}} bis {{end}}", "DONE_COUNT_one": "Von {{count}} Nutzer für immer geschlossen", "DONE_COUNT_other": "Von {{count}} Nutzern für immer geschlossen" + }, + "TILES": { + "CUSTOMIZE": "Anpassen", + "EDIT_HINT": "Verschiebe, vergrößere oder verstecke die Kacheln. Gespeichert wird erst mit \"Fertig\".", + "DONE": "Fertig", + "CANCEL": "Abbrechen", + "RESET": "Zurücksetzen", + "HIDDEN": "Versteckte Kacheln", + "NO_DATA": "Noch nichts zu zeigen.", + "MOVE_UP": "{{name}} nach oben", + "MOVE_DOWN": "{{name}} nach unten", + "SIZE": "Größe von {{name}}", + "HIDE": "{{name}} verstecken", + "SIZE_S": "Klein", + "SIZE_M": "Normal", + "SIZE_L": "Groß", + "SUMMARY": "Summen", + "STATUS": "Statusleiste" } } diff --git a/public/i18n/en.json b/public/i18n/en.json index c2a32d4..9ecfa2a 100644 --- a/public/i18n/en.json +++ b/public/i18n/en.json @@ -35,25 +35,12 @@ "ERROR_TOO_MANY_ATTEMPTS": "Too many failed attempts. Please try again in {{minutes}} minutes." }, "SETTINGS": { - "PROFILE_STATS": "Stats on the public profile", - "PROFILE_STATS_HINT": "Pick the stat groups visitors see. They show when the Stats section below is on.", - "PROFILE_STATS_NEEDS_PUBLIC": "Make your profile public first.", "PROFILE_STYLE": "Profile look", "PROFILE_STYLE_HINT": "How visitors see your public profile. Your own app look stays as it is.", "PROFILE_BANNER": "Banner", "PROFILE_BACKGROUND": "Background", "PROFILE_ART_HINT": "Pick the art on a game's page: \"Profile art\".", "PROFILE_ART_REMOVE": "Remove", - "PROFILE_SECTIONS": "Sections and their order", - "PROFILE_SECTION": { - "SUMMARY": "Totals", - "STATUS": "Status bar", - "PLAYING": "Playing", - "FINISHED": "Finished games", - "STATS": "Stats" - }, - "PROFILE_SECTION_UP": "Move {{name}} up", - "PROFILE_SECTION_DOWN": "Move {{name}} down", "TITLE": "Settings", "LOADING": "Loading settings …", "ACCOUNT": "Account", @@ -137,7 +124,8 @@ "WRONG_PASSWORD": "The password is wrong.", "TOO_MANY": "Too many wrong passwords. Please try again in {{minutes}} minutes.", "ERROR": "The account could not be deleted. Please try again later." - } + }, + "PROFILE_TILES_HINT": "Choose what your profile shows, and where: open your profile and click \"Customize\"." }, "VALIDATION": { "EMAIL_REQUIRED": "Email is required.", @@ -615,5 +603,23 @@ "RANGE": "{{start}} to {{end}}", "DONE_COUNT_one": "Closed for good by {{count}} user", "DONE_COUNT_other": "Closed for good by {{count}} users" + }, + "TILES": { + "CUSTOMIZE": "Customize", + "EDIT_HINT": "Move, resize or hide the tiles. Nothing is saved before \"Done\".", + "DONE": "Done", + "CANCEL": "Cancel", + "RESET": "Reset", + "HIDDEN": "Hidden tiles", + "NO_DATA": "Nothing to show yet.", + "MOVE_UP": "Move {{name}} up", + "MOVE_DOWN": "Move {{name}} down", + "SIZE": "Size of {{name}}", + "HIDE": "Hide {{name}}", + "SIZE_S": "Small", + "SIZE_M": "Normal", + "SIZE_L": "Large", + "SUMMARY": "Totals", + "STATUS": "Status bar" } } diff --git a/src/components/CurrentlyPlayingCard.jsx b/src/components/CurrentlyPlayingCard.jsx index 86aef97..f294b58 100644 --- a/src/components/CurrentlyPlayingCard.jsx +++ b/src/components/CurrentlyPlayingCard.jsx @@ -4,10 +4,14 @@ import {ArrowRight, Gamepad2} from 'lucide-react'; import {Button} from '@/components/ui/button'; import {Card} from '@/components/ui/card'; +import {cn} from '@/lib/utils'; import GameCover from './GameCover.jsx'; import {formatPlaytime} from '../utils/games.js'; -export default function CurrentlyPlayingCard({games, syncing}) { +/** + * @param wide four games per row instead of two, for the large tile + */ +export default function CurrentlyPlayingCard({games, syncing, wide}) { const {t} = useTranslation(); return ( @@ -26,7 +30,7 @@ export default function CurrentlyPlayingCard({games, syncing}) { {syncing ? t('LIBRARY.SYNCING_FIRST_TIME') : t('DASHBOARD.NOTHING_PLAYING')}

) : ( -