-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b4f174d
commit 45cb8e6
Showing
32 changed files
with
575 additions
and
2,146 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Empty file.
Empty file.
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,12 @@ | ||
import { TodoistApi } from "@doist/todoist-api-typescript"; | ||
|
||
let _api = null; | ||
const getApi = () => _api; | ||
|
||
const onNewToken = ({detail}) => { | ||
_api = new TodoistApi(detail); | ||
}; | ||
|
||
window.addEventListener("new_token", onNewToken); | ||
|
||
export default getApi; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,45 @@ | ||
import { Modal, Box, Typography, Button } from "@mui/material"; | ||
import Loading from "../Loading"; | ||
|
||
const style = { | ||
position: "absolute", | ||
top: "50%", | ||
left: "50%", | ||
transform: "translate(-50%, -50%)", | ||
width: 500, | ||
bgcolor: "background.paper", | ||
boxShadow: 24, | ||
p: 4, | ||
}; | ||
|
||
const AuthModal = ({ isOpen, title, showRetryButton, onRetryClick }) => { | ||
return ( | ||
<Modal | ||
open={isOpen} | ||
aria-labelledby="modal-modal-title" | ||
aria-describedby="modal-modal-description" | ||
> | ||
<Box sx={style}> | ||
<Typography | ||
id="modal-modal-title" | ||
variant="h6" | ||
component="h2" | ||
align="center" | ||
> | ||
{title} | ||
</Typography> | ||
{showRetryButton ? ( | ||
<Box sx={{ mt: 5, display: "flex", justifyContent: "center" }}> | ||
<Button variant="outlined" onClick={onRetryClick}> | ||
Tentar novamente | ||
</Button> | ||
</Box> | ||
) : ( | ||
<Loading /> | ||
)} | ||
</Box> | ||
</Modal> | ||
); | ||
}; | ||
|
||
export default AuthModal; |
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,3 @@ | ||
import AuthModal from "./AuthModal"; | ||
|
||
export default AuthModal; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import HomePage from './HomePage.jsx'; | ||
import HomePage from "./HomePage.jsx"; | ||
|
||
export default HomePage; | ||
export default HomePage; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Link as MuiLink } from "@mui/material"; | ||
import { Link as ReactRouterLink } from "react-router-dom"; | ||
|
||
const Link = ({ children, external = false, href, color = "inherit" }) => ( | ||
<> | ||
{external ? ( | ||
<MuiLink href={href} color={color}> | ||
{children} | ||
</MuiLink> | ||
) : ( | ||
<ReactRouterLink to={href} color={color}> | ||
{children} | ||
</ReactRouterLink> | ||
)} | ||
</> | ||
); | ||
|
||
export default Link; |
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,3 @@ | ||
import Link from "./Link"; | ||
|
||
export default Link; |
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,35 @@ | ||
import { Box } from "@mui/system"; | ||
import { CircularProgress } from "@mui/material"; | ||
|
||
const Loading = ({ | ||
color, | ||
disableShrink, | ||
noPadding = false, | ||
thickness, | ||
size, | ||
sx, | ||
value, | ||
variant, | ||
}) => { | ||
return ( | ||
<Box | ||
sx={{ | ||
display: "flex", | ||
justifyContent: "center", | ||
...(!noPadding && { pt: 10 }), | ||
}} | ||
> | ||
<CircularProgress | ||
color={color} | ||
disableShrink={disableShrink} | ||
thickness={thickness} | ||
size={size} | ||
sx={{ ...sx }} | ||
value={value} | ||
variant={variant} | ||
/> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default Loading; |
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,3 @@ | ||
import Loading from "./Loading"; | ||
|
||
export default Loading; |
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,34 @@ | ||
import { Modal, Box } from "@mui/material"; | ||
import Loading from "../Loading"; | ||
import logoImg from "@/assets/images/logo.png"; | ||
|
||
const style = { | ||
position: "absolute", | ||
top: "50%", | ||
left: "50%", | ||
transform: "translate(-50%, -50%)", | ||
width: 600, | ||
height: 400, | ||
bgcolor: "background.paper", | ||
boxShadow: 24, | ||
pt: 9, | ||
}; | ||
|
||
const LoadingModal = ({ isOpen }) => { | ||
return ( | ||
<Modal | ||
open={isOpen} | ||
aria-labelledby="modal-modal-title" | ||
aria-describedby="modal-modal-description" | ||
> | ||
<Box sx={style}> | ||
<Box sx={{ display: "flex", justifyContent: "center", pb: 4 }}> | ||
<img src={logoImg} /> | ||
</Box> | ||
<Loading noPadding="true" /> | ||
</Box> | ||
</Modal> | ||
); | ||
}; | ||
|
||
export default LoadingModal; |
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,3 @@ | ||
import LoadingModal from "./LoadingModal"; | ||
|
||
export default LoadingModal; |
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.