feat(nav): add header navigation and show Steam ID on dashboard

Header links to Dashboard, Library and Settings. The logo, the login page and
the landing page lead logged-in users to the dashboard. Expired tokens are
removed, and a 403 on the dashboard logs out. Remove the dev dummy token.
This commit is contained in:
lobo committed 2026-09-24 08:57:03 +02:00
1 parent 44e23de6d6
commit 8fa605aff0
8 files changed
+124 -23

No files matched your search

+12 -1
View File
@@ -56,7 +56,7 @@ const Dashboard = () => {
if (data.steamId) {
await fetchSteamCount();
}
} else if (profileResponse.status === 401) {
} else if (profileResponse.status === 401 || profileResponse.status === 403) {
localStorage.removeItem('tbp_jwt');
navigate('/login');
} else {
@@ -107,6 +107,17 @@ const Dashboard = () => {
<p className="text-lg text-slate-600 dark:text-slate-300">
{userData?.dashboardMessage}
</p>
{userData?.steamId ? (
<p className="mt-2 text-sm text-slate-500 dark:text-slate-400">
<i className="mdi mdi-steam mr-1"></i>
{t('SETTINGS.STEAM_ID')}: <span className="font-mono">{userData.steamId}</span>
</p>
) : (
<Link to="/settings" className="mt-2 inline-block text-sm text-blue-600 dark:text-blue-400 hover:underline">
<i className="mdi mdi-steam mr-1"></i>
{t('DASHBOARD.NO_STEAM_ID')}
</Link>
)}
{userData?.steamId && (
<div className="mt-4">
<SyncStatusBadge