Skip to content

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

Python

Three settings/chat/sidebar polish — (1) Account info tab simplified: removed the Go to Recordings button (the Speakr logo in the page header is the natural exit back to the recordings list) and merged the Single Sign-On section with the Change/Set Password section into one combined 'Sign-in & Security' card since both control how the user authenticates into the account; added account.signInSecurity + account.password i18n keys across all 7 locales; (2) sidebar group headers (TODAY / THIS WEEK / LAST MONTH / OLDER) now center-aligned within their full-width band so the labels sit symmetrically inside the tinted divider; (3) floating-chat bounds robustness: added a ResizeObserver on #mainContentColumns that bumps chatLayoutTick automatically whenever its bounds change, so any future layout input (player position top/bottom, sidebar collapse, column resize, viewport resize, mobile nav appearing) triggers a recompute without needing per-input wiring; also added an explicit watch on audioPlayerPosition for the swap case where only the top edge moves; this is the single-source-of-truth pattern the user asked for — chat bounds always derive from one element's getBoundingClientRect, and that element's resize event is what drives reactivity

Murtaza Nasir09445c7a6e4e
diff --git a/static/css/styles.css b/static/css/styles.css
index 0252c6c0..95415b7f 100644
--- a/static/css/styles.css
+++ b/static/css/styles.css
@@ -4385,6 +4385,7 @@ select:disabled {
padding: 6px var(--sp-3);
margin: 0;
line-height: var(--lh-tight);
+ text-align: center;
}
/* Each section group wraps its rows for divider scoping. */
diff --git a/static/js/app.modular.js b/static/js/app.modular.js
index fc69c853..fd775fbf 100644
--- a/static/js/app.modular.js
+++ b/static/js/app.modular.js
@@ -936,14 +936,49 @@ document.addEventListener('DOMContentLoaded', async () => {
});
}
+ // Single source of truth for chat bounds is the
+ // #mainContentColumns rect (right of sidebar, between
+ // meta strip / top player and bottom audio bar). A
+ // ResizeObserver watching that one element catches every
+ // future layout change automatically — player moved
+ // top↔bottom, sidebar collapsed/expanded, columns resized,
+ // viewport resized, mobile-bottom-nav appearing or not —
+ // so we don't have to add a new bump for every layout
+ // input. Re-attach if/when the detail view re-mounts.
+ let _chatBoundsObserver = null;
+ const _attachChatBoundsObserver = () => {
+ if (typeof ResizeObserver === 'undefined') return;
+ const target = document.getElementById('mainContentColumns');
+ if (!target) return;
+ if (_chatBoundsObserver) _chatBoundsObserver.disconnect();
+ _chatBoundsObserver = new ResizeObserver(_bumpChatLayout);
+ _chatBoundsObserver.observe(target);
+ };
+
// Restore chat panel position whenever the selected recording changes.
watch(selectedRecording, (newRec) => {
if (newRec) {
restoreChatPanelPosition();
- nextTick(_bumpChatLayout);
+ nextTick(() => {
+ _bumpChatLayout();
+ // The detail view (and #mainContentColumns) just
+ // mounted/re-mounted; (re-)attach the observer.
+ _attachChatBoundsObserver();
+ });
}
}, { immediate: false });
+ // The Display tab lets users flip the audio player between
+ // top and bottom of the detail screen. That repositions
+ // #mainContentColumns (it grows/shrinks vertically and its
+ // top edge changes). The ResizeObserver above catches the
+ // SIZE change; this watch catches even the case where only
+ // the top edge changes (e.g. layout swap), and is also a
+ // useful explicit signal for debugging.
+ watch(audioPlayerPosition, () => {
+ nextTick(_bumpChatLayout);
+ });
+
// --- Audio Player State (Main Player) ---
const playerVolume = ref(1.0);
const audioIsPlaying = ref(false);
diff --git a/static/locales/de.json b/static/locales/de.json
index 4a2a31ea..323ff470 100644
--- a/static/locales/de.json
+++ b/static/locales/de.json
@@ -104,7 +104,9 @@
"transcriptionHintsDesc": "Diese Standardwerte werden verwendet, wenn keine Tag- oder Ordner-Überschreibungen gesetzt sind. Sie helfen, die Transkriptionsgenauigkeit für Ihren spezifischen Anwendungsfall zu verbessern.",
"transcriptionLanguage": "Transkriptionssprache",
"userDetails": "Benutzerdetails",
- "username": "Benutzername"
+ "username": "Benutzername",
+ "signInSecurity": "Anmeldung & Sicherheit",
+ "password": "Passwort"
},
"accountTabs": {
"about": "Über",
diff --git a/static/locales/en.json b/static/locales/en.json
index 1cd77b95..e7cbc90d 100644
--- a/static/locales/en.json
+++ b/static/locales/en.json
@@ -104,7 +104,9 @@
"transcriptionHintsDesc": "These defaults are used when no tag or folder overrides are set. They help improve transcription accuracy for your specific use case.",
"transcriptionLanguage": "Transcription Language",
"userDetails": "User Details",
- "username": "Username"
+ "username": "Username",
+ "signInSecurity": "Sign-in & Security",
+ "password": "Password"
},
"accountTabs": {
"about": "About",
diff --git a/static/locales/es.json b/static/locales/es.json
index 4380ec4e..64161c40 100644
--- a/static/locales/es.json
+++ b/static/locales/es.json
@@ -104,7 +104,9 @@
"transcriptionHintsDesc": "Estos valores predeterminados se aplican cuando no hay sobrescritura por tag o carpeta. Ayudan a mejorar la precisión de la transcripción para su caso de uso.",
"transcriptionLanguage": "Idioma de Transcripción",
"userDetails": "Detalles del Usuario",
- "username": "Nombre de Usuario"
+ "username": "Nombre de Usuario",
+ "signInSecurity": "Inicio de sesión y seguridad",
+ "password": "Contraseña"
},
"accountTabs": {
"about": "Acerca de",
diff --git a/static/locales/fr.json b/static/locales/fr.json
index 7aece233..8a5c56e5 100644
--- a/static/locales/fr.json
+++ b/static/locales/fr.json
@@ -104,7 +104,9 @@
"transcriptionHintsDesc": "Ces valeurs par défaut s’appliquent quand aucun tag ni dossier ne les remplace. Elles aident à améliorer la précision de la transcription pour votre usage.",
"transcriptionLanguage": "Langue de Transcription",
"userDetails": "Détails de l'Utilisateur",
- "username": "Nom d'Utilisateur"
+ "username": "Nom d'Utilisateur",
+ "signInSecurity": "Connexion et sécurité",
+ "password": "Mot de passe"
},
"accountTabs": {
"about": "À Propos",
diff --git a/static/locales/pt-BR.json b/static/locales/pt-BR.json
index 554842d4..617860aa 100644
--- a/static/locales/pt-BR.json
+++ b/static/locales/pt-BR.json
@@ -104,7 +104,9 @@
"transcriptionHintsDesc": "Esses padrões são usados quando nenhuma etiqueta ou pasta substitui as definições. Eles ajudam a melhorar a precisão da transcrição para seu caso de uso específico.",
"transcriptionLanguage": "Idioma da Transcrição",
"userDetails": "Detalhes do Usuário",
- "username": "Nome de Usuário"
+ "username": "Nome de Usuário",
+ "signInSecurity": "Acesso e segurança",
+ "password": "Senha"
},
"accountTabs": {
"about": "Sobre",
diff --git a/static/locales/ru.json b/static/locales/ru.json
index d96059b6..a8c77923 100644
--- a/static/locales/ru.json
+++ b/static/locales/ru.json
@@ -104,7 +104,9 @@
"transcriptionHintsDesc": "Эти значения применяются, когда они не переопределены тегом или папкой. Они помогают повысить точность транскрипции под ваш сценарий использования.",
"transcriptionLanguage": "Язык транскрибирования",
"userDetails": "Данные пользователя",
- "username": "Имя пользователя"
+ "username": "Имя пользователя",
+ "signInSecurity": "Вход и безопасность",
+ "password": "Пароль"
},
"accountTabs": {
"about": "О продукте",
diff --git a/static/locales/zh.json b/static/locales/zh.json
index 12b20c0a..4c46309c 100644
--- a/static/locales/zh.json
+++ b/static/locales/zh.json
@@ -104,7 +104,9 @@
"transcriptionHintsDesc": "这些默认值会在没有标签或文件夹覆盖时生效,帮助提高您所在场景下的转录准确率。",
"transcriptionLanguage": "转录语言",
"userDetails": "用户详情",
- "username": "用户名"
+ "username": "用户名",
+ "signInSecurity": "登录与安全",
+ "password": "密码"
},
"accountTabs": {
"about": "关于",
diff --git a/templates/account.html b/templates/account.html
index b3dd518f..5ac73e67 100644
--- a/templates/account.html
+++ b/templates/account.html
@@ -616,60 +616,65 @@
</div>
</div>
- {% if sso_enabled %}
+ <!-- Sign-in & Security — combines the Single Sign-On
+ provider controls and the password (change /
+ set) flow into one section since they're both
+ ways the user authenticates into the account.
+ "Go to Recordings" link removed; the
+ page-header Speakr logo is the natural exit. -->
<div class="mt-6">
- <h3 class="text-lg font-medium text-[var(--text-secondary)] mb-2">Single Sign-On</h3>
- <div class="bg-[var(--bg-tertiary)] p-4 rounded-lg border border-[var(--border-primary)] space-y-3">
- <div class="flex items-center justify-between">
- <div>
- <span class="block text-sm font-medium text-[var(--text-muted)]" data-i18n="account.ssoProvider">Provider</span>
- <span class="block text-[var(--text-primary)]">{{ sso_provider_name }}</span>
+ <h3 class="text-lg font-medium text-[var(--text-secondary)] mb-2" data-i18n="account.signInSecurity">Sign-in & Security</h3>
+ <div class="bg-[var(--bg-tertiary)] p-4 rounded-lg border border-[var(--border-primary)] space-y-4">
+ {% if sso_enabled %}
+ <div class="space-y-3">
+ <div class="flex items-center justify-between">
+ <div>
+ <span class="block text-sm font-medium text-[var(--text-muted)]" data-i18n="account.ssoProvider">Provider</span>
+ <span class="block text-[var(--text-primary)]">{{ sso_provider_name }}</span>
+ </div>
+ {% if sso_linked %}
+ <span class="px-2 py-1 text-xs rounded bg-[var(--bg-success-light)] text-[var(--text-success-strong)]" data-i18n="account.ssoLinked">Linked</span>
+ {% else %}
+ <span class="px-2 py-1 text-xs rounded bg-[var(--bg-danger-light)] text-[var(--text-danger-strong)]" data-i18n="account.ssoNotLinked">Not linked</span>
+ {% endif %}
</div>
+
{% if sso_linked %}
- <span class="px-2 py-1 text-xs rounded bg-[var(--bg-success-light)] text-[var(--text-success-strong)]" data-i18n="account.ssoLinked">Linked</span>
+ <div class="text-xs text-[var(--text-muted)] break-all">
+ <span class="font-medium text-[var(--text-secondary)]" data-i18n="account.ssoSubject">Subject:</span> {{ sso_subject }}
+ </div>
+ {% if has_password %}
+ <form method="POST" action="{{ url_for('auth.sso_unlink') }}">
+ <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
+ <button type="submit" onclick="return confirm(t('account.ssoUnlinkConfirm'))" class="btn btn--ghost w-full">
+ <i class="fas fa-unlink"></i><span data-i18n="account.ssoUnlinkAccount" data-i18n-params='{"provider": "{{ sso_provider_name }}"}'>Unlink {{ sso_provider_name }} account</span>
+ </button>
+ </form>
+ {% elif not password_login_disabled or current_user.is_admin %}
+ <div class="t-meta">
+ <i class="fas fa-info-circle mr-1"></i> <span data-i18n="account.ssoSetPasswordFirst">To unlink SSO, you must first set a password.</span>
+ </div>
+ {% endif %}
{% else %}
- <span class="px-2 py-1 text-xs rounded bg-[var(--bg-danger-light)] text-[var(--text-danger-strong)]" data-i18n="account.ssoNotLinked">Not linked</span>
+ <form method="POST" action="{{ url_for('auth.sso_link') }}">
+ <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
+ <button type="submit" class="btn btn--primary w-full">
+ <i class="fas fa-link"></i><span data-i18n="account.ssoLinkAccount" data-i18n-params='{"provider": "{{ sso_provider_name }}"}'>Link {{ sso_provider_name }} account</span>
+ </button>
+ </form>
{% endif %}
</div>
-
- {% if sso_linked %}
- <div class="text-xs text-[var(--text-muted)] break-all">
- <span class="font-medium text-[var(--text-secondary)]" data-i18n="account.ssoSubject">Subject:</span> {{ sso_subject }}
- </div>
- {% if has_password %}
- <form method="POST" action="{{ url_for('auth.sso_unlink') }}" class="mt-2">
- <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
- <button type="submit" onclick="return confirm(t('account.ssoUnlinkConfirm'))" class="w-full inline-flex items-center justify-center px-4 py-2 border border-[var(--border-secondary)] text-[var(--text-secondary)] rounded-md hover:bg-[var(--bg-tertiary)] hover:text-[var(--text-danger)] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-[var(--border-focus)] transition-colors duration-200">
- <i class="fas fa-unlink mr-2"></i> <span data-i18n="account.ssoUnlinkAccount" data-i18n-params='{"provider": "{{ sso_provider_name }}"}'>Unlink {{ sso_provider_name }} account</span>
- </button>
- </form>
- {% elif not password_login_disabled or current_user.is_admin %}
- <div class="mt-2 text-xs text-[var(--text-muted)]">
- <i class="fas fa-info-circle mr-1"></i> <span data-i18n="account.ssoSetPasswordFirst">To unlink SSO, you must first set a password.</span>
- </div>
+ {% if not password_login_disabled or current_user.is_admin %}
+ <div class="border-t border-[var(--border-primary)] pt-3"></div>
{% endif %}
- {% else %}
- <form method="POST" action="{{ url_for('auth.sso_link') }}" class="mt-2">
- <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
- <button type="submit" class="w-full inline-flex items-center justify-center px-4 py-2 bg-[var(--bg-button)] text-[var(--text-button)] rounded-md hover:bg-[var(--bg-button-hover)] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-[var(--border-focus)] transition-colors duration-200">
- <i class="fas fa-link mr-2"></i> <span data-i18n="account.ssoLinkAccount" data-i18n-params='{"provider": "{{ sso_provider_name }}"}'>Link {{ sso_provider_name }} account</span>
- </button>
- </form>
{% endif %}
- </div>
- </div>
- {% endif %}
-
- <div class="mt-6"> <!-- Added mt-6 for spacing, was mt-8 on Account Actions -->
- <h3 class="text-lg font-medium text-[var(--text-secondary)] mb-2" data-i18n="account.accountActions">Account Actions</h3>
- <div class="flex flex-col space-y-3">
- <a href="{{ url_for('recordings.index') }}" class="inline-flex items-center px-4 py-2 bg-[var(--bg-button)] text-[var(--text-button)] rounded-md hover:bg-[var(--bg-button-hover)] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-[var(--border-focus)] transition-colors duration-200">
- <i class="fas fa-microphone mr-2"></i> <span data-i18n="account.goToRecordings">Go to Recordings</span>
- </a>
{% if not password_login_disabled or current_user.is_admin %}
- <button id="changePasswordBtn" class="inline-flex items-center px-4 py-2 border border-[var(--border-secondary)] text-[var(--text-secondary)] rounded-md hover:bg-[var(--bg-tertiary)] hover:text-[var(--text-accent)] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-[var(--border-focus)] transition-colors duration-200">
- <i class="fas fa-key mr-2"></i> <span data-i18n="account.changePassword">{% if has_password %}Change Password{% else %}Set Password{% endif %}</span>
- </button>
+ <div>
+ <span class="block text-sm font-medium text-[var(--text-muted)] mb-2" data-i18n="account.password">Password</span>
+ <button id="changePasswordBtn" class="btn btn--ghost w-full">
+ <i class="fas fa-key"></i><span data-i18n="account.changePassword">{% if has_password %}Change Password{% else %}Set Password{% endif %}</span>
+ </button>
+ </div>
{% endif %}
</div>
</div>