From 76e4fc8feecaaef527d2bee594541fef5ee360d6 Mon Sep 17 00:00:00 2001 From: hippoz Date: Mon, 6 Sep 2021 19:29:44 +0300 Subject: [PATCH] switch font to JetBrains Mono and fix disconnection message after logging in --- bfrontend/src/API/Gateway/globalGatewayConnection.js | 1 + bfrontend/src/Styles/App.scss | 10 +++++++++- bfrontend/src/Styles/Components/ProfileLink.scss | 2 ++ bfrontend/src/Styles/root.scss | 3 +++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/bfrontend/src/API/Gateway/globalGatewayConnection.js b/bfrontend/src/API/Gateway/globalGatewayConnection.js index d1648b3..9ab0aaa 100644 --- a/bfrontend/src/API/Gateway/globalGatewayConnection.js +++ b/bfrontend/src/API/Gateway/globalGatewayConnection.js @@ -50,6 +50,7 @@ globalGatewayConnection.onclose = function(code) { if (code === 4006) { clearInterval(reconnectInterval); dispatchConnectionClose(); + currentlyReconnecting = true; // NOTE: no return; } if (currentlyReconnecting || globalGatewayConnection.ws.readyState === 1) return; diff --git a/bfrontend/src/Styles/App.scss b/bfrontend/src/Styles/App.scss index 7452d00..2e0d31b 100644 --- a/bfrontend/src/Styles/App.scss +++ b/bfrontend/src/Styles/App.scss @@ -19,10 +19,18 @@ background: var(--default-scrollbar-color); } +@font-face { + font-family: 'JetBrains Mono'; + src: url('https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/fonts/webfonts/JetBrainsMono-Regular.woff2') format('woff2'), + url('https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/fonts/ttf/JetBrainsMono-Regular.ttf') format('truetype'); + font-weight: normal; + font-style: normal; +} + body { color: var(--default-text-color); background-color: var(--background-color); - font-family: Noto Sans,-apple-system,BlinkMacSystemFont,sans-serif; + font-family: var(--default-font-family); min-height: 100vh; max-height: 100vh; margin: 0px; diff --git a/bfrontend/src/Styles/Components/ProfileLink.scss b/bfrontend/src/Styles/Components/ProfileLink.scss index e36b8d4..e80b46f 100644 --- a/bfrontend/src/Styles/Components/ProfileLink.scss +++ b/bfrontend/src/Styles/Components/ProfileLink.scss @@ -79,6 +79,7 @@ } .default-channel-styled-text { + font-family: var(--glyph-font-family); font-size: 24px; filter: drop-shadow(2px 2px hsl(300, 60%, 25%)); user-select: none; @@ -92,4 +93,5 @@ .default-user-styled-text { font-size: 24px; user-select: none; + font-family: var(--glyph-font-family); } \ No newline at end of file diff --git a/bfrontend/src/Styles/root.scss b/bfrontend/src/Styles/root.scss index 4edcea6..846d6f8 100644 --- a/bfrontend/src/Styles/root.scss +++ b/bfrontend/src/Styles/root.scss @@ -5,6 +5,9 @@ --default-text-color: hsl(0, 0%, 80%); --darker-text-color: hsl(0, 0%, 65%); + --default-font-family: JetBrains Mono; + --glyph-font-family: Noto Sans,-apple-system,BlinkMacSystemFont,sans-serif; + --default-user-background: linear-gradient( to bottom right, hsl(275, 35%, 40%),