Dough Git

commit

aaa

commit
1f6e3e294aa9da5f56e89e004461684bf6d05e98
author
Clove Twilight <[email protected]>
date
2026-08-31 12:53

diff --git a/web/client/src/app.ts b/web/client/src/app.ts
index 9624ebc..62ec1f4 100644
--- a/web/client/src/app.ts
+++ b/web/client/src/app.ts
@@ -30,10 +30,16 @@ import {
   openExternal,
   syncDiscordPresence,
 } from "./desktop.ts";
-import { initNative } from "./native.ts";
+import { initNative, isNativeAndroid } from "./native.ts";
 
 initDesktopBridge();
 
+// True when the web app is running inside one of the packaged shells (Electron
+// desktop or the Android WebView) rather than a plain browser tab. Each shell
+// exposes its own bridge global on the window, which is the signal. Used to
+// hide "Get the app" prompts — pointless once you're already in the app.
+const isInsideApp = isDesktop || isNativeAndroid;
+
 const root = document.getElementById("app")!;
 const player = new Player();
 // Inside the native Android shell, route lock-screen/notification transport
@@ -414,6 +420,13 @@ function render(): void {
             <i class="bi bi-chevron-left"></i></button>
           <button class="icon-btn" id="nav-fwd" title="Forward (Alt+Right)" aria-label="Forward">
             <i class="bi bi-chevron-right"></i></button>
+          ${
+            isInsideApp
+              ? ""
+              : `<button class="btn btn-sm nav-get-app" id="nav-get-app" title="Download the desktop &amp; mobile apps">
+                   <i class="bi bi-download"></i> Get the app
+                 </button>`
+          }
         </nav>
         <div id="main-content"></div>
       </main>
@@ -434,6 +447,9 @@ function render(): void {
     fwd.disabled = navPos >= navMax;
     fwd.addEventListener("click", goForward);
   }
+  document
+    .getElementById("nav-get-app")
+    ?.addEventListener("click", () => navigate({ kind: "downloads" }));
 
   const sidebar = document.getElementById("sidebar");
   const scrim = document.getElementById("scrim");
@@ -538,7 +554,6 @@ function renderSidebar(): void {
     }
     ${nav("browse", "Browse shared")}
     ${nav("artists", "Artists")}
-    ${nav("downloads", `<i class="bi bi-download"></i> Get the app`)}
     ${
       state.me?.isAdmin
         ? `
@@ -587,7 +602,6 @@ function renderSidebar(): void {
         | "linkRequests"
         | "pendingSongs"
         | "editRequests"
-        | "downloads"
         | "settings";
       navigate({ kind });
     });
@@ -728,9 +742,6 @@ function renderLibrary(el: HTMLElement): void {
           Hide explicit
         </label>
         <input id="search" class="search" placeholder="Search title or artist" />
-        <button class="btn btn-sm" id="get-app" title="Download the desktop &amp; mobile apps">
-          <i class="bi bi-download"></i> Get the app
-        </button>
       </div>
     </header>
     <div id="songlist">${songTableHtml(shown)}</div>
@@ -738,10 +749,6 @@ function renderLibrary(el: HTMLElement): void {
 
   wireSongList();
 
-  document
-    .getElementById("get-app")
-    ?.addEventListener("click", () => navigate({ kind: "downloads" }));
-
   document.getElementById("hide-explicit")?.addEventListener("change", (e) => {
     hideExplicit = (e.target as HTMLInputElement).checked;
     try {
diff --git a/web/client/src/styles.css b/web/client/src/styles.css
index fbae8c9..5028d34 100644
--- a/web/client/src/styles.css
+++ b/web/client/src/styles.css
@@ -260,6 +260,7 @@ button {
   top: 0;
   z-index: 5;
   display: flex;
+  align-items: center;
   gap: 0.25rem;
   margin: -1.5rem -2rem 0.5rem;
   padding: 0.5rem 2rem;
@@ -271,6 +272,11 @@ button {
   background: var(--panel);
 }
 
+/* sits at the far end of the history bar */
+.nav-get-app {
+  margin-left: auto;
+}
+
 .nav-arrows .icon-btn:disabled {
   opacity: 0.3;
   pointer-events: none;