feat(media): add admin media CRUD preview and storage cleanup
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { getMediaFoundationSummary, listMediaAssets } from "@cms/db"
|
||||
import Link from "next/link"
|
||||
|
||||
import { AdminShell } from "@/components/admin-shell"
|
||||
import { FlashQueryCleanup } from "@/components/media/flash-query-cleanup"
|
||||
@@ -123,12 +124,13 @@ export default async function MediaManagementPage({
|
||||
<th className="py-2 pr-4">Size</th>
|
||||
<th className="py-2 pr-4">Published</th>
|
||||
<th className="py-2 pr-4">Updated</th>
|
||||
<th className="py-2 pr-4">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{assets.length === 0 ? (
|
||||
<tr>
|
||||
<td className="py-3 text-neutral-500" colSpan={6}>
|
||||
<td className="py-3 text-neutral-500" colSpan={7}>
|
||||
No media assets yet. Upload your first asset above.
|
||||
</td>
|
||||
</tr>
|
||||
@@ -147,6 +149,14 @@ export default async function MediaManagementPage({
|
||||
<td className="py-3 pr-4 text-neutral-600">
|
||||
{asset.updatedAt.toLocaleDateString("en-US")}
|
||||
</td>
|
||||
<td className="py-3 pr-4">
|
||||
<Link
|
||||
href={`/media/${asset.id}`}
|
||||
className="text-xs font-medium text-neutral-700 underline underline-offset-2"
|
||||
>
|
||||
Open
|
||||
</Link>
|
||||
</td>
|
||||
</tr>
|
||||
))
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user