Update PathSettings.ts

This commit is contained in:
Lost Paul 2025-06-21 11:50:11 +02:00
parent 1f5f383921
commit 3011bbad82

View file

@ -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' });