diff --git a/frontend/src/api.ts b/frontend/src/api.ts index 8989918..15c4160 100644 --- a/frontend/src/api.ts +++ b/frontend/src/api.ts @@ -437,18 +437,6 @@ export async function pickFolderAndAddRoot(): Promise { return folder } -/** - * Fetch the installed MediaHive version. - */ -export async function getVersion(): Promise { - const response = await fetch("/api/version") - if (!response.ok) { - throw new Error(`Failed to load version: ${response.statusText}`) - } - const data = await response.json() - return data.version || "dev" -} - /** * Fetch the tail of the application log. */ diff --git a/frontend/src/components/Header.vue b/frontend/src/components/Header.vue index 830bc70..9b1cf2e 100644 --- a/frontend/src/components/Header.vue +++ b/frontend/src/components/Header.vue @@ -302,20 +302,7 @@

Diagnostics

-

- Version info and application log for troubleshooting. -

- -
-
- App version - {{ appVersion || "…" }} -
-
- Browser engine - {{ browserEngine }} -
-
+

Application log for troubleshooting.

Application log @@ -334,7 +321,7 @@ import { ref, watch, computed, onMounted, onUnmounted } from "vue" import { useRouter, useRoute } from "vue-router" import { navAttrs } from "../composables/useKeyboardNavigation" import logoUrl from "../assets/mediahive.webp" -import { replaceRoots, pickFolderAndAddRoot, fetchPlayers, getVersion, getLog } from "../api" +import { replaceRoots, pickFolderAndAddRoot, fetchPlayers, getLog } from "../api" import type { PlayerInfo } from "../api" import HexKeyboard from "./HexKeyboard.vue" import { @@ -437,10 +424,8 @@ async function refreshPlayers() { } } -const appVersion = ref("") const appLog = ref("") -const browserEngine = navigator.userAgent -let diagnosticsFetched = false +let logFetched = false async function refreshLog() { try { @@ -451,16 +436,6 @@ async function refreshLog() { } } -async function refreshDiagnostics() { - try { - appVersion.value = await getVersion() - } catch (e) { - console.error("Failed to fetch version:", e) - appVersion.value = "unknown" - } - await refreshLog() -} - async function removeRoot(rootId: string) { const filtered = roots.value.filter((r) => r.root_id !== rootId) const newRoots = Object.fromEntries(filtered.map((r) => [r.root_id, r.path])) @@ -490,9 +465,9 @@ async function addRoot() { watch(showSettings, (visible) => { if (visible) { void refreshPlayers() - if (!diagnosticsFetched) { - diagnosticsFetched = true - void refreshDiagnostics() + if (!logFetched) { + logFetched = true + void refreshLog() } } }) @@ -925,33 +900,11 @@ onUnmounted(() => { color: #22c55e; } -.diag-rows { - display: flex; - flex-direction: column; - gap: 8px; - margin-bottom: 16px; -} - -.diag-row { - display: flex; - flex-direction: column; - gap: 2px; - padding: 8px 10px; - background: rgba(255, 255, 255, 0.05); - border-radius: 8px; -} - .diag-label { font-size: 0.75rem; color: var(--text-secondary); } -.diag-value { - font-size: 0.85rem; - color: var(--text-primary); - word-break: break-all; -} - .diag-log-header { display: flex; align-items: center; @@ -979,8 +932,7 @@ onUnmounted(() => { font-size: 0.75rem; white-space: pre-wrap; word-break: break-all; - width: 80ch; - max-width: 100%; + width: 100%; max-height: 320px; overflow-y: auto; margin: 0;