From 1fa1496d7fad9605766d7343a0fa13c3235ca1f2 Mon Sep 17 00:00:00 2001 From: Ajay Bura Date: Wed, 27 Oct 2021 17:08:26 +0530 Subject: [PATCH] Added logout in loading screen Signed-off-by: Ajay Bura --- src/app/templates/client/Client.jsx | 4 ++++ src/app/templates/client/Client.scss | 9 +++++++++ src/client/action/logout.js | 1 + 3 files changed, 14 insertions(+) diff --git a/src/app/templates/client/Client.jsx b/src/app/templates/client/Client.jsx index bf7a3e7..145aaca 100644 --- a/src/app/templates/client/Client.jsx +++ b/src/app/templates/client/Client.jsx @@ -9,6 +9,7 @@ import Windows from '../../organisms/pw/Windows'; import Dialogs from '../../organisms/pw/Dialogs'; import EmojiBoardOpener from '../../organisms/emoji-board/EmojiBoardOpener'; import RoomOptions from '../../organisms/room-optons/RoomOptions'; +import logout from '../../../client/action/logout'; import initMatrix from '../../../client/initMatrix'; @@ -25,6 +26,9 @@ function Client() { if (isLoading) { return (
+ Heating up diff --git a/src/app/templates/client/Client.scss b/src/app/templates/client/Client.scss index 0528098..a94312c 100644 --- a/src/app/templates/client/Client.scss +++ b/src/app/templates/client/Client.scss @@ -31,4 +31,13 @@ .loading__appname { position: absolute; bottom: var(--sp-normal); +} +.loading__logout { + position: absolute; + bottom: var(--sp-extra-tight); + right: var(--sp-extra-tight); + cursor: pointer; + .text { + color: var(--tc-link); + } } \ No newline at end of file diff --git a/src/client/action/logout.js b/src/client/action/logout.js index f938699..3c7b848 100644 --- a/src/client/action/logout.js +++ b/src/client/action/logout.js @@ -2,6 +2,7 @@ import initMatrix from '../initMatrix'; function logout() { const mx = initMatrix.matrixClient; + mx.stopClient(); mx.logout().then(() => { mx.clearStores(); window.localStorage.clear();