Skip to content

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

Python

Inquire mode + New Recording button now actually opens the upload modal — inquire is a separate Vue app so it can't embed the main app's upload modal directly; previous behaviour was a plain href='/' which dumped the user back at the empty list / detail view and made them hunt for the New Recording button again; now href='/?upload=1' and the main app reads ?upload=1 on its onMounted, calls uiComposable.switchToUploadView() to open the modal, then cleans the query param via history.replaceState so a refresh doesn't re-trigger it; same single click the user already expected, just now does what the button label says; the entry point is generic — any future external link that wants to deep-link into the upload flow can use the same ?upload=1 query param

Murtaza Nasirc49d7ac69331
diff --git a/static/js/app.modular.js b/static/js/app.modular.js
index 87ac39af..3809aca7 100644
--- a/static/js/app.modular.js
+++ b/static/js/app.modular.js
@@ -3205,6 +3205,22 @@ document.addEventListener('DOMContentLoaded', async () => {
loadTokenBudget()
]);
+ // Open the upload modal directly when arriving from
+ // inquire mode's "+ New Recording" button (or any other
+ // entry point that wants to deep-link into the upload
+ // flow). Strip the query param after handling so a
+ // refresh doesn't re-trigger the modal.
+ try {
+ const params = new URLSearchParams(window.location.search);
+ if (params.get('upload') === '1') {
+ uiComposable.switchToUploadView();
+ params.delete('upload');
+ const qs = params.toString();
+ const newUrl = window.location.pathname + (qs ? '?' + qs : '') + window.location.hash;
+ window.history.replaceState({}, '', newUrl);
+ }
+ } catch (_) { /* no-op: param parsing/replaceState are best-effort */ }
+
// Clean up orphaned incognito data if we're not viewing incognito recording
// This can happen if user navigated away without the cleanup triggering
if (uploadComposable.hasIncognitoRecording() && selectedRecording.value?.id !== 'incognito') {
diff --git a/templates/inquire.html b/templates/inquire.html
index 1ad0044b..f597b2e9 100644
--- a/templates/inquire.html
+++ b/templates/inquire.html
@@ -155,11 +155,19 @@
<div class="flex items-center gap-2 sm:gap-3">
{% include 'components/token_budget_indicator.html' %}
- <!-- New Recording Button -->
- <a href="/"
+ <!-- New Recording Button.
+ Inquire mode is a separate Vue app that can't
+ embed the main app's upload modal directly. We
+ redirect to "/" with ?upload=1 — the main app
+ reads that query param on mount and opens the
+ upload modal automatically (then clears the
+ param via history.replaceState so a refresh
+ doesn't re-trigger). Click is the same single
+ action the user expected. -->
+ <a href="/?upload=1"
class="btn btn--sm btn--primary">
<i class="fas fa-plus"></i>
- <span class="hidden sm:inline">${t('nav.newRecording')}</span>
+ <span class="hidden sm:inline">${ t('nav.newRecording') }</span>
</a>
<!-- User menu -->