build fixes - type errors, missing icons, tauri externals, unused imports

This commit is contained in:
2026-04-03 08:48:28 +03:00
parent b43aef0f73
commit a8349c3f18
11 changed files with 51 additions and 39 deletions
@@ -1,9 +1,9 @@
import { useMemo } from 'react'
import { useQuery } from '@tanstack/react-query'
import { motion } from 'framer-motion'
import { Activity, Monitor, Users, Server as ServerIcon, Clock, Film } from '../../../lib/icons'
import { Activity, MonitorPlay, Users, Server as ServerIcon, Clock, Film } from '../../../lib/icons'
import { jellyfinClient, getSystemApi, getSessionApi, getActivityLogApi } from '../../../api/jellyfin'
import { Section, Row, SubHeading } from '../_ui'
import { Section, SubHeading } from '../_ui'
function useApi() {
return jellyfinClient.getApi()
@@ -49,12 +49,13 @@ export function ServerDashboardSection() {
const transcodes = activeSessions.filter(s => s.PlayState?.PlayMethod === 'Transcode')
const uptime = useMemo(() => {
if (!info?.ServerStartTime) return null
const ms = Date.now() - new Date(info.ServerStartTime).getTime()
const start = (info as any)?.ServerStartTime
if (!start) return null
const ms = Date.now() - new Date(start).getTime()
const days = Math.floor(ms / 86_400_000)
const hrs = Math.floor((ms % 86_400_000) / 3_600_000)
return days > 0 ? `${days}d ${hrs}h` : `${hrs}h`
}, [info?.ServerStartTime])
}, [info])
return (
<Section id="server-dashboard" title="Server dashboard" description="Live stats and activity">
@@ -62,7 +63,7 @@ export function ServerDashboardSection() {
<div className="grid grid-cols-2 md:grid-cols-4 gap-3 mb-6">
<StatCard label="Version" value={info?.Version || '-'} icon={<ServerIcon size={12} className="text-accent" />} />
<StatCard label="Uptime" value={uptime || '-'} icon={<Clock size={12} className="text-accent" />} />
<StatCard label="Active streams" value={String(activeSessions.length)} icon={<Monitor size={12} className="text-accent" />} />
<StatCard label="Active streams" value={String(activeSessions.length)} icon={<MonitorPlay size={12} className="text-accent" />} />
<StatCard label="Transcoding" value={String(transcodes.length)} icon={<Activity size={12} className="text-accent" />} />
</div>
+1 -1
View File
@@ -3,7 +3,7 @@ import { ExternalLink, Loader2, Check, Trash2 } from '../../../lib/icons'
import { Section, Row, Input, Toggle } from '../_ui'
import { useTrakt } from '../../../stores/trakt-store'
import { useWatchlist } from '../../../hooks/use-watchlist'
import { requestDeviceCode, pollDeviceToken, fetchTraktWatchlist, addToTraktWatchlist } from '../../../lib/trakt'
import { requestDeviceCode, pollDeviceToken, fetchTraktWatchlist } from '../../../lib/trakt'
import { toast } from '../../../stores/toast-store'
import { useLibraryByTmdbId } from '../../../hooks/use-jellyfin'