@@ -2,6 +2,7 @@ import { GamevaultGame } from "@/api/models/GamevaultGame";
22import { Progress , ProgressStateEnum } from "@/api/models/Progress" ;
33import { Media } from "@/components/Media" ;
44import MediaSlider from "@/components/MediaSlider" ;
5+ import MarkdownContent from "@/components/MarkdownContent" ;
56import { useAuth } from "@/context/AuthContext" ;
67import { useAlertDialog } from "@/context/AlertDialogContext" ;
78import { Button } from "@tw/button" ;
@@ -35,7 +36,6 @@ import {
3536 HashtagIcon ,
3637} from "@heroicons/react/24/outline" ;
3738import clsx from "clsx" ;
38- import Markdown from "react-markdown" ;
3939import {
4040 Dropdown ,
4141 DropdownButton ,
@@ -479,6 +479,17 @@ export default function GameView() {
479479 game ?. metadata ?. average_playtime ||
480480 ( game as any ) ?. metadata ?. average_playtime ||
481481 null ;
482+ const floatingIconButtonClassName =
483+ "h-9 w-9 p-0 flex items-center justify-center border-white/35 bg-white/60 shadow-sm backdrop-blur-md hover:bg-white/78 dark:border-white/20 dark:bg-zinc-950/58 dark:hover:bg-zinc-900/72" ;
484+ const glassPanelClassName =
485+ "border border-white/35 bg-white/[0.42] backdrop-blur-md dark:border-white/10 dark:bg-zinc-950/72 dark:backdrop-blur-md" ;
486+ const darkGlassInsetClassName =
487+ "dark:border dark:border-white/10 dark:bg-zinc-950/68 dark:backdrop-blur-md" ;
488+ const progressSelectClassName = clsx (
489+ "rounded-lg before:bg-white/60 before:backdrop-blur-md before:shadow-sm" ,
490+ "dark:before:hidden" ,
491+ darkGlassInsetClassName ,
492+ ) ;
482493
483494 // Derive additional metadata fields
484495 const releaseYear = game ?. release_date
@@ -619,7 +630,7 @@ export default function GameView() {
619630 < Button
620631 outline
621632 onClick = { ( ) => setSettingsOpen ( true ) }
622- className = "h-9 w-9 p-0 flex items-center justify-center border-white/20 bg-zinc-900/40 text-white shadow-sm backdrop-blur-sm hover:bg-zinc-800/60 dark:border-white/20 dark:bg-zinc-700/50 dark:hover:bg-zinc-600/60"
633+ className = { floatingIconButtonClassName }
623634 title = "Settings"
624635 >
625636 < Cog8ToothIcon className = "w-5 h-5" />
@@ -633,7 +644,7 @@ export default function GameView() {
633644 "disabled:opacity-50 disabled:cursor-not-allowed shadow-sm" ,
634645 bookmarked
635646 ? "bg-yellow-400/20 border-yellow-400 text-yellow-400"
636- : "bg-zinc-900/40 dark: bg-zinc-700/50 border-white/20 hover :bg-zinc-800/60 dark:hover:bg-zinc-600/60 text-white " ,
647+ : "border-white/35 bg-white/60 text- zinc-700 hover:bg-white/78 dark: border-white/20 dark :bg-zinc-950/58 dark:text-zinc-100 dark: hover:bg-zinc-900/72 " ,
637648 ) }
638649 title = { bookmarked ? "Remove bookmark" : "Add bookmark" }
639650 aria-pressed = { bookmarked }
@@ -647,7 +658,7 @@ export default function GameView() {
647658 < Button
648659 outline
649660 onClick = { handleShare }
650- className = "h-9 w-9 p-0 flex items-center justify-center border-white/20 bg-zinc-900/40 text-white shadow-sm backdrop-blur-sm hover:bg-zinc-800/60 dark:border-white/20 dark:bg-zinc-700/50 dark:hover:bg-zinc-600/60"
661+ className = { floatingIconButtonClassName }
651662 title = "Copy link"
652663 >
653664 < ShareIcon className = "w-5 h-5" />
@@ -688,7 +699,12 @@ export default function GameView() {
688699 { /* Right Column Row 1: Stats + Progress State */ }
689700 < div className = "flex flex-col gap-6 xl:col-start-2 xl:row-start-1 min-w-0" >
690701 < div className = "grid grid-cols-3 gap-2 text-center text-xs" >
691- < div className = "p-3 rounded-lg bg-zinc-100 dark:bg-zinc-800" >
702+ < div
703+ className = { clsx (
704+ "rounded-lg bg-zinc-100 p-3" ,
705+ darkGlassInsetClassName ,
706+ ) }
707+ >
692708 < div className = "text-[10px] uppercase tracking-wide text-zinc-500 dark:text-zinc-400" >
693709 Playtime
694710 </ div >
@@ -698,7 +714,12 @@ export default function GameView() {
698714 : `${ playtimeMinutes } m` }
699715 </ div >
700716 </ div >
701- < div className = "p-3 rounded-lg bg-zinc-100 dark:bg-zinc-800" >
717+ < div
718+ className = { clsx (
719+ "rounded-lg bg-zinc-100 p-3" ,
720+ darkGlassInsetClassName ,
721+ ) }
722+ >
702723 < div className = "text-[10px] uppercase tracking-wide text-zinc-500 dark:text-zinc-400" >
703724 Last Played
704725 </ div >
@@ -709,7 +730,12 @@ export default function GameView() {
709730 { lastPlayed }
710731 </ div >
711732 </ div >
712- < div className = "p-3 rounded-lg bg-zinc-100 dark:bg-zinc-800" >
733+ < div
734+ className = { clsx (
735+ "rounded-lg bg-zinc-100 p-3" ,
736+ darkGlassInsetClassName ,
737+ ) }
738+ >
713739 < div className = "text-[10px] uppercase tracking-wide text-zinc-500 dark:text-zinc-400" >
714740 Avg Playtime
715741 </ div >
@@ -729,7 +755,7 @@ export default function GameView() {
729755 value = { progressState || "UNPLAYED" }
730756 onChange = { ( v : any ) => updateProgressState ( v ) }
731757 disabled = { ! user || progressUpdating }
732- className = "rounded-lg before:bg-zinc-900/40 before:backdrop-blur-sm before:shadow-none dark:bg-zinc-700/50 dark:before:hidden"
758+ className = { progressSelectClassName }
733759 >
734760 { progressStateOptions . map ( ( o ) => (
735761 < ListboxOption key = { o . key } value = { o . key } >
@@ -756,7 +782,11 @@ export default function GameView() {
756782 </ div >
757783 ) }
758784 < div ref = { detailsCardRef } className = "contents" >
759- < Card title = "Details" className = "!mb-0" >
785+ < Card
786+ title = "Details"
787+ className = "!mb-0"
788+ surfaceClassName = { glassPanelClassName }
789+ >
760790 < div className = "flex border-b border-zinc-300/40 dark:border-zinc-700/50 mb-4 gap-6 text-sm" >
761791 < button
762792 onClick = { ( ) => setDetailsTab ( "description" ) }
@@ -795,19 +825,15 @@ export default function GameView() {
795825 < div className = "text-sm leading-relaxed space-y-4 min-h-[180px]" >
796826 { detailsTab === "description" &&
797827 ( description ? (
798- < p className = "whitespace-pre-line text-zinc-700 dark:text-zinc-300" >
799- { description }
800- </ p >
828+ < MarkdownContent content = { description } />
801829 ) : (
802830 < p className = "italic text-zinc-500" >
803831 No description available.
804832 </ p >
805833 ) ) }
806834 { detailsTab === "notes" &&
807835 ( notes ? (
808- < div className = "prose prose-sm dark:prose-invert max-w-none" >
809- < Markdown > { notes } </ Markdown >
810- </ div >
836+ < MarkdownContent content = { notes } />
811837 ) : (
812838 < p className = "italic text-zinc-500" > No notes.</ p >
813839 ) ) }
@@ -840,6 +866,7 @@ export default function GameView() {
840866 < Card
841867 title = "Additional Metadata"
842868 className = "min-h-[160px] h-full"
869+ surfaceClassName = { glassPanelClassName }
843870 >
844871 < ul className = "space-y-4 text-sm" >
845872 < li className = "flex items-start gap-3" >
@@ -966,7 +993,11 @@ export default function GameView() {
966993 isXL && detailsHeight ? { height : detailsHeight } : undefined
967994 }
968995 >
969- < Card title = "Activity" className = "!mb-0 h-full" >
996+ < Card
997+ title = "Activity"
998+ className = "!mb-0 h-full"
999+ surfaceClassName = { glassPanelClassName }
1000+ >
9701001 { ( ( ) => {
9711002 const progresses : Progress [ ] =
9721003 ( game as any ) ?. progresses || [ ] ;
0 commit comments