-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from sqrl-planner/develop
Format and add workflow
- Loading branch information
Showing
28 changed files
with
2,505 additions
and
2,600 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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Bump version | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Bump version and push tag | ||
id: tag_version | ||
uses: mathieudutour/github-tag-action@v6.0 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Create a GitHub release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
tag: ${{ steps.tag_version.outputs.new_tag }} | ||
name: Release ${{ steps.tag_version.outputs.new_tag }} | ||
body: ${{ steps.tag_version.outputs.changelog }} |
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,155 +1,152 @@ | ||
import { ExternalLinkIcon } from "@chakra-ui/icons" | ||
import { | ||
Button, | ||
Checkbox, | ||
Link, | ||
Modal, | ||
ModalBody, | ||
ModalContent, | ||
ModalFooter, | ||
ModalHeader, | ||
ModalOverlay, | ||
Stack, | ||
Text, | ||
UseDisclosureProps, | ||
Button, | ||
Checkbox, | ||
Link, | ||
Modal, | ||
ModalBody, | ||
ModalContent, | ||
ModalFooter, | ||
ModalHeader, | ||
ModalOverlay, | ||
Stack, | ||
Text, | ||
UseDisclosureProps, | ||
} from "@chakra-ui/react" | ||
import React, { Fragment, useState } from "react" | ||
|
||
const DisclaimerModal = (props: { | ||
disclosure: UseDisclosureProps | ||
ModalProps: any | ||
disclosure: UseDisclosureProps | ||
ModalProps: any | ||
}) => { | ||
const [checkedItems, setCheckedItems] = useState([false, false]) | ||
const [checkedItems, setCheckedItems] = useState([false, false]) | ||
|
||
const allChecked = checkedItems.every(Boolean) | ||
const isIndeterminate = checkedItems.some(Boolean) && !allChecked | ||
const allChecked = checkedItems.every(Boolean) | ||
const isIndeterminate = checkedItems.some(Boolean) && !allChecked | ||
|
||
const { onClose } = props.disclosure | ||
const { onClose } = props.disclosure | ||
|
||
return ( | ||
<Fragment> | ||
<Modal | ||
closeOnOverlayClick={false} | ||
{...props.ModalProps} | ||
size="xl" | ||
isCentered | ||
return ( | ||
<Fragment> | ||
<Modal | ||
closeOnOverlayClick={false} | ||
{...props.ModalProps} | ||
size="xl" | ||
isCentered | ||
> | ||
<ModalOverlay /> | ||
<ModalContent> | ||
<ModalHeader>Disclaimers</ModalHeader> | ||
<ModalBody pb={4}> | ||
<Checkbox | ||
isChecked={allChecked} | ||
isIndeterminate={isIndeterminate} | ||
onChange={(e: React.ChangeEvent<any>) => | ||
setCheckedItems(() => [ | ||
e.target.checked, | ||
e.target.checked, | ||
e.target.checked, | ||
]) | ||
} | ||
pb={2} | ||
> | ||
<ModalOverlay /> | ||
<ModalContent> | ||
<ModalHeader>Disclaimers</ModalHeader> | ||
<ModalBody pb={4}> | ||
<Checkbox | ||
isChecked={allChecked} | ||
isIndeterminate={isIndeterminate} | ||
onChange={(e: React.ChangeEvent<any>) => | ||
setCheckedItems(() => [ | ||
e.target.checked, | ||
e.target.checked, | ||
e.target.checked, | ||
]) | ||
} | ||
pb={2} | ||
> | ||
I understand that... | ||
</Checkbox> | ||
<Stack pl={6} mt={1} spacing={1}> | ||
<Checkbox | ||
isChecked={checkedItems[0]} | ||
onChange={(e: React.ChangeEvent<any>) => | ||
setCheckedItems([ | ||
e.target.checked, | ||
checkedItems[1], | ||
checkedItems[2], | ||
]) | ||
} | ||
pb={4} | ||
> | ||
The information on ACORN<sup>1</sup>, the | ||
Faculty of Arts & Science timetable<sup>2</sup>, | ||
and the Faculty of Arts & Science calendar | ||
<sup>3</sup> take precedence over any | ||
information presented here. | ||
</Checkbox> | ||
<Checkbox | ||
isChecked={checkedItems[1]} | ||
onChange={(e: React.ChangeEvent<any>) => | ||
setCheckedItems([ | ||
checkedItems[0], | ||
e.target.checked, | ||
checkedItems[2], | ||
]) | ||
} | ||
pb={4} | ||
> | ||
Sqrl is not affiliated with the University in | ||
any official capacity. | ||
</Checkbox> | ||
<Checkbox | ||
isChecked={checkedItems[2]} | ||
onChange={(e: React.ChangeEvent<any>) => | ||
setCheckedItems([ | ||
checkedItems[0], | ||
checkedItems[1], | ||
e.target.checked, | ||
]) | ||
} | ||
pb={4} | ||
> | ||
Sqrl cannot enrol in courses for you. | ||
</Checkbox> | ||
</Stack> | ||
<Text mt={4}> | ||
<sup>1</sup> | ||
<Link | ||
variant="" | ||
href="https://acorn.utoronto.ca" | ||
isExternal | ||
mr={4} | ||
> | ||
ACORN <ExternalLinkIcon mx="2px" /> | ||
</Link> | ||
{/* </Text> | ||
I understand that... | ||
</Checkbox> | ||
<Stack pl={6} mt={1} spacing={1}> | ||
<Checkbox | ||
isChecked={checkedItems[0]} | ||
onChange={(e: React.ChangeEvent<any>) => | ||
setCheckedItems([ | ||
e.target.checked, | ||
checkedItems[1], | ||
checkedItems[2], | ||
]) | ||
} | ||
pb={4} | ||
> | ||
The information on ACORN<sup>1</sup>, the Faculty of Arts & | ||
Science timetable<sup>2</sup>, and the Faculty of Arts & Science | ||
calendar | ||
<sup>3</sup> take precedence over any information presented | ||
here. | ||
</Checkbox> | ||
<Checkbox | ||
isChecked={checkedItems[1]} | ||
onChange={(e: React.ChangeEvent<any>) => | ||
setCheckedItems([ | ||
checkedItems[0], | ||
e.target.checked, | ||
checkedItems[2], | ||
]) | ||
} | ||
pb={4} | ||
> | ||
Sqrl is not affiliated with the University in any official | ||
capacity. | ||
</Checkbox> | ||
<Checkbox | ||
isChecked={checkedItems[2]} | ||
onChange={(e: React.ChangeEvent<any>) => | ||
setCheckedItems([ | ||
checkedItems[0], | ||
checkedItems[1], | ||
e.target.checked, | ||
]) | ||
} | ||
pb={4} | ||
> | ||
Sqrl cannot enrol in courses for you. | ||
</Checkbox> | ||
</Stack> | ||
<Text mt={4}> | ||
<sup>1</sup> | ||
<Link | ||
variant="" | ||
href="https://acorn.utoronto.ca" | ||
isExternal | ||
mr={4} | ||
> | ||
ACORN <ExternalLinkIcon mx="2px" /> | ||
</Link> | ||
{/* </Text> | ||
<Text> */} | ||
<sup>2</sup> | ||
<Link | ||
href="https://timetable.iit.artsci.utoronto.ca" | ||
isExternal | ||
mr={4} | ||
> | ||
Timetable <ExternalLinkIcon mx="2px" /> | ||
</Link> | ||
{/* </Text> | ||
<sup>2</sup> | ||
<Link | ||
href="https://timetable.iit.artsci.utoronto.ca" | ||
isExternal | ||
mr={4} | ||
> | ||
Timetable <ExternalLinkIcon mx="2px" /> | ||
</Link> | ||
{/* </Text> | ||
<Text> */} | ||
<sup>3</sup> | ||
<Link | ||
href="https://artsci.calendar.utoronto.ca/" | ||
isExternal | ||
mr={4} | ||
> | ||
Calendar <ExternalLinkIcon mx="2px" /> | ||
</Link> | ||
</Text> | ||
</ModalBody> | ||
<sup>3</sup> | ||
<Link | ||
href="https://artsci.calendar.utoronto.ca/" | ||
isExternal | ||
mr={4} | ||
> | ||
Calendar <ExternalLinkIcon mx="2px" /> | ||
</Link> | ||
</Text> | ||
</ModalBody> | ||
|
||
<ModalFooter> | ||
<Button | ||
colorScheme="blue" | ||
disabled={!allChecked} | ||
onClick={() => { | ||
localStorage.setItem( | ||
"disclaimed", | ||
JSON.stringify(true) | ||
) | ||
if (onClose) onClose() | ||
}} | ||
> | ||
OK | ||
</Button> | ||
</ModalFooter> | ||
</ModalContent> | ||
</Modal> | ||
</Fragment> | ||
) | ||
<ModalFooter> | ||
<Button | ||
colorScheme="blue" | ||
disabled={!allChecked} | ||
onClick={() => { | ||
localStorage.setItem("disclaimed", JSON.stringify(true)) | ||
if (onClose) onClose() | ||
}} | ||
> | ||
OK | ||
</Button> | ||
</ModalFooter> | ||
</ModalContent> | ||
</Modal> | ||
</Fragment> | ||
) | ||
} | ||
|
||
export default DisclaimerModal |
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
Oops, something went wrong.