client: setup some scaffolding for displaying tables, but it's nowhere near finished
This commit is contained in:
parent
7e5b0725e9
commit
34f031a9e4
3 changed files with 12 additions and 2 deletions
6
src/static/js/routes/route_table.mjs
Normal file
6
src/static/js/routes/route_table.mjs
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
export default async function(params) {
|
||||||
|
console.log(`TABLE ${params.table_name}`);
|
||||||
|
|
||||||
|
}
|
|
@ -1,6 +1,7 @@
|
||||||
import ClientRouter from 'powahroot/Client.mjs';
|
import ClientRouter from 'powahroot/Client.mjs';
|
||||||
|
|
||||||
import route_main from './routes/route_main.mjs';
|
import route_dashboard from './routes/route_dashboard.mjs';
|
||||||
|
import route_table from './routes/route_table.mjs';
|
||||||
|
|
||||||
export default function make_routes() {
|
export default function make_routes() {
|
||||||
const router = new ClientRouter({
|
const router = new ClientRouter({
|
||||||
|
@ -8,7 +9,10 @@ export default function make_routes() {
|
||||||
listen_pushstate: true
|
listen_pushstate: true
|
||||||
});
|
});
|
||||||
|
|
||||||
router.add_page("", route_main);
|
router.add_404(() => router.navigate(""));
|
||||||
|
|
||||||
|
router.add_page("table/:table_name", route_table);
|
||||||
|
router.add_page("", route_dashboard);
|
||||||
|
|
||||||
return router;
|
return router;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue