From 0ac5e2b995acb00ea27a093ac342b9fefb4e3e59 Mon Sep 17 00:00:00 2001 From: Muhammad Ali Date: Tue, 31 Oct 2023 10:54:57 +0500 Subject: [PATCH] web: hide unnecessary items from status bar in focus mode (#3577) * web: used app-store to hide sync-status suring focus mode * web: hide useless items from status bar in focus mode --------- Co-authored-by: Abdullah Atta --- apps/web/src/components/status-bar/index.tsx | 195 ++++++++++--------- 1 file changed, 101 insertions(+), 94 deletions(-) diff --git a/apps/web/src/components/status-bar/index.tsx b/apps/web/src/components/status-bar/index.tsx index 70307a55e..71ba6a507 100644 --- a/apps/web/src/components/status-bar/index.tsx +++ b/apps/web/src/components/status-bar/index.tsx @@ -50,6 +50,7 @@ function StatusBar() { const isLoggedIn = useUserStore((state) => state.isLoggedIn); const statuses = useStatus(); const updateStatus = useAutoUpdater(); + const isFocusMode = useAppStore((state) => state.isFocusMode); return ( - - {isLoggedIn ? ( - <> + {isFocusMode ? ( + + ) : ( + + {isLoggedIn ? ( + <> + + + + + ) : isLoggedIn === false ? ( - - - - ) : isLoggedIn === false ? ( + ) : null} - ) : null} - - {statuses?.map((status) => { - const { key, icon: Icon } = status; - return ( - { + const { key, icon: Icon } = status; + return ( + + {Icon ? : } + + {statusToString(status)} + + + ); + })} + + {updateStatus && updateStatus.type !== "updated" && ( + - )} - + + )} + + )} );