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