Stop using dash.js, videojs supports it natively.

Modal messages also work again
Turn off watch in nunjucks config (oops)
Change some redirects based on logged in status.
This commit is contained in:
knotteye committed 2019-12-04 17:52:11 -06:00
1 parent 74c90114c7
commit 5a52308503
6 files changed
+4 -74

No files matched your search

+4 -4
View File
@@ -32,7 +32,7 @@ async function init(satyr: any, port: number, ircconf: any){
njk.configure('templates', {
autoescape : true,
express : app,
watch : true
watch : false
});
njkconf ={
sitename: satyr.name,
@@ -288,7 +288,7 @@ async function initSite(openReg) {
});
app.get('/login', (req, res) => {
if(tryDecode(req.cookies.Authorization)) {
res.redirect(njkconf.rootredirect);
res.redirect('/profile');
}
else res.render('login.njk',njkconf);
});
@@ -302,13 +302,13 @@ async function initSite(openReg) {
if(tryDecode(req.cookies.Authorization)) {
res.render('profile.njk', Object.assign({auth: {is: true, name: JWT.decode(req.cookies.Authorization)['username']}}, njkconf));
}
else res.redirect(njkconf.rootredirect);
else res.redirect('/login');
});
app.get('/changepwd', (req, res) => {
if(tryDecode(req.cookies.Authorization)) {
res.render('changepwd.njk', Object.assign({auth: {is: true, name: JWT.decode(req.cookies.Authorization)['username']}}, njkconf));
}
else res.redirect(njkconf.rootredirect);
else res.redirect('/login');
});
app.get('/chat', (req, res) => {
res.render('chat.html', njkconf);