mirror of
https://github.com/lostpaul/obsidian-folder-notes.git
synced 2026-07-22 07:40:24 +00:00
Update PathSettings.ts
This commit is contained in:
parent
1f5f383921
commit
3011bbad82
1 changed files with 18 additions and 16 deletions
|
|
@ -39,22 +39,24 @@ export async function renderPath(settingsTab: SettingsTab) {
|
|||
})
|
||||
);
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName('Auto update folder name in the path (front matter title plugin only)')
|
||||
.setDesc('Automatically update the folder name in the path when the front matter title plugin is enabled and the title for a folder note is changed in the front matter. This will not change the file name, only the displayed name in the path.')
|
||||
.addToggle((toggle) =>
|
||||
toggle
|
||||
.setValue(settingsTab.plugin.settings.frontMatterTitle.path)
|
||||
.onChange(async (value) => {
|
||||
settingsTab.plugin.settings.frontMatterTitle.path = value;
|
||||
await settingsTab.plugin.saveSettings();
|
||||
if (value) {
|
||||
settingsTab.plugin.updateAllBreadcrumbs();
|
||||
} else {
|
||||
settingsTab.plugin.updateAllBreadcrumbs(true);
|
||||
}
|
||||
})
|
||||
);
|
||||
if (settingsTab.plugin.settings.frontMatterTitle.enabled) {
|
||||
new Setting(containerEl)
|
||||
.setName('Auto update folder name in the path (front matter title plugin only)')
|
||||
.setDesc('Automatically update the folder name in the path when the front matter title plugin is enabled and the title for a folder note is changed in the front matter. This will not change the file name, only the displayed name in the path.')
|
||||
.addToggle((toggle) =>
|
||||
toggle
|
||||
.setValue(settingsTab.plugin.settings.frontMatterTitle.path)
|
||||
.onChange(async (value) => {
|
||||
settingsTab.plugin.settings.frontMatterTitle.path = value;
|
||||
await settingsTab.plugin.saveSettings();
|
||||
if (value) {
|
||||
settingsTab.plugin.updateAllBreadcrumbs();
|
||||
} else {
|
||||
settingsTab.plugin.updateAllBreadcrumbs(true);
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
settingsTab.settingsPage.createEl('h3', { text: 'Style settings' });
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue