mirror of
https://github.com/fbarrca/obsidian-inlineAI.git
synced 2026-07-22 11:50:24 +00:00
Refactor settings to use CSS classes for textarea styling
This commit is contained in:
parent
8720cf9624
commit
0f3796ee27
2 changed files with 11 additions and 12 deletions
|
|
@ -1,4 +1,3 @@
|
|||
// MyPluginSettings.ts
|
||||
import { App, PluginSettingTab, Setting } from "obsidian";
|
||||
import MyPlugin from "./main";
|
||||
import { cursorPrompt, selectionPrompt } from "./default_prompts";
|
||||
|
|
@ -34,8 +33,6 @@ export class InlineAISettingsTab extends PluginSettingTab {
|
|||
const { containerEl } = this;
|
||||
containerEl.empty();
|
||||
|
||||
|
||||
|
||||
// Provider setting
|
||||
new Setting(containerEl)
|
||||
.setName("Provider")
|
||||
|
|
@ -86,6 +83,7 @@ export class InlineAISettingsTab extends PluginSettingTab {
|
|||
new Setting(containerEl)
|
||||
.setName("Advanced")
|
||||
.setHeading();
|
||||
|
||||
// Selection Prompt setting
|
||||
new Setting(containerEl)
|
||||
.setName("Selection Prompt")
|
||||
|
|
@ -99,10 +97,8 @@ export class InlineAISettingsTab extends PluginSettingTab {
|
|||
await this.plugin.saveSettings();
|
||||
});
|
||||
|
||||
// Make the text area wider
|
||||
textarea.inputEl.style.width = "25em";
|
||||
textarea.inputEl.style.height = "10em";
|
||||
|
||||
// Add a CSS class for styling
|
||||
textarea.inputEl.classList.add("wide-text-settings");
|
||||
});
|
||||
|
||||
// Cursor Prompt setting
|
||||
|
|
@ -118,11 +114,8 @@ export class InlineAISettingsTab extends PluginSettingTab {
|
|||
await this.plugin.saveSettings();
|
||||
});
|
||||
|
||||
// Make the text area wider
|
||||
textarea.inputEl.style.width = "25em";
|
||||
textarea.inputEl.style.height = "10em";
|
||||
|
||||
// Add a CSS class for styling
|
||||
textarea.inputEl.classList.add("wide-text-settings");
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,3 +111,9 @@
|
|||
.tooltip-button:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
/* Style for the advanced text areas */
|
||||
.wide-text-settings {
|
||||
width: 25em;
|
||||
height: 10em;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue