From 6fb90abd75fb5f1de5af32590d8903277ddf20e1 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 18 Aug 2025 18:22:07 +0300 Subject: [PATCH] feat(react/settings): port network connections --- .../widgets/type_widgets/options/other.tsx | 15 ++++++++++ .../options/other/network_connections.ts | 28 ------------------- 2 files changed, 15 insertions(+), 28 deletions(-) delete mode 100644 apps/client/src/widgets/type_widgets/options/other/network_connections.ts diff --git a/apps/client/src/widgets/type_widgets/options/other.tsx b/apps/client/src/widgets/type_widgets/options/other.tsx index 0ad51f077..3ad95a55a 100644 --- a/apps/client/src/widgets/type_widgets/options/other.tsx +++ b/apps/client/src/widgets/type_widgets/options/other.tsx @@ -21,6 +21,7 @@ export default function OtherSettings() { + ) } @@ -167,4 +168,18 @@ function ShareSettings() { ) +} + +function NetworkSettings() { + const [ checkForUpdates, setCheckForUpdates ] = useTriliumOptionBool("checkForUpdates"); + + return ( + + + + ) } \ No newline at end of file diff --git a/apps/client/src/widgets/type_widgets/options/other/network_connections.ts b/apps/client/src/widgets/type_widgets/options/other/network_connections.ts deleted file mode 100644 index 529b9959e..000000000 --- a/apps/client/src/widgets/type_widgets/options/other/network_connections.ts +++ /dev/null @@ -1,28 +0,0 @@ -import OptionsWidget from "../options_widget.js"; -import { t } from "../../../../services/i18n.js"; -import type { OptionMap } from "@triliumnext/commons"; - -const TPL = /*html*/` -
-

${t("network_connections.network_connections_title")}

- - -
`; - -export default class NetworkConnectionsOptions extends OptionsWidget { - - private $checkForUpdates!: JQuery; - - doRender() { - this.$widget = $(TPL); - this.$checkForUpdates = this.$widget.find(".check-for-updates"); - this.$checkForUpdates.on("change", () => this.updateCheckboxOption("checkForUpdates", this.$checkForUpdates)); - } - - async optionsLoaded(options: OptionMap) { - this.setCheckboxState(this.$checkForUpdates, options.checkForUpdates); - } -}