add some new hubs
This commit is contained in:
parent
ade3870ab4
commit
6e113b54b0
2 changed files with 12 additions and 74 deletions
|
@ -1,72 +0,0 @@
|
|||
import { Router } from "express";
|
||||
const router = Router();
|
||||
|
||||
//todo: fix jank
|
||||
|
||||
router.get('/login', (req, res, next) => {
|
||||
res.ctx.mainPage = 'hub'
|
||||
res.ctx.mainCtx = {
|
||||
title: "Log in",
|
||||
message: 'Log into an existing account.',
|
||||
action: "/api/form/you/login",
|
||||
inputs: [
|
||||
{
|
||||
"key": "Username",
|
||||
"type": "text",
|
||||
"name": "user",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "Password",
|
||||
"type": "password",
|
||||
"name": "pass",
|
||||
"default": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
next();
|
||||
})
|
||||
|
||||
router.get('/logout', (req, res, next) => {
|
||||
res.ctx.mainPage = 'form'
|
||||
res.ctx.mainCtx = {
|
||||
title: "Log out",
|
||||
message: 'Are you sure?',
|
||||
action: "/api/form/you/logout",
|
||||
inputs: []
|
||||
}
|
||||
next();
|
||||
})
|
||||
|
||||
|
||||
router.get('/new', (req, res, next) => {
|
||||
res.ctx.mainPage = 'form'
|
||||
res.ctx.mainCtx = {
|
||||
title: "Register",
|
||||
message: 'Create an account and join the community!',
|
||||
action: "/api/form/you/new",
|
||||
inputs: [
|
||||
{
|
||||
"key": "Username",
|
||||
"type": "text",
|
||||
"name": "user",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "Password",
|
||||
"type": "password",
|
||||
"name": "pass",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "Password (again)",
|
||||
"type": "password",
|
||||
"name": "pass2",
|
||||
"default": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
next();
|
||||
})
|
||||
|
||||
export default router;
|
|
@ -13,12 +13,22 @@ router.get('/list', (req, res, next) => {
|
|||
{
|
||||
'alias': 'hub/main',
|
||||
'name': 'Home',
|
||||
'desc': 'Discuss anything you desire.'
|
||||
'desc': 'Discuss anything you desire'
|
||||
},
|
||||
{
|
||||
'alias': `users/${res.auth.username}`,
|
||||
'name': 'You',
|
||||
'desc': 'Connect with your fanbase.'
|
||||
'desc': 'Connect with your community'
|
||||
},
|
||||
{
|
||||
'alias': `hub/nilgrinder`,
|
||||
'name': 'Nilgrinder',
|
||||
'desc': 'Idle game: build to everything from nothing'
|
||||
},
|
||||
{
|
||||
'alias': `hub/minecraft`,
|
||||
'name': 'Minecraft',
|
||||
'desc': 'Experimental Minecraft server'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue