feat(dashboard): new layout with sync button and top 5 most played

Remove the placeholder tiles and the settings tile, fix the mobile header width. iconUrl/formatPlaytime move to utils/games.js (599 min now shows 10h, not 10.0h), and the sync button logic to the useForceSync hook shared with the library.
This commit is contained in:
lobo committed 2026-09-24 09:49:06 +02:00
1 parent 84e31b23ea
commit 76a9ac3e6f
9 files changed
+216 -128

No files matched your search

+1 -11
View File
@@ -1,17 +1,7 @@
import {useEffect, useMemo, useState} from 'react';
import {Link, useNavigate, useParams} from 'react-router-dom';
import {useTranslation} from 'react-i18next';
const iconUrl = (appid, hash) =>
hash
? `https://cdn.cloudflare.steamstatic.com/steamcommunity/public/images/apps/${appid}/${hash}.jpg`
: null;
const formatPlaytime = (minutes) => {
if (!minutes || minutes <= 0) return '0h';
const hours = minutes / 60;
return hours >= 10 ? `${Math.round(hours)}h` : `${hours.toFixed(1)}h`;
};
import {formatPlaytime, iconUrl} from '../utils/games.js';
const formatUnlockedAt = (instant, locale) => {
if (!instant) return '';