From cde8dd13842f7613f60ae2ced2f32b0ddcb39e7c Mon Sep 17 00:00:00 2001 From: thecodrr Date: Sat, 21 Mar 2020 09:29:56 +0500 Subject: [PATCH] feat: improve login experience & add manual syncing --- apps/web/src/app.js | 11 ++++++- apps/web/src/components/dialogs/dialog.js | 12 ++++++-- .../web/src/components/dialogs/logindialog.js | 14 +++++---- apps/web/src/components/icons/index.js | 6 +++- apps/web/src/interfaces/storage.js | 2 +- .../navigation/navigators/rootnavigator.js | 13 ++++---- apps/web/src/stores/app-store.js | 7 +++++ apps/web/src/stores/note-store.js | 5 ++++ apps/web/src/stores/user-store.js | 30 +++++++++++++++++-- 9 files changed, 83 insertions(+), 17 deletions(-) diff --git a/apps/web/src/app.js b/apps/web/src/app.js index d84d3225c..1b646dc70 100644 --- a/apps/web/src/app.js +++ b/apps/web/src/app.js @@ -21,6 +21,14 @@ import { useStore as useUserStore } from "./stores/user-store"; import Animated from "./components/animated"; const NavMenuItem = props => { + const [isLoading, setIsLoading] = useState(false); + const isSyncing = useUserStore(store => store.isSyncing); + useEffect(() => { + if (props.item.animatable) { + if (props.item.key === "sync") setIsLoading(isSyncing); + } + }, [isSyncing, setIsLoading, props.item]); + return (