Fix casing in settings to match official guidelines
This commit is contained in:
parent
8fe741ba10
commit
edbdcd32ce
2 changed files with 23 additions and 25 deletions
|
|
@ -24,7 +24,7 @@
|
||||||
<pre class="media-db-plugin-property-mapping-element-property-name"><code>{property.property}</code></pre>
|
<pre class="media-db-plugin-property-mapping-element-property-name"><code>{property.property}</code></pre>
|
||||||
</div>
|
</div>
|
||||||
{#if property.locked}
|
{#if property.locked}
|
||||||
<div class="media-db-plugin-property-binding-text">property can not be remapped</div>
|
<div class="media-db-plugin-property-binding-text">property cannot be remapped</div>
|
||||||
{:else}
|
{:else}
|
||||||
<select class="dropdown" bind:value={property.mapping}>
|
<select class="dropdown" bind:value={property.mapping}>
|
||||||
{#each propertyMappingOptions as remappingOption}
|
{#each propertyMappingOptions as remappingOption}
|
||||||
|
|
|
||||||
|
|
@ -179,8 +179,6 @@ export class MediaDbSettingTab extends PluginSettingTab {
|
||||||
|
|
||||||
containerEl.empty();
|
containerEl.empty();
|
||||||
|
|
||||||
containerEl.createEl('h2', { text: 'Media DB Plugin Settings' });
|
|
||||||
|
|
||||||
new Setting(containerEl)
|
new Setting(containerEl)
|
||||||
.setName('OMDb API key')
|
.setName('OMDb API key')
|
||||||
.setDesc('API key for "www.omdbapi.com".')
|
.setDesc('API key for "www.omdbapi.com".')
|
||||||
|
|
@ -281,7 +279,7 @@ export class MediaDbSettingTab extends PluginSettingTab {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// containerEl.createEl('h3', { text: 'APIs Per Media Type' });
|
// containerEl.createEl('h3', { text: 'APIs per media type' });
|
||||||
// containerEl.createEl('h5', { text: 'Movies' });
|
// containerEl.createEl('h5', { text: 'Movies' });
|
||||||
// new Setting(containerEl)
|
// new Setting(containerEl)
|
||||||
// .setName('OMDb API')
|
// .setName('OMDb API')
|
||||||
|
|
@ -349,10 +347,10 @@ export class MediaDbSettingTab extends PluginSettingTab {
|
||||||
// });
|
// });
|
||||||
// });
|
// });
|
||||||
|
|
||||||
containerEl.createEl('h3', { text: 'New File Location' });
|
containerEl.createEl('h3', { text: 'New file location' });
|
||||||
// region new file location
|
// region new file location
|
||||||
new Setting(containerEl)
|
new Setting(containerEl)
|
||||||
.setName('Movie Folder')
|
.setName('Movie folder')
|
||||||
.setDesc('Where newly imported movies should be placed.')
|
.setDesc('Where newly imported movies should be placed.')
|
||||||
.addSearch(cb => {
|
.addSearch(cb => {
|
||||||
new FolderSuggest(this.app, cb.inputEl);
|
new FolderSuggest(this.app, cb.inputEl);
|
||||||
|
|
@ -365,7 +363,7 @@ export class MediaDbSettingTab extends PluginSettingTab {
|
||||||
});
|
});
|
||||||
|
|
||||||
new Setting(containerEl)
|
new Setting(containerEl)
|
||||||
.setName('Series Folder')
|
.setName('Series folder')
|
||||||
.setDesc('Where newly imported series should be placed.')
|
.setDesc('Where newly imported series should be placed.')
|
||||||
.addSearch(cb => {
|
.addSearch(cb => {
|
||||||
new FolderSuggest(this.app, cb.inputEl);
|
new FolderSuggest(this.app, cb.inputEl);
|
||||||
|
|
@ -378,7 +376,7 @@ export class MediaDbSettingTab extends PluginSettingTab {
|
||||||
});
|
});
|
||||||
|
|
||||||
new Setting(containerEl)
|
new Setting(containerEl)
|
||||||
.setName('Manga Folder')
|
.setName('Manga folder')
|
||||||
.setDesc('Where newly imported manga should be placed.')
|
.setDesc('Where newly imported manga should be placed.')
|
||||||
.addSearch(cb => {
|
.addSearch(cb => {
|
||||||
new FolderSuggest(this.app, cb.inputEl);
|
new FolderSuggest(this.app, cb.inputEl);
|
||||||
|
|
@ -391,7 +389,7 @@ export class MediaDbSettingTab extends PluginSettingTab {
|
||||||
});
|
});
|
||||||
|
|
||||||
new Setting(containerEl)
|
new Setting(containerEl)
|
||||||
.setName('Game Folder')
|
.setName('Game folder')
|
||||||
.setDesc('Where newly imported games should be placed.')
|
.setDesc('Where newly imported games should be placed.')
|
||||||
.addSearch(cb => {
|
.addSearch(cb => {
|
||||||
new FolderSuggest(this.app, cb.inputEl);
|
new FolderSuggest(this.app, cb.inputEl);
|
||||||
|
|
@ -404,7 +402,7 @@ export class MediaDbSettingTab extends PluginSettingTab {
|
||||||
});
|
});
|
||||||
|
|
||||||
new Setting(containerEl)
|
new Setting(containerEl)
|
||||||
.setName('Wiki Folder')
|
.setName('Wiki folder')
|
||||||
.setDesc('Where newly imported wiki articles should be placed.')
|
.setDesc('Where newly imported wiki articles should be placed.')
|
||||||
.addSearch(cb => {
|
.addSearch(cb => {
|
||||||
new FolderSuggest(this.app, cb.inputEl);
|
new FolderSuggest(this.app, cb.inputEl);
|
||||||
|
|
@ -417,7 +415,7 @@ export class MediaDbSettingTab extends PluginSettingTab {
|
||||||
});
|
});
|
||||||
|
|
||||||
new Setting(containerEl)
|
new Setting(containerEl)
|
||||||
.setName('Music Folder')
|
.setName('Music folder')
|
||||||
.setDesc('Where newly imported music should be placed.')
|
.setDesc('Where newly imported music should be placed.')
|
||||||
.addSearch(cb => {
|
.addSearch(cb => {
|
||||||
new FolderSuggest(this.app, cb.inputEl);
|
new FolderSuggest(this.app, cb.inputEl);
|
||||||
|
|
@ -430,7 +428,7 @@ export class MediaDbSettingTab extends PluginSettingTab {
|
||||||
});
|
});
|
||||||
|
|
||||||
new Setting(containerEl)
|
new Setting(containerEl)
|
||||||
.setName('Board Game Folder')
|
.setName('Board game folder')
|
||||||
.setDesc('Where newly imported board games should be places.')
|
.setDesc('Where newly imported board games should be places.')
|
||||||
.addSearch(cb => {
|
.addSearch(cb => {
|
||||||
new FolderSuggest(this.app, cb.inputEl);
|
new FolderSuggest(this.app, cb.inputEl);
|
||||||
|
|
@ -442,7 +440,7 @@ export class MediaDbSettingTab extends PluginSettingTab {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
new Setting(containerEl)
|
new Setting(containerEl)
|
||||||
.setName('Book Folder')
|
.setName('Book folder')
|
||||||
.setDesc('Where newly imported books should be placed.')
|
.setDesc('Where newly imported books should be placed.')
|
||||||
.addSearch(cb => {
|
.addSearch(cb => {
|
||||||
new FolderSuggest(this.app, cb.inputEl);
|
new FolderSuggest(this.app, cb.inputEl);
|
||||||
|
|
@ -455,7 +453,7 @@ export class MediaDbSettingTab extends PluginSettingTab {
|
||||||
});
|
});
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
containerEl.createEl('h3', { text: 'Template Settings' });
|
containerEl.createEl('h3', { text: 'Template settings' });
|
||||||
// region templates
|
// region templates
|
||||||
new Setting(containerEl)
|
new Setting(containerEl)
|
||||||
.setName('Movie template')
|
.setName('Movie template')
|
||||||
|
|
@ -523,7 +521,7 @@ export class MediaDbSettingTab extends PluginSettingTab {
|
||||||
});
|
});
|
||||||
|
|
||||||
new Setting(containerEl)
|
new Setting(containerEl)
|
||||||
.setName('Music Release template')
|
.setName('Music release template')
|
||||||
.setDesc('Template file to be used when creating a new note for a music release.')
|
.setDesc('Template file to be used when creating a new note for a music release.')
|
||||||
.addSearch(cb => {
|
.addSearch(cb => {
|
||||||
new FileSuggest(this.app, cb.inputEl);
|
new FileSuggest(this.app, cb.inputEl);
|
||||||
|
|
@ -536,7 +534,7 @@ export class MediaDbSettingTab extends PluginSettingTab {
|
||||||
});
|
});
|
||||||
|
|
||||||
new Setting(containerEl)
|
new Setting(containerEl)
|
||||||
.setName('Board Game template')
|
.setName('Board game template')
|
||||||
.setDesc('Template file to be used when creating a new note for a boardgame.')
|
.setDesc('Template file to be used when creating a new note for a boardgame.')
|
||||||
.addSearch(cb => {
|
.addSearch(cb => {
|
||||||
new FileSuggest(this.app, cb.inputEl);
|
new FileSuggest(this.app, cb.inputEl);
|
||||||
|
|
@ -562,7 +560,7 @@ export class MediaDbSettingTab extends PluginSettingTab {
|
||||||
});
|
});
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
containerEl.createEl('h3', { text: 'File Name Settings' });
|
containerEl.createEl('h3', { text: 'File name settings' });
|
||||||
// region file name templates
|
// region file name templates
|
||||||
new Setting(containerEl)
|
new Setting(containerEl)
|
||||||
.setName('Movie file name template')
|
.setName('Movie file name template')
|
||||||
|
|
@ -625,7 +623,7 @@ export class MediaDbSettingTab extends PluginSettingTab {
|
||||||
});
|
});
|
||||||
|
|
||||||
new Setting(containerEl)
|
new Setting(containerEl)
|
||||||
.setName('Music Release file name template')
|
.setName('Music release file name template')
|
||||||
.setDesc('Template for the file name used when creating a new note for a music release.')
|
.setDesc('Template for the file name used when creating a new note for a music release.')
|
||||||
.addText(cb => {
|
.addText(cb => {
|
||||||
cb.setPlaceholder(`Example: ${DEFAULT_SETTINGS.musicReleaseFileNameTemplate}`)
|
cb.setPlaceholder(`Example: ${DEFAULT_SETTINGS.musicReleaseFileNameTemplate}`)
|
||||||
|
|
@ -637,7 +635,7 @@ export class MediaDbSettingTab extends PluginSettingTab {
|
||||||
});
|
});
|
||||||
|
|
||||||
new Setting(containerEl)
|
new Setting(containerEl)
|
||||||
.setName('Board Game file name template')
|
.setName('Board game file name template')
|
||||||
.setDesc('Template for the file name used when creating a new note for a boardgame.')
|
.setDesc('Template for the file name used when creating a new note for a boardgame.')
|
||||||
.addText(cb => {
|
.addText(cb => {
|
||||||
cb.setPlaceholder(`Example: ${DEFAULT_SETTINGS.boardgameFileNameTemplate}`)
|
cb.setPlaceholder(`Example: ${DEFAULT_SETTINGS.boardgameFileNameTemplate}`)
|
||||||
|
|
@ -663,18 +661,18 @@ export class MediaDbSettingTab extends PluginSettingTab {
|
||||||
|
|
||||||
// region Property Mappings
|
// region Property Mappings
|
||||||
if (this.plugin.settings.useDefaultFrontMatter) {
|
if (this.plugin.settings.useDefaultFrontMatter) {
|
||||||
containerEl.createEl('h3', { text: 'Property Mappings' });
|
containerEl.createEl('h3', { text: 'Property mappings' });
|
||||||
|
|
||||||
const propertyMappingExplanation = containerEl.createEl('div');
|
const propertyMappingExplanation = containerEl.createEl('div');
|
||||||
propertyMappingExplanation.innerHTML = `
|
propertyMappingExplanation.innerHTML = `
|
||||||
<p>Allow you to remap the metadata fields of newly created media db entries.</p>
|
<p>Remap the metadata fields of newly created media DB entries.</p>
|
||||||
<p>
|
<p>
|
||||||
The different options are:
|
The options are:
|
||||||
<lu>
|
<ul>
|
||||||
<li>"default": does no remapping and keeps the metadata field as it is</li>
|
<li>"default": does no remapping and keeps the metadata field as it is</li>
|
||||||
<li>"remap": renames the metadata field to what ever you specify</li>
|
<li>"remap": renames the metadata field to what ever you specify</li>
|
||||||
<li>"remove": removes the metadata field entirely</li>
|
<li>"remove": removes the metadata field entirely</li>
|
||||||
</lu>
|
</ul>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Don't forget to save your changes using the save button for each individual category.
|
Don't forget to save your changes using the save button for each individual category.
|
||||||
|
|
@ -696,7 +694,7 @@ export class MediaDbSettingTab extends PluginSettingTab {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.plugin.settings.propertyMappingModels = propertyMappingModels;
|
this.plugin.settings.propertyMappingModels = propertyMappingModels;
|
||||||
new Notice(`MDB: Property Mappings for ${model.type} saved successfully.`);
|
new Notice(`MDB: Property mappings for ${model.type} saved successfully.`);
|
||||||
void this.plugin.saveSettings();
|
void this.plugin.saveSettings();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue