Skip to content

Build your personal knowledge base with Trilium Notes

feat(setup): use ExtendedAdmonition and clearer copy for unreachable banner

Elian Doran183358fd8f42
diff --git a/apps/client/src/setup.tsx b/apps/client/src/setup.tsx
index eea24f1059..a68d129c54 100644
--- a/apps/client/src/setup.tsx
+++ b/apps/client/src/setup.tsx
@@ -11,7 +11,7 @@ import { getCurrentLanguage, initLocale, t } from "./services/i18n";
import server from "./services/server";
import { isElectron, isMobileApp, replaceHtmlEscapedSlashes } from "./services/utils";
import ActionButton from "./widgets/react/ActionButton";
-import Admonition from "./widgets/react/Admonition";
+import Admonition, { ExtendedAdmonition } from "./widgets/react/Admonition";
import Button from "./widgets/react/Button";
import { Card, CardFrame, CardSection } from "./widgets/react/Card";
import FormGroup from "./widgets/react/FormGroup";
@@ -443,8 +443,12 @@ function SyncFromDesktop({ setState }: { setState: (state: State) => void }) {
onBack={() => setState("firstOptions")}
>
{networkInfo && !networkInfo.reachableOnNetwork ? (
- <Admonition type="caution" className="sync-from-desktop-unreachable">
- <strong>{t("setup.sync-from-desktop-unreachable-title")}</strong>
+ <ExtendedAdmonition
+ type="caution"
+ className="sync-from-desktop-unreachable"
+ icon="bx bx-wifi-off"
+ title={t("setup.sync-from-desktop-unreachable-title")}
+ >
<p>{t("setup.sync-from-desktop-unreachable-description")}</p>
{isElectron() && (
<div class="unreachable-actions">
@@ -463,7 +467,7 @@ function SyncFromDesktop({ setState }: { setState: (state: State) => void }) {
/>
</div>
)}
- </Admonition>
+ </ExtendedAdmonition>
) : (
<>
<div class="card-columns">
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json
index 963efe5c1e..dea638ed38 100644
--- a/apps/client/src/translations/en/translation.json
+++ b/apps/client/src/translations/en/translation.json
@@ -2790,7 +2790,7 @@
"sync-from-desktop-warning": "Make sure both devices are on the same network.",
"sync-from-desktop-waiting": "Waiting for connection...",
"sync-from-desktop-unreachable-title": "This device can't be reached by other devices",
- "sync-from-desktop-unreachable-description": "Trilium is only listening on localhost, so another device can't connect to it. Set \"host=0.0.0.0\" under the [Network] section of your config.ini, restart Trilium, and try again.",
+ "sync-from-desktop-unreachable-description": "To sync, the other desktop has to connect to this one over the network. For security, this desktop app only accepts connections from this computer, so that other desktop can't reach it yet. To let it in, set \"host=0.0.0.0\" under the [Network] section of your config.ini, then restart Trilium.",
"sync-from-desktop-open-config": "Open config file",
"sync-from-desktop-restart": "Restart Trilium",
"advanced-options": "Advanced options",