Skip to content

Commit

Permalink
style(monitor): submissions
Browse files Browse the repository at this point in the history
  • Loading branch information
GZTimeWalker committed Jul 2, 2023
1 parent 99b6f27 commit f4c6f5d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/GZCTF/CTFServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

<ItemGroup>
<PackageReference Include="Docker.DotNet" Version="3.125.15" />
<PackageReference Include="KubernetesClient" Version="11.0.21" />
<PackageReference Include="KubernetesClient" Version="11.0.36" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="7.0.8" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.Json" Version="7.0.8" />
<PackageReference Include="Microsoft.AspNetCore.SpaProxy" Version="7.0.8" />
Expand Down
26 changes: 20 additions & 6 deletions src/GZCTF/ClientApp/src/pages/games/[id]/monitor/Submissions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import {
useMantineTheme,
Input,
Tooltip,
Badge,
Text,
} from '@mantine/core'
import { showNotification } from '@mantine/notifications'
import {
Expand Down Expand Up @@ -82,7 +84,7 @@ const Submissions: FC = () => {
const { game } = useGame(numId)

const iconMap = AnswerResultIconMap(0.8)
const { classes, cx } = useTableStyles()
const { classes, cx, theme } = useTableStyles()
const { classes: tooltipClasses } = useTooltipStyles()

useEffect(() => {
Expand Down Expand Up @@ -159,9 +161,21 @@ const Submissions: FC = () => {
}
>
<td>{iconMap.get(item.status ?? AnswerResult.FlagSubmitted)}</td>
<td className={cx(classes.mono)}>{dayjs(item.time).format('MM/DD HH:mm:ss')}</td>
<td>{item.team ?? 'Team'}</td>
<td>{item.user ?? 'User'}</td>
<td className={cx(classes.mono)}>
<Badge size="sm" color="indigo">
{dayjs(item.time).format('MM/DD HH:mm:ss')}
</Badge>
</td>
<td>
<Text size="sm" weight="bold">
{item.team ?? 'Team'}
</Text>
</td>
<td>
<Text ff={theme.fontFamilyMonospace} size="sm" weight="bold">
{item.user ?? 'User'}
</Text>
</td>
<td>{item.challenge ?? 'Challenge'}</td>
<td
style={{
Expand Down Expand Up @@ -243,12 +257,12 @@ const Submissions: FC = () => {
<Table className={classes.table}>
<thead>
<tr>
<th>
<th style={{ width: '0.6rem' }}>
<Group align="center">
<Icon path={mdiFlag} size={0.8} />
</Group>
</th>
<th>时间</th>
<th style={{ width: '8rem' }}>时间</th>
<th>队伍</th>
<th>用户</th>
<th>题目</th>
Expand Down

0 comments on commit f4c6f5d

Please sign in to comment.