From 68086ec3f1f0ec9b2dece84703b9efb1f5d06081 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Fri, 15 Aug 2025 11:30:48 +0300 Subject: [PATCH] feat(react/settings): port sync test --- .../src/widgets/type_widgets/options/sync.tsx | 33 +++++++++++++++++++ apps/server/src/routes/api/sync.ts | 3 +- packages/commons/src/lib/server_api.ts | 8 +++++ 3 files changed, 43 insertions(+), 1 deletion(-) diff --git a/apps/client/src/widgets/type_widgets/options/sync.tsx b/apps/client/src/widgets/type_widgets/options/sync.tsx index 60a6874e4..f312a4dfb 100644 --- a/apps/client/src/widgets/type_widgets/options/sync.tsx +++ b/apps/client/src/widgets/type_widgets/options/sync.tsx @@ -7,8 +7,21 @@ import FormTextBox, { FormTextBoxWithUnit } from "../../react/FormTextBox"; import RawHtml from "../../react/RawHtml"; import OptionsSection from "./components/OptionsSection"; import { useTriliumOptions } from "../../react/hooks"; +import FormText from "../../react/FormText"; +import server from "../../../services/server"; +import toast from "../../../services/toast"; +import { SyncTestResponse } from "@triliumnext/commons"; export default function SyncOptions() { + return ( + <> + + + + ) +} + +export function SyncConfiguration() { const [ options, setOptions ] = useTriliumOptions("syncServerHost", "syncServerTimeout", "syncProxy"); const syncServerHost = useRef(options.syncServerHost); const syncServerTimeout = useRef(options.syncServerTimeout); @@ -60,3 +73,23 @@ export default function SyncOptions() { ) } + +export function SyncTest() { + return ( + + {t("sync_2.test_description")} +