diff --git a/public/i18n/de.json b/public/i18n/de.json
index ab75cbb..f5860c9 100644
--- a/public/i18n/de.json
+++ b/public/i18n/de.json
@@ -98,7 +98,11 @@
"OTHER_SUGGESTION": "Anderer Vorschlag",
"BACKLOG_EMPTY": "Dein Backlog ist leer. Stark!",
"SUMMARY_FAILED": "Übersicht konnte nicht geladen werden.",
- "RETRY": "Erneut versuchen"
+ "RETRY": "Erneut versuchen",
+ "ACTIVITY": "Spielzeit",
+ "ACTIVITY_TOTAL": "{{time}} in {{days}} Tagen",
+ "ACTIVITY_EMPTY": "Noch keine Spielzeit aufgezeichnet. Ab jetzt zählt jeder Sync mit.",
+ "RECENTLY_PLAYED": "Zuletzt gespielt (2 Wochen)"
},
"LIBRARY": {
"TITLE": "Spielebibliothek",
@@ -141,7 +145,9 @@
"REMAINING": "Offen",
"COMPLETION": "Fortschritt",
"NO_ACHIEVEMENTS": "Dieses Spiel hat keine Erfolge auf Steam.",
- "STATS_HIDDEN": "Statistiken von Steam verborgen — Profil und Spieldetails auf öffentlich stellen, um Erfolge zu sehen."
+ "STATS_HIDDEN": "Statistiken von Steam verborgen — Profil und Spieldetails auf öffentlich stellen, um Erfolge zu sehen.",
+ "PLAYED_RECENTLY": "Laut Steam hast du das Spiel in den letzten 2 Wochen {{time}} gespielt, es steht aber noch im Backlog.",
+ "SET_PLAYING": "Auf „Spiele ich“ setzen"
},
"LANDING": {
"STATS_TITLE": "Community-Statistiken",
diff --git a/public/i18n/en.json b/public/i18n/en.json
index dffe91c..3e5349d 100644
--- a/public/i18n/en.json
+++ b/public/i18n/en.json
@@ -98,7 +98,11 @@
"OTHER_SUGGESTION": "Other pick",
"BACKLOG_EMPTY": "Your backlog is empty. Nice!",
"SUMMARY_FAILED": "Could not load the overview.",
- "RETRY": "Try again"
+ "RETRY": "Try again",
+ "ACTIVITY": "Playtime",
+ "ACTIVITY_TOTAL": "{{time}} in {{days}} days",
+ "ACTIVITY_EMPTY": "No playtime recorded yet. Every sync from now on counts.",
+ "RECENTLY_PLAYED": "Recently played (2 weeks)"
},
"LIBRARY": {
"TITLE": "Game Library",
@@ -141,7 +145,9 @@
"REMAINING": "Remaining",
"COMPLETION": "Completion",
"NO_ACHIEVEMENTS": "This game has no achievements on Steam.",
- "STATS_HIDDEN": "Stats hidden by Steam — set your profile and game details to public to see achievements."
+ "STATS_HIDDEN": "Stats hidden by Steam — set your profile and game details to public to see achievements.",
+ "PLAYED_RECENTLY": "Steam says you played this game for {{time}} in the last 2 weeks, but it is still in your backlog.",
+ "SET_PLAYING": "Set to \"Playing\""
},
"LANDING": {
"STATS_TITLE": "Community stats",
diff --git a/src/components/ActivityCard.jsx b/src/components/ActivityCard.jsx
new file mode 100644
index 0000000..e4a4603
--- /dev/null
+++ b/src/components/ActivityCard.jsx
@@ -0,0 +1,81 @@
+import {Link} from 'react-router-dom';
+import {useTranslation} from 'react-i18next';
+import {Activity} from 'lucide-react';
+
+import {Card} from '@/components/ui/card';
+import GameCover from './GameCover.jsx';
+import {formatPlaytime} from '../utils/games.js';
+
+const CHART_HEIGHT = 80;
+const BAR_WIDTH = 10;
+const BAR_GAP = 2;
+
+const formatDay = (day, locale) =>
+ new Date(`${day}T12:00:00`).toLocaleDateString(locale, {day: 'numeric', month: 'short'});
+
+/**
+ * @param activity the answer of GET /api/library/activity
+ */
+export default function ActivityCard({activity}) {
+ const {t, i18n} = useTranslation();
+ const {days, totalMinutes, recentGames} = activity;
+ const max = Math.max(1, ...days.map((d) => d.minutes));
+ const width = days.length * (BAR_WIDTH + BAR_GAP);
+
+ return (
+
+