mirror of https://github.com/tycrek/ass
parent
701c808f7a
commit
72a58295ae
@ -0,0 +1,16 @@
|
|||||||
|
import { path } from '@tycrek/joint';
|
||||||
|
import { Router, json as BodyParserJson } from 'express';
|
||||||
|
import { log } from '../log';
|
||||||
|
import { UserConfig } from '../UserConfig';
|
||||||
|
import { App } from '../app';
|
||||||
|
|
||||||
|
const router = Router({ caseSensitive: true });
|
||||||
|
|
||||||
|
// Static routes
|
||||||
|
router.get('/', (req, res) => !UserConfig.ready ? res.redirect('/') : res.render('admin', { version: App.pkgVersion }));
|
||||||
|
router.get('/ui.js', (req, res) => !UserConfig.ready ? res.send('') : res.type('text/javascript').sendFile(path.join('dist-frontend/admin.mjs')));
|
||||||
|
|
||||||
|
router.post('/', BodyParserJson(), async (req, res) => {
|
||||||
|
});
|
||||||
|
|
||||||
|
export { router };
|
@ -0,0 +1,4 @@
|
|||||||
|
import { SlInput, SlButton } from '@shoelace-style/shoelace';
|
||||||
|
|
||||||
|
// * Wait for the document to be ready
|
||||||
|
document.addEventListener('DOMContentLoaded', () => console.log('Admin page loaded'));
|
Loading…
Reference in new issue