mirror of
https://git.waldn.net/git/knotteye/satyr.git
synced 2026-11-20 21:19:05 +00:00
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:
1 parent
74c90114c7
commit
5a52308503
6 files changed
+4
-74
No files matched your search
+4
-4
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user