add some new hubs

This commit is contained in:
biglyderv 2025-03-08 15:57:30 -05:00
parent ade3870ab4
commit 6e113b54b0
Signed by: biglyderv
GPG key ID: 0E2EB0B4CD7397B5
2 changed files with 12 additions and 74 deletions

View file

@ -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;

View file

@ -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'
}
]
}