diff --git a/addon/chrome/content/preferences.xhtml b/addon/chrome/content/preferences.xhtml index 91da34f..50ab9cd 100644 --- a/addon/chrome/content/preferences.xhtml +++ b/addon/chrome/content/preferences.xhtml @@ -21,6 +21,11 @@ preference="__prefsPrefix__.workspace.outline.expandLevel" > + diff --git a/addon/locale/en-US/preferences.ftl b/addon/locale/en-US/preferences.ftl index d7fe3dc..5c6d21b 100644 --- a/addon/locale/en-US/preferences.ftl +++ b/addon/locale/en-US/preferences.ftl @@ -1,5 +1,7 @@ workspace-title = Workspace workspace-expandLevel-label = Outline expand to heading level +workspace-keepLinks = + .label = Show note links in outline sync-title = Sync sync-period-label = Auto-sync period (seconds) sync-manager = diff --git a/addon/locale/ru-RU/preferences.ftl b/addon/locale/ru-RU/preferences.ftl index 533f53e..afac10d 100644 --- a/addon/locale/ru-RU/preferences.ftl +++ b/addon/locale/ru-RU/preferences.ftl @@ -1,5 +1,7 @@ workspace-title = Рабочее пространство workspace-expandLevel-label = Outline расширить до уровня заголовка +workspace-keepLinks = + .label = Show note links in outline sync-title = Синк sync-period-label = Авто-синк период (сек) sync-manager = diff --git a/addon/locale/zh-CN/preferences.ftl b/addon/locale/zh-CN/preferences.ftl index f6cbbe0..b00c7d8 100644 --- a/addon/locale/zh-CN/preferences.ftl +++ b/addon/locale/zh-CN/preferences.ftl @@ -1,5 +1,7 @@ workspace-title = 工作区 workspace-expandLevel-label = 大纲展开至标题层级 +workspace-keepLinks = + .label = 在大纲中显示笔记链接 sync-title = 同步 sync-period-label = 自动同步周期 (秒) sync-manager = diff --git a/addon/prefs.js b/addon/prefs.js index 5aec9c2..7604120 100644 --- a/addon/prefs.js +++ b/addon/prefs.js @@ -25,3 +25,4 @@ pref("__prefsPrefix__.OCRMathpix.APISecret", ""); pref("__prefsPrefix__.OCRMathpix.APIKey", ""); pref("__prefsPrefix__.workspace.outline.expandLevel", 2); +pref("__prefsPrefix__.workspace.outline.keepLinks", true); diff --git a/src/modules/workspace/content.ts b/src/modules/workspace/content.ts index d7ab9e0..8cee1e1 100644 --- a/src/modules/workspace/content.ts +++ b/src/modules/workspace/content.ts @@ -360,7 +360,7 @@ export async function updateOutline(container: XUL.Box) { type: "setMindMapData", nodes: getNoteTreeFlattened( Zotero.Items.get(addon.data.workspace.mainId), - { keepLink: true }, + { keepLink: !!getPref("workspace.outline.keepLinks") }, ), workspaceType: getContainerType(container), expandLevel: getPref("workspace.outline.expandLevel"),