From 8a4f98c5fdf9293226c66db0ccf5c6297b92377f Mon Sep 17 00:00:00 2001 From: leca Date: Mon, 10 Feb 2025 03:37:18 +0000 Subject: [PATCH] world map --- public/css/index.css | 8 +++++++- src/messages.js | 2 +- src/middlewares/auth.js | 5 ++++- views/worldmap.pug | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/public/css/index.css b/public/css/index.css index 4722460..8c1a6e5 100644 --- a/public/css/index.css +++ b/public/css/index.css @@ -64,6 +64,7 @@ canvas { margin-top: 0%; border: solid 2px gray; box-shadow: 0px 20px 150px rgba(0, 0, 0, 1); + height:100%; } .action-tabs { @@ -133,4 +134,9 @@ canvas { margin-bottom: 8px; margin-left: 8px; margin-right: 16px; -} \ No newline at end of file +} + +.map-container { + width: 100%; + height: 90%; +} diff --git a/src/messages.js b/src/messages.js index 4c959aa..7f8ee37 100644 --- a/src/messages.js +++ b/src/messages.js @@ -112,4 +112,4 @@ const startChat = async () => { }) } -export default startChat; \ No newline at end of file +export default startChat; diff --git a/src/middlewares/auth.js b/src/middlewares/auth.js index a014ebb..8dbf8f8 100644 --- a/src/middlewares/auth.js +++ b/src/middlewares/auth.js @@ -17,6 +17,9 @@ const authenticate = async (req, res, next) => { next(); } catch(e) { console.log(e) + req.session.destroy(); + res.clearCookie("jwt"); + return res.redirect("/login"); } }; @@ -44,4 +47,4 @@ const canHaveCloak = async (req, res, next) => { next(); } -export default {authenticate, validateInviteToken, canHaveCloak}; \ No newline at end of file +export default {authenticate, validateInviteToken, canHaveCloak}; diff --git a/views/worldmap.pug b/views/worldmap.pug index c3cc835..544dc61 100644 --- a/views/worldmap.pug +++ b/views/worldmap.pug @@ -10,4 +10,4 @@ html div(class="content-container") div(class="map-container") h1 Карта - p Пока что тут пусто, но скоро будет кое-что интересное! \ No newline at end of file + iframe(src="/map" class="map-container")