responding to code review (thanks pano!)

This commit is contained in:
Matt Wilkie 2025-02-17 13:46:03 -07:00
parent 2ec2d784ec
commit 657638ee54
4 changed files with 34 additions and 10 deletions

View File

@ -78,7 +78,7 @@ const CONTENT_WIDGETS: Record<string, (typeof NoteContextAwareWidget)[]> = {
RevisionSnapshotsLimitOptions,
NetworkConnectionsOptions,
HtmlImportTagsOptions,
ShareSettingsOptions // moved to the end of the array
ShareSettingsOptions
],
_optionsAdvanced: [DatabaseIntegrityCheckOptions, DatabaseAnonymizationOptions, AdvancedSyncOptions, VacuumDatabaseOptions],
_backendLog: [BackendLogWidget]

View File

@ -5,22 +5,23 @@ import type { OptionMap, OptionNames } from "../../../../../../services/options_
const TPL = `
<div class="card-body">
<h4>${t("Share Settings")}</h4>
<h4>${t("share.title")}</h4>
<div class="form-check">
<label class="form-check-label">
<input class="form-check-input" type="checkbox" name="redirectBareDomain" value="true">
${t("Redirect bare domain to Share page")}
${t("share.redirect_bare_domain")}
</label>
<p class="form-text">${t("When enabled, accessing the root URL will redirect to the Share page instead of Login")}</p>
<p class="form-text">${t("share.redirect_bare_domain_description")}</p>
</div>
<div class="form-check">
<label class="form-check-label">
<input class="form-check-input" type="checkbox" name="showLoginInShareTheme" value="true">
${t("Show Login link in Share theme")}
${t("share.show_login_link")}
</label>
<p class="form-text">${t("Add a login link to the Share page footer")}</p>
<p class="form-text">${t("share.show_login_link_description")}</p>
<p>&nbsp;</p>
</div>
</div>`;

View File

@ -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 <code>noproxy</code> which forces ignoring even the system proxy and respects <code>NODE_TLS_REJECT_UNAUTHORIZED</code>.",
"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}}"
}
}

View File

@ -29,9 +29,6 @@ export interface OptionDefinitions extends KeyboardShortcutsOptions<KeyboardActi
detailFontFamily: FontFamily;
monospaceFontFamily: FontFamily;
spellCheckLanguageCode: string;
// Share settings
redirectBareDomain: string;
showLoginInShareTheme: string;
codeNotesMimeTypes: string;
headingStyle: string;
highlightsList: string;
@ -97,6 +94,10 @@ export interface OptionDefinitions extends KeyboardShortcutsOptions<KeyboardActi
codeBlockWordWrap: boolean;
textNoteEditorMultilineToolbar: boolean;
backgroundEffects: boolean;
// Share settings
redirectBareDomain: boolean;
showLoginInShareTheme: boolean;
}
export type OptionNames = keyof OptionDefinitions;