This repository has been archived by the owner on Aug 21, 2024. It is now read-only.
-
-
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.
Merge pull request #3023 from XRFoundation/ft-add-scope-to-hooks
Added scopes for controlling access to admin functionality.
- Loading branch information
Showing
43 changed files
with
2,069 additions
and
332 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
Large diffs are not rendered by default.
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
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
38 changes: 38 additions & 0 deletions
38
packages/client-core/src/admin/components/Setting/Account.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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import React from 'react' | ||
import { Grid, Paper, Button, Typography } from '@material-ui/core' | ||
import InputBase from '@material-ui/core/InputBase' | ||
import { useStyles } from './styles' | ||
|
||
const Account = () => { | ||
const classes = useStyles() | ||
|
||
const handleSubmit = () => {} | ||
return ( | ||
<div className={`${classes.root} ${classes.container}`}> | ||
<Typography component="h1" className={classes.settingsHeading}> | ||
{' '} | ||
Login | ||
</Typography> | ||
<Grid container spacing={3}> | ||
<Grid item xs={12} sm={6}> | ||
<form autoComplete="off" onSubmit={handleSubmit}> | ||
<label>Email</label> | ||
<Paper component="div" className={classes.createInput}> | ||
<InputBase name="email" style={{ color: '#fff' }} className={classes.input} placeholder="Email" /> | ||
</Paper> | ||
<label>Password</label> | ||
<Paper component="div" className={classes.createInput}> | ||
<InputBase name="password" style={{ color: '#fff' }} className={classes.input} placeholder="Password" /> | ||
</Paper> | ||
<Button className={classes.login}>Login</Button> | ||
</form> | ||
</Grid> | ||
<Grid item xs={12} sm={6}> | ||
social media | ||
</Grid> | ||
</Grid> | ||
</div> | ||
) | ||
} | ||
|
||
export default Account |
48 changes: 48 additions & 0 deletions
48
packages/client-core/src/admin/components/UI/SubmitDialog.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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import React from 'react' | ||
import Button from '@material-ui/core/Button' | ||
import TextField from '@material-ui/core/TextField' | ||
import Dialog from '@material-ui/core/Dialog' | ||
import DialogActions from '@material-ui/core/DialogActions' | ||
import DialogContent from '@material-ui/core/DialogContent' | ||
import DialogContentText from '@material-ui/core/DialogContentText' | ||
import DialogTitle from '@material-ui/core/DialogTitle' | ||
import ErrorIcon from '@material-ui/icons/Error' | ||
import { useStyle, useStyles } from './styles' | ||
|
||
const FormDialog = () => { | ||
const classes = useStyles() | ||
const classex = useStyle() | ||
const [open, setOpen] = React.useState(true) | ||
const handleClose = () => { | ||
setOpen(false) | ||
} | ||
|
||
return ( | ||
<div> | ||
<Dialog | ||
open={open} | ||
onClose={handleClose} | ||
aria-labelledby="form-dialog-title" | ||
classes={{ paper: classes.paperDialog }} | ||
> | ||
<DialogTitle id="form-dialog-title"> No access</DialogTitle> | ||
<DialogContent> | ||
<DialogContentText className={classex.spanNone}> | ||
To access this resource, please enter your username here to ask for access. | ||
</DialogContentText> | ||
<TextField autoFocus id="name" label="Username" type="text" fullWidth /> | ||
</DialogContent> | ||
<DialogActions> | ||
<Button onClick={handleClose} className={classex.spanNone}> | ||
Cancel | ||
</Button> | ||
<Button onClick={handleClose} className={classex.spanDange}> | ||
Submit | ||
</Button> | ||
</DialogActions> | ||
</Dialog> | ||
</div> | ||
) | ||
} | ||
|
||
export default FormDialog |
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,33 @@ | ||
import { createStyles, makeStyles, Theme } from '@material-ui/core/styles' | ||
|
||
const useStyles = makeStyles((theme: Theme) => | ||
createStyles({ | ||
paperDialog: { | ||
background: 'rgb(58, 65, 73) !important', | ||
color: '#f1f1f1' | ||
}, | ||
flex: { | ||
display: 'flex', | ||
justifyContent: 'center', | ||
alignContent: 'center' | ||
}, | ||
input: { | ||
marginLeft: theme.spacing(1), | ||
color: '#f1f1f1' | ||
} | ||
}) | ||
) | ||
|
||
const useStyle = makeStyles({ | ||
spanDange: { | ||
color: '#FF8C00' | ||
}, | ||
spanNone: { | ||
color: '#808080' | ||
}, | ||
spanWhite: { | ||
color: '#f1f1f1' | ||
} | ||
}) | ||
|
||
export { useStyle, useStyles } |
Oops, something went wrong.