Skip to content

Commit

Permalink
fix(TagNote): 🐛 Allow blank default tagNoteFiled
Browse files Browse the repository at this point in the history
  • Loading branch information
SkepticMystic committed Jan 6, 2022
1 parent d62c0ce commit 9a522a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -25564,11 +25564,11 @@ class BCSettingTab extends require$$0.PluginSettingTab {
const tagNoteDetails = subDetails("Tag Notes", alternativeHierarchyDetails);
new require$$0.Setting(tagNoteDetails)
.setName("Default Tag Note Field")
.setDesc(fragWithHTML("By default, tag notes use the first field in your hierarchies (usually an <code>↑</code> field). Choose a different one to use by default, without having to specify <code>BC-tag-note-field: {field}</code>."))
.setDesc(fragWithHTML("By default, tag notes use the first field in your hierarchies (usually an <code>↑</code> field). Choose a different one to use by default, without having to specify <code>BC-tag-note-field: {field}</code>.</br>If you don't want to choose a default, select the blank option at the bottom of the list."))
.addDropdown((dd) => {
const options = {};
getFields(settings.userHiers).forEach((field) => (options[field] = field));
dd.addOptions(options);
dd.addOptions(Object.assign(options, { "": "" }));
dd.onChange(async (field) => {
settings.tagNoteField = field;
await plugin.saveSettings();
Expand Down Expand Up @@ -51791,6 +51791,7 @@ class BCPlugin extends require$$0.Plugin {
console.log("loading breadcrumbs plugin");
await this.loadSettings();
const { settings } = this;
this.addSettingTab(new BCSettingTab(this.app, this));
if (typeof settings.debugMode === "boolean") {
settings.debugMode = settings.debugMode ? "DEBUG" : "WARN";
await this.saveSettings();
Expand Down Expand Up @@ -52112,7 +52113,6 @@ class BCPlugin extends require$$0.Plugin {
});
});
this.addRibbonIcon(addFeatherIcon("tv"), "Breadcrumbs Visualisation", () => new VisModal(this.app, this).open());
this.addSettingTab(new BCSettingTab(this.app, this));
}
getActiveTYPEView(type) {
const { constructor } = this.VIEWS.find((view) => view.type === type);
Expand Down
4 changes: 2 additions & 2 deletions src/BreadcrumbsSettingTab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -729,15 +729,15 @@ export class BCSettingTab extends PluginSettingTab {
.setName("Default Tag Note Field")
.setDesc(
fragWithHTML(
"By default, tag notes use the first field in your hierarchies (usually an <code>↑</code> field). Choose a different one to use by default, without having to specify <code>BC-tag-note-field: {field}</code>."
"By default, tag notes use the first field in your hierarchies (usually an <code>↑</code> field). Choose a different one to use by default, without having to specify <code>BC-tag-note-field: {field}</code>.</br>If you don't want to choose a default, select the blank option at the bottom of the list."
)
)
.addDropdown((dd: DropdownComponent) => {
const options = {};
getFields(settings.userHiers).forEach(
(field) => (options[field] = field)
);
dd.addOptions(options);
dd.addOptions(Object.assign(options, { "": "" }));
dd.onChange(async (field) => {
settings.tagNoteField = field;
await plugin.saveSettings();
Expand Down

0 comments on commit 9a522a5

Please sign in to comment.