generated from fahricansecer/boilerplate-fe
This commit is contained in:
@@ -16,13 +16,13 @@ import Link from "next/link";
|
||||
import { useAdminProjects, useAdminDeleteProject } from "@/hooks/use-api";
|
||||
|
||||
const STATUS_LABELS: Record<string, { label: string; color: string }> = {
|
||||
DRAFT: { label: "Taslak", color: "bg-gray-500/10 text-gray-400" },
|
||||
GENERATING_SCRIPT: { label: "Senaryo Üretiliyor", color: "bg-blue-500/10 text-blue-400" },
|
||||
PENDING: { label: "Kuyrukta", color: "bg-amber-500/10 text-amber-400" },
|
||||
GENERATING_MEDIA: { label: "Medya Üretiliyor", color: "bg-cyan-500/10 text-cyan-400" },
|
||||
RENDERING: { label: "Render", color: "bg-violet-500/10 text-violet-400" },
|
||||
COMPLETED: { label: "Tamamlandı", color: "bg-emerald-500/10 text-emerald-400" },
|
||||
FAILED: { label: "Başarısız", color: "bg-rose-500/10 text-rose-400" },
|
||||
DRAFT: { label: "Taslak", color: "bg-[var(--color-bg-surface)] text-[var(--color-text-ghost)] border border-[var(--color-border-faint)]" },
|
||||
GENERATING_SCRIPT: { label: "Senaryo Üretiliyor", color: "bg-neutral-500/10 text-neutral-400 border border-neutral-500/20" },
|
||||
PENDING: { label: "Kuyrukta", color: "bg-neutral-500/10 text-neutral-400 border border-neutral-500/20" },
|
||||
GENERATING_MEDIA: { label: "Medya Üretiliyor", color: "bg-neutral-500/10 text-neutral-400 border border-neutral-500/20" },
|
||||
RENDERING: { label: "Render", color: "bg-neutral-500/10 text-neutral-400 border border-neutral-500/20" },
|
||||
COMPLETED: { label: "Tamamlandı", color: "bg-neutral-500/10 text-neutral-400 border border-neutral-500/20" },
|
||||
FAILED: { label: "Başarısız", color: "bg-neutral-500/10 text-neutral-400 border border-neutral-500/20" },
|
||||
};
|
||||
|
||||
const fadeUp = {
|
||||
@@ -66,7 +66,7 @@ export default function AdminProjectsPage() {
|
||||
<motion.div variants={fadeUp} className="flex items-center justify-between">
|
||||
<div>
|
||||
<h1 className="font-[family-name:var(--font-display)] text-2xl font-bold flex items-center gap-2">
|
||||
<FolderOpen size={22} className="text-cyan-400" /> Proje Yönetimi
|
||||
<FolderOpen size={22} className="text-neutral-400" /> Proje Yönetimi
|
||||
</h1>
|
||||
<p className="text-sm text-[var(--color-text-muted)] mt-1">
|
||||
Toplam {meta.total ?? "—"} proje
|
||||
@@ -104,7 +104,7 @@ export default function AdminProjectsPage() {
|
||||
<motion.div variants={fadeUp} className="card-surface overflow-hidden">
|
||||
{isLoading ? (
|
||||
<div className="flex justify-center py-16">
|
||||
<Loader2 size={28} className="animate-spin text-cyan-400" />
|
||||
<Loader2 size={28} className="animate-spin text-neutral-400" />
|
||||
</div>
|
||||
) : (
|
||||
<div className="overflow-x-auto">
|
||||
@@ -141,7 +141,7 @@ export default function AdminProjectsPage() {
|
||||
</span>
|
||||
{project.status !== "DRAFT" && project.status !== "COMPLETED" && project.status !== "FAILED" && (
|
||||
<div className="w-16 h-1 rounded-full bg-[var(--color-border-faint)] mt-1">
|
||||
<div className="h-full rounded-full bg-violet-500" style={{ width: `${project.progress}%` }} />
|
||||
<div className="h-full rounded-full bg-neutral-400" style={{ width: `${project.progress}%` }} />
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
@@ -156,7 +156,7 @@ export default function AdminProjectsPage() {
|
||||
<div className="flex items-center justify-end gap-2">
|
||||
<Link
|
||||
href={`/dashboard/projects/${project.id}`}
|
||||
className="p-1.5 rounded-lg hover:bg-cyan-500/10 text-cyan-400 transition-colors"
|
||||
className="p-1.5 rounded-lg hover:bg-neutral-500/10 text-neutral-400 transition-colors"
|
||||
title="Detay"
|
||||
>
|
||||
<ExternalLink size={13} />
|
||||
@@ -168,7 +168,7 @@ export default function AdminProjectsPage() {
|
||||
}
|
||||
}}
|
||||
disabled={deleteProject.isPending}
|
||||
className="p-1.5 rounded-lg hover:bg-rose-500/10 text-rose-400 transition-colors"
|
||||
className="p-1.5 rounded-lg hover:bg-neutral-500/10 text-neutral-400 transition-colors"
|
||||
title="Sil"
|
||||
>
|
||||
<Trash2 size={13} />
|
||||
|
||||
Reference in New Issue
Block a user