Skip to content

Commit

Permalink
Merge pull request #104 from fishshi/fix/Adapt
Browse files Browse the repository at this point in the history
fix: Fix AttributesDialog on small size
  • Loading branch information
ximu3 authored Dec 16, 2024
2 parents a14d846 + 55c4475 commit d9a1969
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export function Media({ gameId }: { gameId: string }): JSX.Element {
<GameImage
gameId={gameId}
type="icon"
className={cn('w-16 h-16 object-cover')}
className={cn('max-h-16 h-[calc(30vh-160px)] aspect-[1] object-cover')}
fallback={<div>暂无图标</div>}
/>
</div>
Expand Down Expand Up @@ -115,7 +115,7 @@ export function Media({ gameId }: { gameId: string }): JSX.Element {
<GameImage
gameId={gameId}
type="background"
className={cn('w-[500px] h-[264px] object-cover')}
className={cn('max-h-[264px] h-[calc(60vh-200px)] aspect-[2] object-cover')}
fallback={<div>暂无背景</div>}
/>
</div>
Expand Down Expand Up @@ -156,7 +156,7 @@ export function Media({ gameId }: { gameId: string }): JSX.Element {
<GameImage
gameId={gameId}
type="cover"
className={cn('w-[300px] h-[458px] object-cover')}
className={cn('max-h-[458px] h-[calc(90vh-230px)] aspect-[2/3] object-cover')}
fallback={<div>暂无封面</div>}
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function AttributesDialog({
const [gameName] = useDBSyncedState('', `games/${gameId}/metadata.json`, ['name'])
return (
<Dialog open={true} onOpenChange={(state) => setIsOpen(state)}>
<DialogContent className={cn('w-[1000px] h-[700px] max-w-none flex flex-col')}>
<DialogContent className={cn('w-[1000px] max-h-[700px] h-[90vh] max-w-none flex flex-col')}>
<DialogHeader>
<DialogTitle>{`${gameName} - 属性`}</DialogTitle>
</DialogHeader>
Expand Down

0 comments on commit d9a1969

Please sign in to comment.