From 0ead37fd5c93deae3c2e77f95351b655a70e6320 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 13 Apr 2026 15:27:01 +0300 Subject: [PATCH] chore(options/other): use toggles --- .../src/translations/en/translation.json | 5 +- .../widgets/type_widgets/options/other.tsx | 57 ++++++++++--------- 2 files changed, 33 insertions(+), 29 deletions(-) diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json index 38aeb63b24..41d22d962d 100644 --- a/apps/client/src/translations/en/translation.json +++ b/apps/client/src/translations/en/translation.json @@ -1315,7 +1315,8 @@ }, "network_connections": { "network_connections_title": "Network", - "check_for_updates": "Check for updates automatically" + "check_for_updates": "Check for updates automatically", + "check_for_updates_description": "Checks for new versions on GitHub and shows a notification in the global menu when available." }, "note_erasure_timeout": { "note_erasure_timeout_title": "Deleted Notes", @@ -1998,7 +1999,7 @@ "days": "Days" }, "share": { - "title": "Share Settings", + "title": "Share", "redirect_bare_domain": "Redirect bare domain to Share page", "redirect_bare_domain_description": "Redirect anonymous users to the Share page instead of showing Login", "show_login_link": "Show Login link in Share theme", diff --git a/apps/client/src/widgets/type_widgets/options/other.tsx b/apps/client/src/widgets/type_widgets/options/other.tsx index 2effd26f0a..9b96db4e09 100644 --- a/apps/client/src/widgets/type_widgets/options/other.tsx +++ b/apps/client/src/widgets/type_widgets/options/other.tsx @@ -260,34 +260,35 @@ function ShareSettings() { return ( - - { - if (value) { - const shareRootNotes = await search.searchForNotes("#shareRoot"); - const sharedShareRootNote = shareRootNotes.find((note) => note.isShared()); + { + if (value) { + const shareRootNotes = await search.searchForNotes("#shareRoot"); + const sharedShareRootNote = shareRootNotes.find((note) => note.isShared()); - if (sharedShareRootNote) { - toast.showMessage(t("share.share_root_found", { noteTitle: sharedShareRootNote.title })); - } else if (shareRootNotes.length > 0) { - toast.showError(t("share.share_root_not_shared", { noteTitle: shareRootNotes[0].title })); - } else { - toast.showError(t("share.share_root_not_found")); - } + if (sharedShareRootNote) { + toast.showMessage(t("share.share_root_found", { noteTitle: sharedShareRootNote.title })); + } else if (shareRootNotes.length > 0) { + toast.showError(t("share.share_root_not_shared", { noteTitle: shareRootNotes[0].title })); + } else { + toast.showError(t("share.share_root_not_found")); } - setRedirectBareDomain(value); - }} - /> - + } + setRedirectBareDomain(value); + }} + /> - - - + ); } @@ -297,10 +298,12 @@ function NetworkSettings() { return ( - );