diff --git a/apps/client/src/setup.tsx b/apps/client/src/setup.tsx index 0473c8eba8..02e6a3d299 100644 --- a/apps/client/src/setup.tsx +++ b/apps/client/src/setup.tsx @@ -369,14 +369,14 @@ function SyncFromDesktop({ setState }: { setState: (state: State) => void }) { 1. {t("setup.sync-from-desktop-step1")} 2. {t("setup.sync-from-desktop-step2")} 3. {t("setup.sync-from-desktop-step3")} - 4. {t("setup.sync-from-desktop-step4", { protocol: location.protocol, port: location.port })} + 4. {t("setup.sync-from-desktop-step4")} 5. {t("setup.sync-from-desktop-step5")} {networkAddresses.length > 0 && ( {networkAddresses.map((addr) => ( - {`${location.protocol}//${addr}:${location.port}`} + {addr} ))} )} @@ -471,7 +471,7 @@ function SetupPage({ title, description, className, illustration, children, foot function getNetworkAddresses(): string[] { if (!isElectron()) { - return []; + return [`${location.protocol}//${location.host}`]; } // eslint-disable-next-line @typescript-eslint/no-require-imports @@ -491,7 +491,7 @@ function getNetworkAddresses(): string[] { // Sort by likelihood of being the local network address. addresses.sort((a, b) => networkScore(a) - networkScore(b)); - return addresses; + return addresses.map((addr) => `${location.protocol}//${addr}:${location.port}`); } function networkScore(addr: string): number { diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json index 2c8528d486..6afd867eae 100644 --- a/apps/client/src/translations/en/translation.json +++ b/apps/client/src/translations/en/translation.json @@ -2264,8 +2264,8 @@ "sync-from-desktop-step1": "Open your desktop instance of Trilium Notes.", "sync-from-desktop-step2": "From the Trilium Menu, click Options.", "sync-from-desktop-step3": "Click on Sync category in the note tree.", - "sync-from-desktop-step4": "Change server instance address to point to this device: \"{{protocol}}//:{{- port}}\" and click Save.", - "sync-from-desktop-step5": "Click \"Test sync\" button to verify connection is successful.", + "sync-from-desktop-step4": "Change server instance address to point to one of the addresses on the right and click Save.", + "sync-from-desktop-step5": "Click the \"Test sync\" button to verify connection is successful.", "sync-from-desktop-warning": "Make sure both devices are on the same network.", "sync-from-desktop-waiting": "Waiting for connection...", "advanced-options": "Advanced options",