From 657638ee54f93c5e278e2a65b68b98230de102a0 Mon Sep 17 00:00:00 2001 From: Matt Wilkie Date: Mon, 17 Feb 2025 13:46:03 -0700 Subject: [PATCH] responding to code review (thanks pano!) --- .../widgets/type_widgets/content_widget.ts | 2 +- .../options/other/share_settings.ts | 13 ++++++----- src/public/translations/en/translation.json | 22 +++++++++++++++++++ src/services/options_interface.ts | 7 +++--- 4 files changed, 34 insertions(+), 10 deletions(-) diff --git a/src/public/app/widgets/type_widgets/content_widget.ts b/src/public/app/widgets/type_widgets/content_widget.ts index 5bd577fd2..e4cb81c10 100644 --- a/src/public/app/widgets/type_widgets/content_widget.ts +++ b/src/public/app/widgets/type_widgets/content_widget.ts @@ -78,7 +78,7 @@ const CONTENT_WIDGETS: Record = { RevisionSnapshotsLimitOptions, NetworkConnectionsOptions, HtmlImportTagsOptions, - ShareSettingsOptions // moved to the end of the array + ShareSettingsOptions ], _optionsAdvanced: [DatabaseIntegrityCheckOptions, DatabaseAnonymizationOptions, AdvancedSyncOptions, VacuumDatabaseOptions], _backendLog: [BackendLogWidget] diff --git a/src/public/app/widgets/type_widgets/options/other/share_settings.ts b/src/public/app/widgets/type_widgets/options/other/share_settings.ts index 9c7cd1b2d..c4c9d9421 100644 --- a/src/public/app/widgets/type_widgets/options/other/share_settings.ts +++ b/src/public/app/widgets/type_widgets/options/other/share_settings.ts @@ -5,22 +5,23 @@ import type { OptionMap, OptionNames } from "../../../../../../services/options_ const TPL = `
-

${t("Share Settings")}

- +

${t("share.title")}

+
-

${t("When enabled, accessing the root URL will redirect to the Share page instead of Login")}

+

${t("share.redirect_bare_domain_description")}

-

${t("Add a login link to the Share page footer")}

+

${t("share.show_login_link_description")}

+

 

`; diff --git a/src/public/translations/en/translation.json b/src/public/translations/en/translation.json index f8fdbc51a..7fed97206 100644 --- a/src/public/translations/en/translation.json +++ b/src/public/translations/en/translation.json @@ -1656,5 +1656,27 @@ "minutes": "Minutes", "hours": "Hours", "days": "Days" + }, + "share": { + "title": "Share Settings", + "redirect_bare_domain": "Redirect bare domain to Share page", + "redirect_bare_domain_description": "When enabled, accessing the root URL will redirect to the Share page instead of Login", + "show_login_link": "Show Login link in Share theme", + "show_login_link_description": "Add a login link to the Share page footer" + }, + "sync_2": { + "config_title": "Sync Configuration", + "server_address": "Server instance address", + "timeout": "Sync timeout (milliseconds)", + "proxy_label": "Sync proxy server (optional)", + "note": "Note", + "note_description": "If you leave the proxy setting blank, the system proxy will be used (applies to desktop/electron build only).", + "special_value_description": "Another special value is noproxy which forces ignoring even the system proxy and respects NODE_TLS_REJECT_UNAUTHORIZED.", + "save": "Save", + "help": "Help", + "test_title": "Sync Test", + "test_description": "This will test the connection and handshake to the sync server. If the sync server isn't initialized, this will set it up to sync with the local document.", + "test_button": "Test sync", + "handshake_failed": "Sync server handshake failed, error: {{message}}" } } diff --git a/src/services/options_interface.ts b/src/services/options_interface.ts index ef55af6c5..9a89c9ac7 100644 --- a/src/services/options_interface.ts +++ b/src/services/options_interface.ts @@ -29,9 +29,6 @@ export interface OptionDefinitions extends KeyboardShortcutsOptions