mirror of
https://github.com/cosmicoptima/loom.git
synced 2026-07-22 07:40:25 +00:00
fix settings when no presets exist
This commit is contained in:
parent
ab6180b725
commit
12e5d8cb5c
4 changed files with 12 additions and 2 deletions
5
main.ts
5
main.ts
|
|
@ -1627,6 +1627,11 @@ class LoomSettingTab extends PluginSettingTab {
|
|||
const updatePresetFields = () => {
|
||||
presetFields.empty();
|
||||
|
||||
if (this.plugin.settings.modelPreset === -1) {
|
||||
presetFields.createEl("p", { cls: "loom__no-preset-selected", text: "No preset selected." });
|
||||
return;
|
||||
}
|
||||
|
||||
new Setting(presetFields).setName("Name").addText((text) =>
|
||||
text.setValue(this.plugin.settings.modelPresets[this.plugin.settings.modelPreset].name).onChange((value) => {
|
||||
this.plugin.settings.modelPresets[this.plugin.settings.modelPreset].name = value;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "loom",
|
||||
"name": "Loom",
|
||||
"version": "1.19.1",
|
||||
"version": "1.19.2",
|
||||
"minAppVersion": "0.15.0",
|
||||
"description": "Loom in Obsidian",
|
||||
"author": "celeste",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "obsidian-loom",
|
||||
"version": "1.19.1",
|
||||
"version": "1.19.2",
|
||||
"description": "Loom in Obsidian",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
|
|
|||
|
|
@ -381,6 +381,11 @@ body {
|
|||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
.loom__no-preset-selected {
|
||||
color: var(--text-faint);
|
||||
font-size: var(--font-ui-small);
|
||||
}
|
||||
|
||||
/* hidden -- must be at end */
|
||||
|
||||
.hidden {
|
||||
|
|
|
|||
Loading…
Reference in a new issue