add: show note links in outline settings

This commit is contained in:
windingwind 2023-10-19 11:54:53 +08:00
parent f25d9e34cd
commit 0b6e5139ab
6 changed files with 13 additions and 1 deletions

View File

@ -21,6 +21,11 @@
preference="__prefsPrefix__.workspace.outline.expandLevel"
></html:input>
</hbox>
<checkbox
data-l10n-id="workspace-keepLinks"
native="true"
preference="__prefsPrefix__.workspace.outline.keepLinks"
/>
</groupbox>
<groupbox>
<label><html:h2 data-l10n-id="sync-title"></html:h2></label>

View File

@ -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 =

View File

@ -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 =

View File

@ -1,5 +1,7 @@
workspace-title = 工作区
workspace-expandLevel-label = 大纲展开至标题层级
workspace-keepLinks =
.label = 在大纲中显示笔记链接
sync-title = 同步
sync-period-label = 自动同步周期 (秒)
sync-manager =

View File

@ -25,3 +25,4 @@ pref("__prefsPrefix__.OCRMathpix.APISecret", "");
pref("__prefsPrefix__.OCRMathpix.APIKey", "");
pref("__prefsPrefix__.workspace.outline.expandLevel", 2);
pref("__prefsPrefix__.workspace.outline.keepLinks", true);

View File

@ -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"),