+ {/* Breadcrumb when inside a series */}
+ {selectedSeries && (
+
+
+ /
+
+ {selectedSeries.title}
+
+
+ )}
+
{loading ? (
) : error ? (
-
- ) : games.length === 0 ? (
-
+
+ {error}
+
+ ) : items.length === 0 ? (
+
+
No games found
+
Each game should be a folder containing a .zip file.
+
) : (
- {filtered.map((game) => (
-
- ))}
+ {filtered.map((item) =>
+ 'games' in item ? (
+
{ setSelectedSeries(item); setSearch('') }}
+ />
+ ) : (
+ setSelected(item)}
+ />
+ )
+ )}
)}
@@ -131,6 +151,7 @@ export default function GamesView({ libraryId }: Props) {
libraryId={libraryId}
onClose={() => setSelected(null)}
onTagsChanged={() => { setFilterRefreshKey((k) => k + 1); fetchAssignments() }}
+ onCoverUploaded={() => fetchGames(true)}
/>
)}
@@ -138,6 +159,80 @@ export default function GamesView({ libraryId }: Props) {
)
}
+function GameCard({ game, onClick }: { game: Game; onClick: () => void }) {
+ return (
+