Skip to content

Commit

Permalink
feat: add challenge preview
Browse files Browse the repository at this point in the history
  • Loading branch information
GZTimeWalker committed Oct 19, 2022
1 parent 5b60b35 commit ac0f998
Show file tree
Hide file tree
Showing 8 changed files with 481 additions and 212 deletions.
18 changes: 9 additions & 9 deletions GZCTF/ClientApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
"dependencies": {
"@babel/core": "^7.19.3",
"@emotion/react": "^11.10.4",
"@mantine/carousel": "^5.5.5",
"@mantine/core": "^5.5.5",
"@mantine/dates": "^5.5.5",
"@mantine/dropzone": "^5.5.5",
"@mantine/form": "^5.5.5",
"@mantine/hooks": "^5.5.5",
"@mantine/modals": "^5.5.5",
"@mantine/notifications": "^5.5.5",
"@mantine/carousel": "^5.5.6",
"@mantine/core": "^5.5.6",
"@mantine/dates": "^5.5.6",
"@mantine/dropzone": "^5.5.6",
"@mantine/form": "^5.5.6",
"@mantine/hooks": "^5.5.6",
"@mantine/modals": "^5.5.6",
"@mantine/notifications": "^5.5.6",
"@mdi/js": "^7.0.96",
"@mdi/react": "^1.6.1",
"@microsoft/signalr": "^6.0.10",
Expand All @@ -45,7 +45,7 @@
"@trivago/prettier-plugin-sort-imports": "^3.3.1",
"@types/katex": "^0.14.0",
"@types/marked": "^4.0.7",
"@types/node": "18.11.0",
"@types/node": "18.11.2",
"@types/prismjs": "^1.26.0",
"@types/react": "^18.0.21",
"@types/react-dom": "^18.0.6",
Expand Down
150 changes: 75 additions & 75 deletions GZCTF/ClientApp/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions GZCTF/ClientApp/src/components/ChallengeDetailModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ interface ChallengeDetailModalProps extends ModalProps {

dayjs.extend(duration)

const Countdown: FC<{ time: string }> = ({ time }) => {
export const Countdown: FC<{ time: string }> = ({ time }) => {
const end = dayjs(time)
const [now, setNow] = useState(dayjs())
const countdown = dayjs.duration(end.diff(now))
Expand All @@ -62,7 +62,7 @@ const Countdown: FC<{ time: string }> = ({ time }) => {
)
}

const FlagPlaceholders: string[] = [
export const FlagPlaceholders: string[] = [
'横看成岭侧成峰,flag 高低各不同',
'flag 当关,万夫莫开',
'寻寻觅觅,冷冷清清,flag 惨惨戚戚',
Expand Down Expand Up @@ -412,6 +412,7 @@ const ChallengeDetailModal: FC<ChallengeDetailModalProps> = (props) => {
<TextInput
placeholder={placeholder}
value={flag}
disabled={disabled}
onChange={setFlag}
styles={{
rightSection: {
Expand Down
Loading

0 comments on commit ac0f998

Please sign in to comment.