diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 10e6609..9b34f83 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -459,10 +459,10 @@ function QuickLinks({ toast, mobile }) { + textDecoration:'none', minWidth:60, height:76, cursor:'pointer' }}> {l.icon && l.icon.startsWith('http') ? e.target.style.display='none'}/> : {l.icon}} @@ -609,14 +609,14 @@ function Notepad({ toast }) { return (
{isOpen &&
{ const token=localStorage.getItem('sk_token'); - if(!token)return; - try{const p=JSON.parse(atob(token.split('.')[1])); - if(p.exp*1000>Date.now())setUser({id:p.id,username:p.username,role:p.role}); - else localStorage.removeItem('sk_token'); - }catch{localStorage.removeItem('sk_token');} + if(token){ + try{const p=JSON.parse(atob(token.split('.')[1])); + if(p.exp*1000>Date.now())setUser({id:p.id,username:p.username,role:p.role}); + else localStorage.removeItem('sk_token'); + }catch{localStorage.removeItem('sk_token');} + } + setAuthChecked(true); },[]); useEffect(()=>{ @@ -1196,6 +1199,7 @@ export default function App() { },[]); if(splash) return { setSplash(false); sessionStorage.setItem('splash_shown','1'); }}/>; + if(!authChecked) return
; if(!user) return setUser(u)}/>; const activeTool = TOOLS.find(t=>t.id===active); diff --git a/frontend/src/calendar.jsx b/frontend/src/calendar.jsx index 05dcaa4..946debf 100644 --- a/frontend/src/calendar.jsx +++ b/frontend/src/calendar.jsx @@ -215,10 +215,12 @@ export default function CalendarWidget() { {MONTHS[cur.m]} {cur.y} - + {(cur.m !== today.getMonth() || cur.y !== today.getFullYear()) && ( + + )}