Extend Plugin API to return a list of covers and header images

Implement dedicated header image in GameView
Implement GameHeaderPicker
This commit is contained in:
GRIMSIM
2025-06-16 16:56:46 +02:00
parent ac4eaf915e
commit 5e52d11835
33 changed files with 454 additions and 159 deletions
+14 -6
View File
@@ -79,13 +79,21 @@ export default function GameView() {
return game && (
<div className="flex flex-col gap-4">
<div className="overflow-hidden relative rounded-t-lg">
{(game.imageIds && game.imageIds.length > 0) ?
<img className="w-full h-96 object-cover brightness-50 blur-sm scale-110"
alt="Game screenshot"
src={`/images/screenshot/${game.imageIds[0]}`}
/> :
{game.headerId ? (
<img
className="w-full h-96 object-cover brightness-50 blur-sm scale-110"
alt="Game header"
src={`/images/header/${game.headerId}`}
/>
) : game.imageIds && game.imageIds.length > 0 ? (
<img
className="w-full h-96 object-cover brightness-50 blur-sm scale-110"
alt="Game screenshot"
src={`/images/screenshot/${game.imageIds[0]}`}
/>
) : (
<div className="w-full h-96 bg-secondary relative"/>
}
)}
<div className="absolute inset-0 bg-gradient-to-b from-transparent to-background"/>
</div>
<div className="flex flex-col gap-4 mx-24">