-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(fe): add toggles in contest create (#1991)
* feat(fe): add enable copy and hide result toggle in create contest * feat(fe): add switchfield to edit contest page * feat(fe): add error message in zod schema * feat(fe): change popover to tooltip --------- Co-authored-by: YooJin Lee <[email protected]>
- Loading branch information
Showing
10 changed files
with
126 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 27 additions & 30 deletions
57
apps/frontend/app/admin/contest/_components/ContestProblemListLabel.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,38 @@ | ||
import { | ||
Popover, | ||
PopoverContent, | ||
PopoverTrigger | ||
} from '@/components/ui/popover' | ||
Tooltip, | ||
TooltipContent, | ||
TooltipProvider, | ||
TooltipTrigger | ||
} from '@/components/ui/tooltip' | ||
import { MdHelpOutline } from 'react-icons/md' | ||
import Label from '../../_components/Label' | ||
|
||
export default function ContestProblemListLabel() { | ||
return ( | ||
<div className="flex items-center gap-2"> | ||
<Label>Contest Problem List</Label> | ||
<Popover> | ||
<PopoverTrigger asChild> | ||
<button> | ||
<MdHelpOutline className="text-gray-400 hover:text-gray-700" /> | ||
</button> | ||
</PopoverTrigger> | ||
<PopoverContent | ||
side="top" | ||
className="mb-2 w-[680px] bg-black px-4 py-2 text-white" | ||
> | ||
<ul className="text-xs font-normal"> | ||
<li> | ||
The problems in the contest problem list are initially set to | ||
'not visible' at the time of creating the contest | ||
</li> | ||
<li> | ||
They become visible according to the specified start time and | ||
remain inaccessible in the problem list | ||
</li> | ||
<li> | ||
throughout the duration of the contest. After the contest period | ||
ends, they become visible again in the problem list. | ||
</li> | ||
</ul> | ||
</PopoverContent> | ||
</Popover> | ||
<TooltipProvider> | ||
<Tooltip> | ||
<TooltipTrigger asChild> | ||
<button type="button"> | ||
<MdHelpOutline className="text-gray-400 hover:text-gray-700" /> | ||
</button> | ||
</TooltipTrigger> | ||
<TooltipContent | ||
side="top" | ||
className="mb-2 w-[640px] bg-white px-4 py-2 shadow-md" | ||
> | ||
<p className="text-xs font-normal text-black"> | ||
If a problem is included in at least one ongoing, or upcoming | ||
contest, it will automatically become invisible state in the ‘All | ||
Problem List’. You cannot change its visibility until all the | ||
ongoing or upcoming contests it is part of have ended. After the | ||
contests are all over, you can manually make the problem visible | ||
again. | ||
</p> | ||
</TooltipContent> | ||
</Tooltip> | ||
</TooltipProvider> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters