Skip to content

Speakr is a personal, self-hosted web application designed for transcribing audio recordings

Python

chat interface fix

Murtaza Nasirc5fc1d46ee25
diff --git a/static/css/styles.css b/static/css/styles.css
index 056f6aa0..3928bbb2 100644
--- a/static/css/styles.css
+++ b/static/css/styles.css
@@ -1362,6 +1362,15 @@ body {
max-height: calc(1.5em * 4 + 1rem); /* Approx 4 lines with padding */
overflow-y: auto; /* Allow scrolling after max-height */
}
+
+/* Desktop chat input textarea styling */
+.chat-input-container textarea {
+ min-height: calc(1.5em * 3 + 1rem); /* Approx 3 lines with padding */
+ max-height: calc(1.5em * 6 + 1rem); /* Approx 6 lines with padding */
+ overflow-y: auto; /* Allow scrolling after max-height */
+ line-height: 1.5; /* Consistent line height */
+ font-family: inherit; /* Use the same font as the rest of the app */
+}
.mobile-chat-input button {
padding: 0.5rem 1rem;
diff --git a/templates/index.html b/templates/index.html
index 06101c0c..947925d1 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -1102,14 +1102,15 @@
</div>
</div>
<div class="chat-input-container border-t-[var(--border-primary)]">
- <input
+ <textarea
v-model="chatInput"
- @keyup.enter="sendChatMessage"
- type="text"
- placeholder="Ask about the transcript..."
- class="flex-grow px-3 py-2 border-0 focus:ring-0 focus:outline-none bg-[var(--bg-input)] text-[var(--text-primary)] placeholder-[var(--text-muted)]"
+ @keyup.enter.exact="sendChatMessage"
+ @keyup.enter.shift.exact.prevent="chatInput += '\n'"
+ placeholder="Ask about the transcript... (Shift+Enter for new line)"
+ class="flex-grow px-3 py-2 border-0 focus:ring-0 focus:outline-none bg-[var(--bg-input)] text-[var(--text-primary)] placeholder-[var(--text-muted)] resize-none custom-scrollbar"
:disabled="isChatLoading || !selectedRecording || selectedRecording.status !== 'COMPLETED'"
- >
+ rows="3"
+ ></textarea>
<button
@click="sendChatMessage"
class="px-4 py-2 bg-[var(--bg-button)] text-[var(--text-button)] rounded-md hover:bg-[var(--bg-button-hover)] disabled:bg-[var(--bg-tertiary)] disabled:text-[var(--text-muted)] disabled:cursor-not-allowed"