mirror of
https://github.com/aldo-g/obsidian-llm-test.git
synced 2026-07-22 05:42:19 +00:00
spinner overlay fixed
This commit is contained in:
parent
88a7e7f61d
commit
28ad7b3381
3 changed files with 15 additions and 10 deletions
|
|
@ -47,9 +47,17 @@ export default class QuestionDocumentView extends ItemView {
|
|||
|
||||
|
||||
private showSpinner(): HTMLDivElement {
|
||||
const container = this.containerEl.querySelector(".test-document-container") || this.containerEl;
|
||||
const container = this.containerEl;
|
||||
|
||||
const spinnerOverlay = container.createDiv({ cls: "spinner-overlay" });
|
||||
|
||||
const contentHeight = Math.max(
|
||||
container.scrollHeight,
|
||||
container.querySelector(".test-document-container")?.scrollHeight || 0
|
||||
);
|
||||
|
||||
spinnerOverlay.style.height = `${contentHeight}px`;
|
||||
|
||||
const spinnerFixed = spinnerOverlay.createDiv({ cls: "spinner-fixed-center" });
|
||||
|
||||
spinnerFixed.createDiv({ cls: "spinner" });
|
||||
|
|
@ -62,7 +70,9 @@ export default class QuestionDocumentView extends ItemView {
|
|||
}
|
||||
|
||||
private hideSpinner(spinnerOverlay: HTMLDivElement) {
|
||||
spinnerOverlay.remove();
|
||||
if (spinnerOverlay) {
|
||||
spinnerOverlay.detach();
|
||||
}
|
||||
}
|
||||
|
||||
private adjustTextareaHeight(textarea: HTMLTextAreaElement): void {
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@ export default class SettingsTab extends PluginSettingTab {
|
|||
const { containerEl } = this;
|
||||
containerEl.empty();
|
||||
|
||||
containerEl.createEl("h2", { text: "RAG Test Plugin Settings" });
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName("LLM provider")
|
||||
.setDesc("Select which LLM provider you want to use for generating and marking tests")
|
||||
|
|
@ -192,7 +190,7 @@ export default class SettingsTab extends PluginSettingTab {
|
|||
}
|
||||
|
||||
// About section
|
||||
containerEl.createEl("h3", { text: "About API Keys" });
|
||||
new Setting(containerEl).setName("About API keys").setHeading();
|
||||
const apiInfoDiv = containerEl.createDiv({ cls: "api-key-info" });
|
||||
apiInfoDiv.createEl("p", {
|
||||
text: "Your API keys are stored locally in your vault and are only used to communicate with the selected LLM provider."
|
||||
|
|
|
|||
|
|
@ -573,6 +573,7 @@
|
|||
z-index: 1000;
|
||||
background-color: rgba(0, 0, 0, 0.7);
|
||||
pointer-events: all;
|
||||
min-height: 100%; /* Ensure it's at least as tall as the container */
|
||||
}
|
||||
|
||||
.spinner-fixed-center {
|
||||
|
|
@ -649,10 +650,6 @@
|
|||
transition: height 0.1s ease-out, border-color 0.2s ease;
|
||||
}
|
||||
|
||||
.test-container-relative {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
textarea.answer-input {
|
||||
min-height: 60px;
|
||||
max-height: 300px;
|
||||
|
|
|
|||
Loading…
Reference in a new issue