Skip to content

Commit

Permalink
make game list work better on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
SheepTester committed May 10, 2024
1 parent 2416726 commit 1ff1bd5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
34 changes: 17 additions & 17 deletions src/GZCTF/ClientApp/src/components/ChallengePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,14 @@ const ChallengePanel: FC = () => {
</Tabs.List>
</Tabs>
</Stack>
<ScrollArea
h={isMobile ? undefined : 'calc(100vh - 7rem)'}
pos="relative"
offsetScrollbars
scrollbarSize={4}
style={{ flex: 'auto' }}
>
{currentChallenges && currentChallenges.length ? (
{currentChallenges && currentChallenges.length ? (
<ScrollArea
h={isMobile ? undefined : 'calc(100vh - 7rem)'}
pos="relative"
offsetScrollbars
scrollbarSize={4}
style={{ flex: 'auto' }}
>
<SimpleGrid
p="xs"
pt={0}
Expand All @@ -246,15 +246,15 @@ const ChallengePanel: FC = () => {
/>
))}
</SimpleGrid>
) : (
<Center h="calc(100vh - 10rem)">
<Stack gap={0}>
<Title order={2}>{t('game.content.all_solved.title')}</Title>
<Text>{t('game.content.all_solved.comment')}</Text>
</Stack>
</Center>
)}
</ScrollArea>
</ScrollArea>
) : (
<Center style={{ flex: 'auto', alignSelf: 'center' }}>
<Stack gap={0} style={{ padding: '1rem' }}>
<Title order={2}>{t('game.content.all_solved.title')}</Title>
<Text>{t('game.content.all_solved.comment')}</Text>
</Stack>
</Center>
)}
{game?.writeupRequired && (
<WriteupSubmitModal
opened={writeupSubmitOpened}
Expand Down
2 changes: 1 addition & 1 deletion src/GZCTF/ClientApp/src/components/GameCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const GameCard: FC<GameCardProps> = ({ game, ...others }) => {
>
<Card.Section>
<Group wrap="nowrap" align="flex-start">
<BackgroundImage src={poster ?? ''} h="10rem" maw="20rem" miw="20rem">
<BackgroundImage src={poster ?? ''} h="10rem" maw="20rem">
<Center h="100%">
{!poster && <Icon path={mdiFlagOutline} size={4} color={theme.colors.gray[5]} />}
</Center>
Expand Down
2 changes: 1 addition & 1 deletion src/GZCTF/ClientApp/src/locales/en_US/game.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
},
"notice_type": {
"all": "All",
"challenge": "Challenge",
"challenge": "Challenges",
"events": "News",
"game": "Notice"
},
Expand Down

0 comments on commit 1ff1bd5

Please sign in to comment.