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")}
+
+ )
+}
\ No newline at end of file
diff --git a/apps/server/src/routes/api/sync.ts b/apps/server/src/routes/api/sync.ts
index 22c4fa4f0..0514470ee 100644
--- a/apps/server/src/routes/api/sync.ts
+++ b/apps/server/src/routes/api/sync.ts
@@ -16,8 +16,9 @@ import type { EntityChange } from "../../services/entity_changes_interface.js";
import ValidationError from "../../errors/validation_error.js";
import consistencyChecksService from "../../services/consistency_checks.js";
import { t } from "i18next";
+import { SyncTestResponse } from "@triliumnext/commons";
-async function testSync() {
+async function testSync(): Promise {
try {
if (!syncOptions.isSyncSetup()) {
return { success: false, message: t("test_sync.not-configured") };
diff --git a/packages/commons/src/lib/server_api.ts b/packages/commons/src/lib/server_api.ts
index 543246f8f..859c5629a 100644
--- a/packages/commons/src/lib/server_api.ts
+++ b/packages/commons/src/lib/server_api.ts
@@ -77,3 +77,11 @@ export interface AnonymizedDbResponse {
filePath: string;
fileName: string;
}
+
+export type SyncTestResponse = {
+ success: true;
+ message: string;
+} | {
+ success: false;
+ error: string;
+};