feat(ui): Laufwerke & im Laufwerk erkannte Disc nach ganz oben verschoben, Ripping Queue exakt nach SC1 aufgebaut
Ampel / ampel (push) Successful in 28s
Ampel / ampel (push) Successful in 28s
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { useEffect, useState } from 'react'
|
||||
import { Cpu, HardDrive, Disc, Download, Trash2, Activity, Film, Server, RotateCcw, FileSpreadsheet, List, LayoutGrid } from 'lucide-react'
|
||||
import { Cpu, HardDrive, Disc, Download, Trash2, Activity, Film, Server, RotateCcw, FileSpreadsheet } from 'lucide-react'
|
||||
import { api } from '../lib/api'
|
||||
import { useToast } from '../context/ToastContext'
|
||||
import { Card, CardHeader, CardTitle, CardContent } from '../components/ui/Card'
|
||||
@@ -9,8 +9,6 @@ import ConfirmDialog from '../components/ConfirmDialog'
|
||||
import DeviceDiscovery from '../components/DeviceDiscovery'
|
||||
import JobDetailModal from '../components/JobDetailModal'
|
||||
import LiveLogSection from '../components/LiveLogSection'
|
||||
import { HeroCinemaBanner } from '../components/HeroCinemaBanner'
|
||||
import { RadialProgress } from '../components/ui/RadialProgress'
|
||||
|
||||
interface JobMeta {
|
||||
year?: number
|
||||
@@ -145,21 +143,16 @@ export default function Dashboard() {
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
|
||||
{/* 1. Top Hero Cinema Showcase (5 Kacheln vollständig ausgefüllt) */}
|
||||
<HeroCinemaBanner
|
||||
aktiverJob={aktiverJob}
|
||||
completedJobs={completedJobs}
|
||||
onDetailClick={id => setDetailJobId(id)}
|
||||
onCancelClick={id => api.post(`/jobs/${id}/cancel`).catch(() => {})}
|
||||
/>
|
||||
{/* 1. GANZ OBEN: Laufwerke & Erkannte Disc im Laufwerk (Akira / Auto Pre-Scan Banner) */}
|
||||
<DeviceDiscovery />
|
||||
|
||||
{/* 2. Main 2-Column Grid Layout (SC1 Mockup Bereich) */}
|
||||
{/* 2. MAIN 2-COLUMN GRID LAYOUT (EXAKT NACH SC1 MOCKUP) */}
|
||||
<div className="grid grid-cols-1 lg:grid-cols-12 gap-6">
|
||||
|
||||
{/* LEFT COLUMN (lg:col-span-7) */}
|
||||
<div className="lg:col-span-7 space-y-6">
|
||||
|
||||
{/* Current Job Card */}
|
||||
{/* Current Job Card (SC1 Left Top) */}
|
||||
<Card className="border border-amber-500/30 bg-[#0f1422] shadow-xl">
|
||||
<CardHeader className="border-b border-slate-800">
|
||||
<CardTitle className="text-amber-400 flex items-center gap-2">
|
||||
@@ -218,28 +211,49 @@ export default function Dashboard() {
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
{/* Ripping Queue Card */}
|
||||
{/* Ripping Queue Card (EXAKT NACH SC1 MOCKUP METHODIK) */}
|
||||
<Card className="border border-slate-800 bg-[#0f1422]">
|
||||
<CardHeader className="border-b border-slate-800">
|
||||
<CardTitle className="text-slate-200">Ripping Queue ({queueJobs.length})</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent className="p-4">
|
||||
{queueJobs.length === 0 ? (
|
||||
<div className="py-4 text-center text-xs font-mono text-slate-500">
|
||||
Warteschlange ist leer (0 Jobs eingereiht)
|
||||
</div>
|
||||
<CardContent className="p-4 space-y-2.5">
|
||||
{queueJobs.length > 0 ? (
|
||||
queueJobs.map((j, idx) => (
|
||||
<div key={j.id} className="flex items-center justify-between p-3 rounded-xl bg-slate-900/80 border border-slate-800 text-sm">
|
||||
<div className="flex items-center gap-3 min-w-0">
|
||||
{posterUrl(j.meta) ? (
|
||||
<img src={posterUrl(j.meta)!} alt="" className="w-8 h-10 rounded object-cover flex-shrink-0" />
|
||||
) : (
|
||||
<div className="space-y-2">
|
||||
{queueJobs.map((j, idx) => (
|
||||
<div key={j.id} className="flex items-center justify-between p-3 rounded-xl bg-slate-900/60 border border-slate-800 text-sm">
|
||||
<div className="flex items-center gap-3">
|
||||
<span className="font-mono text-amber-400 font-bold">{idx + 1}.</span>
|
||||
<span className="font-medium text-slate-200">{j.title || 'Unbekannt'}</span>
|
||||
<div className="w-8 h-10 rounded bg-slate-800 flex items-center justify-center flex-shrink-0 text-slate-500">
|
||||
<Disc size={16} />
|
||||
</div>
|
||||
)}
|
||||
<span className="font-mono text-amber-400 font-bold flex-shrink-0">{idx + 2}.</span>
|
||||
<span className="font-semibold text-slate-100 truncate">{j.title || 'Unbekannt'}</span>
|
||||
<TypeBadge type={j.type} />
|
||||
</div>
|
||||
<span className="text-xs text-slate-400 font-mono">Wartend</span>
|
||||
<span className="text-xs text-slate-400 font-mono px-2 py-1 rounded bg-slate-800 border border-slate-700 flex-shrink-0">
|
||||
Queue {idx + 1}
|
||||
</span>
|
||||
</div>
|
||||
))
|
||||
) : (
|
||||
/* SC1 Styled Queue List slots (sauberes SC1 Queue Layout ohne hässliches Loch) */
|
||||
<div className="space-y-2">
|
||||
<div className="flex items-center justify-between p-3 rounded-xl bg-slate-900/40 border border-slate-800/60 text-sm">
|
||||
<div className="flex items-center gap-3">
|
||||
<span className="font-mono text-amber-400/80 font-bold">2.</span>
|
||||
<span className="font-medium text-slate-400">Bereit für nächste Disc...</span>
|
||||
</div>
|
||||
<span className="text-xs text-slate-500 font-mono">Queue 1</span>
|
||||
</div>
|
||||
<div className="flex items-center justify-between p-3 rounded-xl bg-slate-900/40 border border-slate-800/60 text-sm">
|
||||
<div className="flex items-center gap-3">
|
||||
<span className="font-mono text-amber-400/80 font-bold">3.</span>
|
||||
<span className="font-medium text-slate-400">Bereit für nächste Disc...</span>
|
||||
</div>
|
||||
<span className="text-xs text-slate-500 font-mono">Queue 2</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</CardContent>
|
||||
@@ -311,10 +325,10 @@ export default function Dashboard() {
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
{/* Recently Ripped Card */}
|
||||
{/* Recently Ripped Card (SC1 Right Bottom) */}
|
||||
<Card className="border border-slate-800 bg-[#0f1422]">
|
||||
<CardHeader className="border-b border-slate-800 flex items-center justify-between">
|
||||
<CardTitle className="text-slate-200">Zuletzt gerippt ({completedJobs.length})</CardTitle>
|
||||
<CardTitle className="text-slate-200">Recently Ripped ({completedJobs.length})</CardTitle>
|
||||
{completedJobs.length > 0 && (
|
||||
<Button variant="ghost" size="sm" onClick={() => setAufraeumenOffen(true)}>
|
||||
<Trash2 size={13} /> Aufräumen
|
||||
@@ -367,10 +381,7 @@ export default function Dashboard() {
|
||||
|
||||
</div>
|
||||
|
||||
{/* 3. Laufwerke & Disc-Erkennung (Device Discovery Slot) */}
|
||||
<DeviceDiscovery />
|
||||
|
||||
{/* 4. VOLLSTÄNDIGE JOB-TABELLE & MEDIEN-BIBLIOTHEK (AUS DEM ALTEN DESIGN + METADATEN/BESCHREIBUNGEN) */}
|
||||
{/* 3. VOLLSTÄNDIGE JOB-TABELLE & MEDIEN-BIBLIOTHEK (MIT INHALTSANGABEN / BESCHREIBUNGEN) */}
|
||||
<Card className="border border-slate-800 bg-[#0f1422] overflow-hidden">
|
||||
<CardHeader className="border-b border-slate-800 flex flex-wrap items-center justify-between gap-4">
|
||||
<div className="flex items-center gap-3">
|
||||
@@ -379,7 +390,6 @@ export default function Dashboard() {
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-3 flex-wrap">
|
||||
{/* Filter Pills */}
|
||||
<div className="flex items-center p-1 rounded-xl bg-slate-900 border border-slate-800">
|
||||
{(['all', 'active', 'completed', 'failed'] as const).map((f) => (
|
||||
<button
|
||||
@@ -537,7 +547,7 @@ export default function Dashboard() {
|
||||
)}
|
||||
</Card>
|
||||
|
||||
{/* 5. Live-Log Section */}
|
||||
{/* 4. Live-Log Section */}
|
||||
<LiveLogSection />
|
||||
|
||||
<JobDetailModal jobId={detailJobId} onClose={() => setDetailJobId(null)} />
|
||||
|
||||
Reference in New Issue
Block a user