Skip to content

Build your personal knowledge base with Trilium Notes

chore(standalone/setup): basic sync page

Elian Doranb6ea29ffc97d
diff --git a/apps/client/src/setup.tsx b/apps/client/src/setup.tsx
index 807ec2d3cb..e7f6408f96 100644
--- a/apps/client/src/setup.tsx
+++ b/apps/client/src/setup.tsx
@@ -19,15 +19,16 @@ async function main() {
document.body.replaceChildren(bodyWrapper);
}
-type State = "firstOptions" | "syncFromDesktop" | "syncFromServer";
+type State = "firstOptions" | "syncFromDesktop" | "syncFromServer" | "syncInProgress" | "syncFailed";
function App() {
- const [ state, setState ] = useState<State>("syncFromServer");
+ const [ state, setState ] = useState<State>("syncInProgress");
return (
<div class="setup-container">
{state === "firstOptions" && <SetupOptions setState={setState} />}
{state === "syncFromServer" && <SyncFromServer setState={setState} />}
+ {state === "syncInProgress" && <SyncInProgress />}
</div>
);
}
@@ -68,6 +69,15 @@ function SetupOptions({ setState }: { setState: (state: State) => void }) {
);
}
+function SyncInProgress() {
+ return (
+ <div class="page sync-in-progress">
+ <h1>{t("setup.sync-in-progress-title")}</h1>
+ <p>{t("setup.sync-in-progress-description")}</p>
+ </div>
+ );
+}
+
function SyncFromServer({ setState }: { setState: (state: State) => void }) {
const [serverUrl, setServerUrl] = useState("");
const [password, setPassword] = useState("");
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json
index 73529a5867..8777665bbd 100644
--- a/apps/client/src/translations/en/translation.json
+++ b/apps/client/src/translations/en/translation.json
@@ -2245,6 +2245,8 @@
"title": "Setup",
"sync-from-server-page-title": "Connect to sync server",
"sync-from-server-page-description": "Enter your server details below to connect your existing workspace.",
+ "sync-in-progress-title": "Connection successful",
+ "sync-in-progress-description": "Your device is now connected and items are being synchronized.",
"password-placeholder": "Password",
"button-back": "Back",
"button-finish-setup": "Finish setup"