@@ -47,19 +47,19 @@ To set up this template in development mode:
|
|||||||
- Logging in and out
|
- Logging in and out
|
||||||
- Account deletion
|
- Account deletion
|
||||||
- Password management
|
- Password management
|
||||||
- Fully Featured Administration Panel
|
- JSON web token authentication
|
||||||
- A default admin account (if desired)
|
|
||||||
- News Blog
|
- News Blog
|
||||||
- Optional microservice
|
- Optional microservice
|
||||||
- Secure publishing and editing of articles
|
- Secure publishing and editing of articles via admin panel
|
||||||
- Easy To Use Configuraton Script:
|
- Easy To Use Configuraton Script
|
||||||
- ~~Default UUID keys~~
|
- Sets up everything via docker
|
||||||
- ~~Docker, docker, docker.~~
|
- A default admin account (if desired)
|
||||||
|
|
||||||
# Coming Soon
|
# Coming Soon
|
||||||
|
|
||||||
- Full documentation
|
- Full documentation
|
||||||
- Setup tutorial
|
- Setup tutorial
|
||||||
|
- Modding tutorial
|
||||||
- Fully Featured Chat System
|
- Fully Featured Chat System
|
||||||
- Optional microservice
|
- Optional microservice
|
||||||
- Chat logs
|
- Chat logs
|
||||||
|
|||||||
@@ -39,12 +39,14 @@ const Account = props => {
|
|||||||
<h1 className='centered'>Account</h1>
|
<h1 className='centered'>Account</h1>
|
||||||
<form className='constricted' onSubmit={async evt => {
|
<form className='constricted' onSubmit={async evt => {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
const [err, result] = await update(passwordRef.current.value, retypeRef.current.value, contactRef.current.checked, authTokens.tokenFetch);
|
const [err] = await update(passwordRef.current.value, retypeRef.current.value, contactRef.current.checked, authTokens.tokenFetch);
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
alert(err);
|
alert(err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
alert('Details updated');
|
||||||
passwordRef.current.value = retypeRef.current.value = '';
|
passwordRef.current.value = retypeRef.current.value = '';
|
||||||
}}>
|
}}>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ const Admin = props => {
|
|||||||
const authTokens = useContext(TokenContext);
|
const authTokens = useContext(TokenContext);
|
||||||
|
|
||||||
//misplaced? (admin only)
|
//misplaced? (admin only)
|
||||||
if (!authTokens.accessToken || !authTokens.getPayload().privilege == 'administrator') {
|
if (!authTokens.accessToken || authTokens.getPayload().privilege != 'administrator') {
|
||||||
return <Redirect to='/' />;
|
return <Redirect to='/' />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ const Visitor = () => {
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Link to='/signup'>Sign Up</Link>
|
<Link to='/signup'>Sign Up</Link>
|
||||||
<em> - </em>
|
<span> - </span>
|
||||||
<Link to='/login'>Log In</Link>
|
<Link to='/login'>Log In</Link>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@@ -19,7 +19,16 @@ const Member = () => {
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Link to='/account'>Account</Link>
|
<Link to='/account'>Account</Link>
|
||||||
<em> - </em>
|
<span> - </span>
|
||||||
|
|
||||||
|
{ authTokens.getPayload().privilege == 'administrator' ?
|
||||||
|
<span>
|
||||||
|
<Link to='/admin'>Admin</Link>
|
||||||
|
<span> - </span>
|
||||||
|
</span>:
|
||||||
|
<span />
|
||||||
|
}
|
||||||
|
|
||||||
{ /* Logout button logs you out of the server too */ }
|
{ /* Logout button logs you out of the server too */ }
|
||||||
<Link to='/' onClick={async () => {
|
<Link to='/' onClick={async () => {
|
||||||
const result = await authTokens.tokenFetch(`${process.env.AUTH_URI}/logout`, { //NOTE: this gets overwritten as a bugfix
|
const result = await authTokens.tokenFetch(`${process.env.AUTH_URI}/logout`, { //NOTE: this gets overwritten as a bugfix
|
||||||
|
|||||||
Reference in New Issue
Block a user