diff --git a/src/components/layout.js b/src/components/layout.js index 90de581..0a514a4 100644 --- a/src/components/layout.js +++ b/src/components/layout.js @@ -115,43 +115,61 @@ export default function Layout({
+
+
{ + if (!userSpecificMotd) { + return + } + setShowMotdModal(true) + if (userSpecificMotd.seen) { + return + } + fetch(constants.apiUrl + 'infos', { + method: 'POST', + credentials: 'include', + headers: { + Accept: 'application/json', + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ + userSpecificMotdSeen: true, + }), + }) + .then((resp) => { + return resp.json() + }) + .then(() => { + refetchGlobalData() + }) + }} + style={{ cursor: userSpecificMotd ? 'pointer' : 'default' }} + title={ + userSpecificMotd && !userSpecificMotd.seen + ? "You've got Mail!" + : '' + } + > + {userSpecificMotd && !userSpecificMotd.seen ? '📬' : '📭'} +
+
UID: {userId || '...'}
+
{ - if (!userSpecificMotd) { - return - } - setShowMotdModal(true) - if (userSpecificMotd.seen) { - return - } - fetch(constants.apiUrl + 'infos', { - method: 'POST', + fetch(constants.apiUrl + 'logout', { + method: 'GET', credentials: 'include', headers: { Accept: 'application/json', 'Content-Type': 'application/json', }, - body: JSON.stringify({ - userSpecificMotdSeen: true, - }), }) - .then((resp) => { - return resp.json() - }) - .then(() => { - refetchGlobalData() - }) + location.reload() }} - style={{ cursor: userSpecificMotd ? 'pointer' : 'default' }} - title={ - userSpecificMotd && !userSpecificMotd.seen - ? "You've got Mail!" - : '' - } > - {userSpecificMotd && !userSpecificMotd.seen ? '📬' : '📭'} + Logout
-
User ID: {userId || '...'}
{showMotdModal ? ( div { - margin: 3px 5px; -} - -.content { - margin-left: 200px; - padding: 1px 16px; -} - .menuicon div { height: 5px; background-color: var(--bright-color); @@ -259,3 +244,34 @@ select { select:hover { border: 1px solid #99f; } + +.userStatus { + display: flex; + margin-top: auto; + margin-bottom: 20px; + + align-items: center; + justify-content: space-between; +} + +.msgs { + display: flex; + align-items: center; +} + +.logout { + padding: 7px; + cursor: pointer; +} + +.logout:hover { + color: #fff; +} + +.msgs :first-child { + font-size: 35px; +} + +.msgs > div { + margin: 0px 5px; +}