diff --git a/apps/desktop/src/components/editor/EditorSettingsDialog.vue b/apps/desktop/src/components/editor/EditorSettingsDialog.vue index c8b3088a14..525200f9da 100644 --- a/apps/desktop/src/components/editor/EditorSettingsDialog.vue +++ b/apps/desktop/src/components/editor/EditorSettingsDialog.vue @@ -334,6 +334,7 @@ import { type SettingsSearchEntry, type ToolbarVisibilityItem, } from "@/lib/settings/settingsSearch"; +import { findSettingsSearchHighlightTarget } from "@/lib/settings/settingsSearchHighlight"; import { LOCALE_OPTIONS } from "@/lib/app/localeOptions"; import { DEFAULT_WEB_DAV_AUTO_UPLOAD_INTERVAL_MINUTES, DEFAULT_WEB_DAV_REMOTE_PATH, normalizedWebDavAutoUploadInterval, readSyncMethod, writeWebDavAutoUploadFields, writeWebDavBackupSelection, writeSyncMethod, type SyncMethod } from "@/lib/webdav/webdavAutoUploadConfig"; import { apiUrl, webPath } from "@/lib/common/webPath"; @@ -3407,23 +3408,6 @@ function applySettingsSearchRoute(result: SettingsSearchEntry) { if (result.route?.syncMethodTab) syncMethodTab.value = result.route.syncMethodTab; } -function normalizeSettingsSearchText(value: string | null | undefined): string { - return value?.replace(/\s+/g, " ").trim() ?? ""; -} - -function findSettingsSearchHighlightTarget(searchRoot: HTMLElement, title: string): HTMLElement { - const titleElement = Array.from(searchRoot.querySelectorAll("label, h3, h4")).find((element) => normalizeSettingsSearchText(element.textContent) === title); - if (!titleElement) return searchRoot; - - let candidate = titleElement.parentElement; - while (candidate && candidate !== searchRoot) { - if (candidate.classList.contains("rounded-md") && candidate.classList.contains("border")) return candidate; - if (candidate.querySelector("input, button, [role='combobox'], textarea")) return candidate; - candidate = candidate.parentElement; - } - return titleElement; -} - async function revealSettingsSearchTarget(result: SettingsSearchEntry) { await nextTick(); const searchRoot = settingsContentScrollRef.value?.querySelector(`[data-settings-search-id="${result.targetId}"]`); @@ -7539,45 +7523,6 @@ onUnmounted(() => { -
-
- - -

{{ t("settings.welcomePageDescription") }}

-
-
-
- - -
-
- - -
@@ -7737,6 +7682,45 @@ onUnmounted(() => {
+ + +
+
+ + +

{{ t("settings.welcomePageDescription") }}

+
+
+
+ + +
+
+
diff --git a/apps/desktop/src/components/layout/WelcomeScreen.vue b/apps/desktop/src/components/layout/WelcomeScreen.vue index e3221e40e2..b0374703d5 100644 --- a/apps/desktop/src/components/layout/WelcomeScreen.vue +++ b/apps/desktop/src/components/layout/WelcomeScreen.vue @@ -1,8 +1,10 @@