feat(settings): show server software and version on server cards (#1045)

* feat(settings): show server software and version on server cards

Render the OpenSubsonic-reported software and version (e.g. "Navidrome
0.62.0") under each server name on Settings -> Servers. The value comes
from the existing ping identity (subsonicServerIdentityByServer), so no
extra request is made; the line is omitted when the server reports no
type (e.g. plain Subsonic without OpenSubsonic).

Extract the formatting into a shared formatServerSoftware() helper and
reuse it in the PsyLab perf-probe server section in place of its local
copy.

* docs: add CHANGELOG entry for PR #1045
This commit is contained in:
Psychotoxical
2026-06-09 10:25:28 +02:00
committed by GitHub
parent b2a5baa48d
commit ad8e376c9c
5 changed files with 65 additions and 14 deletions
@@ -1,6 +1,6 @@
import { useAuthStore } from '../../../store/authStore';
import type { NavidromeAdminRole } from '../../../hooks/useNavidromeAdminRole';
import { isNavidromeServer } from '../../../utils/server/subsonicServerIdentity';
import { isNavidromeServer, formatServerSoftware } from '../../../utils/server/subsonicServerIdentity';
import { FEATURE_AUDIOMUSE_SIMILAR_TRACKS, OP_SIMILAR_TRACKS } from '../../../serverCapabilities/catalog';
import {
isFeatureActiveForServer,
@@ -12,12 +12,6 @@ import { PerfProbeMetricSection } from './PerfProbeMetricCard';
import PerfProbeDetailList, { type PerfProbeDetailRow } from './PerfProbeDetailList';
import PerfProbeStatusBadge, { type PerfProbeBadgeTone } from './PerfProbeStatusBadge';
function formatServerType(identity: { type?: string; serverVersion?: string; openSubsonic?: boolean } | undefined): string {
if (!identity?.type?.trim()) return 'Unknown';
const version = identity.serverVersion?.trim();
return version ? `${identity.type} ${version}` : identity.type;
}
function detectionBadge(status: CapabilityStatus): { tone: PerfProbeBadgeTone; label: string } {
switch (status) {
case 'present': return { tone: 'ok', label: 'Detected' };
@@ -97,7 +91,7 @@ export default function SidebarPerfProbeServerSection({ adminRole = 'na' }: Prop
const rows: PerfProbeDetailRow[] = [
{ label: 'Name', value: server.name || server.url },
{ label: 'Profile URL', value: <code className="perf-server-dl__code">{server.url}</code> },
{ label: 'Subsonic server', value: formatServerType(identity) },
{ label: 'Subsonic server', value: formatServerSoftware(identity) ?? 'Unknown' },
{
label: 'OpenSubsonic',
value: identity?.openSubsonic