Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

feat: add force sync button in settings

thecodrr92599a0de8e2
diff --git a/apps/web/src/stores/app-store.js b/apps/web/src/stores/app-store.js
index 81e5e129b..48a5a29ad 100644
--- a/apps/web/src/stores/app-store.js
+++ b/apps/web/src/stores/app-store.js
@@ -121,11 +121,11 @@ class AppStore extends BaseStore {
this.set((state) => (state.lastSynced = lastSynced));
};
- sync = async (full = true) => {
+ sync = async (full = true, force = false) => {
this.updateLastSynced();
this.set((state) => (state.isSyncing = true));
return db
- .sync(full)
+ .sync(full, force)
.then(async () => {
showToast("Sync completed.");
await this.updateLastSynced();
diff --git a/apps/web/src/views/settings.js b/apps/web/src/views/settings.js
index 6806ede02..2b6dfe058 100644
--- a/apps/web/src/views/settings.js
+++ b/apps/web/src/views/settings.js
@@ -98,6 +98,7 @@ function Settings(props) {
const isSystemThemeDark = useSystemTheme();
const isVaultCreated = useAppStore((store) => store.isVaultCreated);
const refreshApp = useAppStore((store) => store.refresh);
+ const sync = useAppStore((store) => store.sync);
const theme = useThemeStore((store) => store.theme);
const toggleNightMode = useThemeStore((store) => store.toggleNightMode);
const setTheme = useThemeStore((store) => store.setTheme);
@@ -194,7 +195,16 @@ function Settings(props) {
}
}}
>
- <Tip text="Change account password" />
+ <Tip
+ text="Change account password"
+ tip="Set a new password for your account"
+ />
+ </Button>
+ <Button variant="list" onClick={() => sync(true, true)}>
+ <Tip
+ text="Having problems with syncing?"
+ tip="Try force sync to resolve issues with syncing"
+ />
</Button>
<Button
variant="list"
diff --git a/apps/web/yarn.lock b/apps/web/yarn.lock
index 722489d9c..380b4a038 100644
--- a/apps/web/yarn.lock
+++ b/apps/web/yarn.lock
@@ -9191,8 +9191,8 @@ normalize-url@^4.1.0:
integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==
"notes-core@git+https://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:[email protected]/streetwriters/notesnook-core.git":
- version "6.7.0"
- resolved "git+https://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:[email protected]/streetwriters/notesnook-core.git#306e5399a1802fca49be5171b7dd507b51a5443e"
+ version "6.7.1"
+ resolved "git+https://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:[email protected]/streetwriters/notesnook-core.git#44e9857659885e7a9890ca77c1d1c4979726a163"
dependencies:
"@stablelib/blake2s" "^1.0.1"
fast-sort "^2.0.1"