Skip to content

Commit

Permalink
update: description in settings
Browse files Browse the repository at this point in the history
  • Loading branch information
anpigon committed Aug 14, 2022
1 parent aa961cf commit 5300e6b
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/settings/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,12 @@ export class BookSearchSettingTab extends PluginSettingTab {

const newFileNameEl = new Setting(containerEl);
const newFileNameHintEl = containerEl.createEl('div');
newFileNameHintEl.classList.add('setting-item-description')
newFileNameHintEl.classList.add('book-search-plugin__settings--new_file_name_hint')
newFileNameHintEl.classList.add('setting-item-description');
newFileNameHintEl.classList.add('book-search-plugin__settings--new_file_name_hint');
const newFileNameHintDesc = document.createDocumentFragment();
const newFileNameHintDescCode = newFileNameHintDesc.createEl('code', { text: replaceDateInString(this.plugin.settings.fileNameFormat) || '{{title}} - {{author}}' })
const newFileNameHintDescCode = newFileNameHintDesc.createEl('code', {
text: replaceDateInString(this.plugin.settings.fileNameFormat) || '{{title}} - {{author}}',
});
newFileNameHintDesc.append(newFileNameHintDescCode);
newFileNameHintEl.append(newFileNameHintDesc);
newFileNameEl
Expand Down Expand Up @@ -147,7 +149,7 @@ export class BookSearchSettingTab extends PluginSettingTab {
});

new Setting(containerEl)
.setName('Text to insert into frontmatter')
.setName('(Deprecated) Text to insert into frontmatter')
.setDesc(createSyntaxesDescription('#text-to-insert-into-frontmatter'))
.addTextArea(textArea => {
const prevValue = this.plugin.settings.frontmatter;
Expand All @@ -161,7 +163,7 @@ export class BookSearchSettingTab extends PluginSettingTab {
containerEl.createEl('h2', { text: 'Content Settings' });

new Setting(containerEl)
.setName('Text to insert into content')
.setName('(Deprecated) Text to insert into content')
.setDesc(createSyntaxesDescription('#text-to-insert-into-content'))
.addTextArea(textArea => {
const prevValue = this.plugin.settings.content;
Expand All @@ -177,6 +179,8 @@ export class BookSearchSettingTab extends PluginSettingTab {
function createSyntaxesDescription(anchorLink: string) {
const desc = document.createDocumentFragment();
desc.append(
'Please use the template file.',
desc.createEl('br'),
'The following syntaxes are available: ',
desc.createEl('br'),
desc.createEl('code', { text: '{{title}}' }),
Expand Down

0 comments on commit 5300e6b

Please sign in to comment.