add version badge in nav, apply path mappings at execution time, clear done/error jobs
All checks were successful
Build and Push Docker Image / build (push) Successful in 58s
All checks were successful
Build and Push Docker Image / build (push) Successful in 58s
- show version (from package.json) in nav bar, warn on frontend/server mismatch - apply path_mappings to file access check and command string at execution time so existing scans with old jellyfin paths work without re-scanning - add clear done/errors button on execute page - bump version to 2026.03.04 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
import { createRootRoute, Link, Outlet } from '@tanstack/react-router';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { cn } from '~/shared/lib/utils';
|
||||
import { api } from '~/shared/lib/api';
|
||||
|
||||
declare const __APP_VERSION__: string;
|
||||
|
||||
export const Route = createRootRoute({
|
||||
component: RootLayout,
|
||||
@@ -17,6 +21,19 @@ function NavLink({ to, children }: { to: string; children: React.ReactNode }) {
|
||||
);
|
||||
}
|
||||
|
||||
function VersionBadge() {
|
||||
const [serverVersion, setServerVersion] = useState<string | null>(null);
|
||||
useEffect(() => { api.get<{ version: string }>('/api/version').then((d) => setServerVersion(d.version)).catch(() => {}); }, []);
|
||||
const buildVersion = typeof __APP_VERSION__ !== 'undefined' ? __APP_VERSION__ : null;
|
||||
const mismatch = buildVersion && serverVersion && buildVersion !== serverVersion;
|
||||
return (
|
||||
<span className="text-[0.65rem] text-gray-400 font-mono ml-1" title={mismatch ? `Frontend: ${buildVersion}, Server: ${serverVersion}` : undefined}>
|
||||
v{serverVersion ?? buildVersion ?? '?'}
|
||||
{mismatch && <span className="text-amber-500 ml-1" title="Frontend and server versions differ — rebuild or refresh">⚠</span>}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
function RootLayout() {
|
||||
const isDev = import.meta.env.DEV;
|
||||
return (
|
||||
@@ -30,6 +47,7 @@ function RootLayout() {
|
||||
<Link to="/" className="font-bold text-[0.95rem] mr-5 no-underline text-gray-900">
|
||||
🎬 netfelix-audio-fix
|
||||
</Link>
|
||||
<VersionBadge />
|
||||
<NavLink to="/scan">Scan</NavLink>
|
||||
<NavLink to="/review/audio">Audio</NavLink>
|
||||
<NavLink to="/review/subtitles">Subtitles</NavLink>
|
||||
|
||||
Reference in New Issue
Block a user