8 files changed,
34 insertions(+),
21 deletions(-)
Author:
Smirnov Oleksandr
ss2316544@gmail.com
Committed by:
GitHub
noreply@github.com
Committed at:
2025-06-20 14:36:59 +0300
Parent:
58c535a
M
web/src/Layouts/Header.elm
··· 87 87 ] 88 88 89 89 Auth.User.NotSignedIn -> 90 - [ Html.li [] [ viewNavLink ( "sign in", Route.Path.Auth ) ] 91 - ] 90 + viewNotSignedInNav 91 + 92 + Auth.User.RefreshingTokens -> 93 + viewNotSignedInNav 92 94 ) 93 95 ] 94 96 ] 97 + 98 + 99 +viewNotSignedInNav : List (Html msg) 100 +viewNotSignedInNav = 101 + [ Html.li [] [ viewNavLink ( "sign in", Route.Path.Auth ) ] 102 + ] 95 103 96 104 97 105 viewNavLink : ( String, Route.Path.Path ) -> Html msg
M
web/src/interop.js
··· 1 1 import "./styles.css"; 2 2 3 3 export const flags = (_) => { 4 - return { 5 - access_token: JSON.parse(window.localStorage.access_token || 'null'), 6 - refresh_token: JSON.parse(window.localStorage.refresh_token || 'null'), 7 - } 8 -} 4 + return { 5 + access_token: JSON.parse(window.localStorage.access_token || "null"), 6 + refresh_token: JSON.parse(window.localStorage.refresh_token || "null"), 7 + }; 8 +}; 9 9 10 10 export const onReady = ({ app }) => { 11 - if (app.ports?.sendToLocalStorage) { 12 - app.ports.sendToLocalStorage.subscribe(({ key, value }) => { 13 - window.localStorage[key] = JSON.stringify(value); 14 - }) 15 - } 16 -} 11 + if (app.ports?.sendToLocalStorage) { 12 + app.ports.sendToLocalStorage.subscribe(({ key, value }) => { 13 + window.localStorage[key] = JSON.stringify(value); 14 + }); 15 + } 16 +};