-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client): add instructions into contest announcement dialog (#582)
- Loading branch information
1 parent
6414fcc
commit cd60f5f
Showing
8 changed files
with
43 additions
and
36 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,5 +10,6 @@ judgels-client.js | |
!public/skins/**/*.css | ||
|
||
.idea/ | ||
coverage/ | ||
|
||
*.retry |
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
17 changes: 0 additions & 17 deletions
17
...single/announcements/ContestAnnouncementCreateDialog/ContestAnnouncementCreateDialog.scss
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,20 +1,3 @@ | ||
.contest-announcement-create-dialog { | ||
width: 750px; | ||
height: 650px; | ||
} | ||
|
||
.contest-announcement-create-dialog-body { | ||
height: 520px; | ||
} | ||
|
||
// This is to compensate the increase in toolbar height | ||
|
||
@media only screen and (max-width: 600px) { | ||
.contest-announcement-create-dialog { | ||
height: 700px; | ||
} | ||
|
||
.contest-announcement-create-dialog-body { | ||
height: 570px; | ||
} | ||
} |
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
17 changes: 0 additions & 17 deletions
17
...sts/single/announcements/ContestAnnouncementEditDialog/ContestAnnouncementEditDialog.scss
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,20 +1,3 @@ | ||
.contest-announcement-edit-dialog { | ||
width: 750px; | ||
height: 700px; | ||
} | ||
|
||
.contest-announcement-edit-dialog-body { | ||
height: 570px; | ||
} | ||
|
||
// This is to compensate the increase in toolbar height | ||
|
||
@media only screen and (max-width: 600px) { | ||
.contest-announcement-edit-dialog { | ||
height: 750px; | ||
} | ||
|
||
.contest-announcement-edit-dialog-body { | ||
height: 620px; | ||
} | ||
} |
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
36 changes: 36 additions & 0 deletions
36
...ts/single/announcements/ContestAnnouncementInstruction/ContestAnnouncementInstruction.jsx
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { Button, Callout, Collapse } from '@blueprintjs/core'; | ||
import { useState } from 'react'; | ||
|
||
export function ContestAnnouncementInstruction() { | ||
const [isOpen, setIsOpen] = useState(false); | ||
|
||
const handleToggle = () => setIsOpen(!isOpen); | ||
|
||
return ( | ||
<div> | ||
<Button | ||
onClick={handleToggle} | ||
rightIcon={isOpen ? 'chevron-up' : 'chevron-down'} | ||
text="Add Image to Your Contest Announcement" | ||
style={{ marginBottom: '10px' }} | ||
/> | ||
<Collapse isOpen={isOpen}> | ||
<Callout className="bp5-icon-info-sign content-card__section"> | ||
<ol> | ||
<li> | ||
Navigate to <strong>Settings</strong> and enable the <strong>Files</strong> module. | ||
</li> | ||
<li> | ||
In the <strong>Contest Menu</strong> > <strong>Files</strong> section, click on{' '} | ||
<strong>Upload File</strong> to upload your desired image. | ||
</li> | ||
<li> | ||
Insert the uploaded image in the Content form below using the following format:{' '} | ||
<code>download/<your-image-file-name.jpg></code> | ||
</li> | ||
</ol> | ||
</Callout> | ||
</Collapse> | ||
</div> | ||
); | ||
} |