Restructure chat input layout and fix activity indicator sizing

Move send button after activity indicator in DOM order and reposition
elements via CSS. Set textarea rows to 3, increase min/max heights,
add flex-shrink to activity dot to prevent squishing, and fix
activity indicator padding and white-space handling.
This commit is contained in:
2026-05-21 15:18:49 +02:00
parent 99a644ba96
commit 51208e2031
3 changed files with 25 additions and 33 deletions
+9 -9
View File
@@ -11186,19 +11186,11 @@ var ChatView = class extends import_obsidian5.ItemView {
if (!this.inputEl) {
this.inputEl = inputContainer.createEl("textarea", {
cls: "ollama-input",
attr: { placeholder: "Type your message..." }
attr: { placeholder: "Type your message...", rows: "3" }
});
} else {
inputContainer.appendChild(this.inputEl);
}
if (!this.sendButton) {
this.sendButton = inputContainer.createEl("button", {
cls: "ollama-send-button",
text: "Send"
});
} else {
inputContainer.appendChild(this.sendButton);
}
if (!this.activityIndicatorEl) {
this.activityIndicatorEl = inputContainer.createEl("div", {
cls: "ollama-activity-indicator"
@@ -11212,6 +11204,14 @@ var ChatView = class extends import_obsidian5.ItemView {
} else {
inputContainer.appendChild(this.activityIndicatorEl);
}
if (!this.sendButton) {
this.sendButton = inputContainer.createEl("button", {
cls: "ollama-send-button",
text: "Send"
});
} else {
inputContainer.appendChild(this.sendButton);
}
if (this.contentEl.addClass) {
this.contentEl.addClass("ollama-chat-view-content");
} else {
+11 -11
View File
@@ -382,22 +382,12 @@ export class ChatView extends ItemView {
if (!this.inputEl) {
this.inputEl = inputContainer.createEl('textarea', {
cls: 'ollama-input',
attr: { placeholder: 'Type your message...' },
attr: { placeholder: 'Type your message...', rows: '3' },
});
} else {
inputContainer.appendChild(this.inputEl);
}
// Setup send button
if (!this.sendButton) {
this.sendButton = inputContainer.createEl('button', {
cls: 'ollama-send-button',
text: 'Send',
});
} else {
inputContainer.appendChild(this.sendButton);
}
// Setup activity indicator
if (!this.activityIndicatorEl) {
this.activityIndicatorEl = inputContainer.createEl('div', {
@@ -413,6 +403,16 @@ export class ChatView extends ItemView {
inputContainer.appendChild(this.activityIndicatorEl);
}
// Setup send button
if (!this.sendButton) {
this.sendButton = inputContainer.createEl('button', {
cls: 'ollama-send-button',
text: 'Send',
});
} else {
inputContainer.appendChild(this.sendButton);
}
// Append containers to contentEl
if (this.contentEl.addClass) {
this.contentEl.addClass('ollama-chat-view-content');
+5 -13
View File
@@ -129,19 +129,10 @@
content: '';
}
.ollama-input-container {
display: flex;
gap: var(--size-4-1);
padding: var(--size-4-2);
border-top: 1px solid var(--ollama-border);
background-color: var(--background-primary);
align-items: flex-end;
}
.ollama-input {
flex: 1;
min-height: 2.5rem;
max-height: 8rem;
min-height: 4rem;
max-height: 12rem;
padding: var(--size-4-1) var(--size-4-2);
border-radius: var(--ollama-radius);
border: 1px solid var(--ollama-border);
@@ -445,10 +436,10 @@
display: none;
align-items: center;
gap: var(--size-4-1);
padding: var(--size-4-1) 0;
padding: var(--size-4-1) var(--size-4-1);
font-size: var(--font-ui-small);
color: var(--text-muted);
min-height: 1.5rem;
white-space: nowrap;
}
.ollama-activity-dot {
@@ -458,6 +449,7 @@
border-radius: 50%;
background-color: var(--interactive-accent);
animation: ollama-pulse 1.2s ease-in-out infinite;
flex-shrink: 0;
}
.ollama-activity-text {