Skip to content

Build your personal knowledge base with Trilium Notes

feat(setup): add a banner on mobile when sync is in progress

Elian Doran128d1a507f60
diff --git a/apps/client/src/setup.tsx b/apps/client/src/setup.tsx
index dd449107e9..79046e8de5 100644
--- a/apps/client/src/setup.tsx
+++ b/apps/client/src/setup.tsx
@@ -9,7 +9,7 @@ import { useTranslation } from "react-i18next";
import logo from "./assets/icon-color.svg?url";
import { initLocale, t } from "./services/i18n";
import server from "./services/server";
-import { isElectron, replaceHtmlEscapedSlashes } from "./services/utils";
+import { isElectron, isMobileApp, replaceHtmlEscapedSlashes } from "./services/utils";
import ActionButton from "./widgets/react/ActionButton";
import Admonition from "./widgets/react/Admonition";
import Button from "./widgets/react/Button";
@@ -246,6 +246,12 @@ function SyncInProgress({ device }: { device: "server" | "desktop" }) {
</CardSection>
))}
</Card>
+
+ {isMobileApp() && (
+ <Admonition type="note" className="sync-banner">
+ {t("setup.sync-in-progress-banner")}
+ </Admonition>
+ )}
</SetupPage>
);
}
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json
index 6cfbd1b289..a18d21beaa 100644
--- a/apps/client/src/translations/en/translation.json
+++ b/apps/client/src/translations/en/translation.json
@@ -2526,6 +2526,7 @@
"sync-from-server-page-description": "Enter your server details below to connect your existing workspace.",
"sync-in-progress-title": "Sync in progress",
"sync-in-progress-description": "Your device is now connected and items are being synchronized.",
+ "sync-in-progress-banner": "This may take a while depending on the size of your notes. Please do not switch to another application until the sync is complete.",
"button-back": "Back",
"button-finish-setup": "Finish setup",
"sync-step-connecting": "Connecting to server",