release: 2901262044
This commit is contained in:
@@ -1650,6 +1650,7 @@ async def recent_requests(
|
|||||||
"status": status,
|
"status": status,
|
||||||
"statusLabel": status_label,
|
"statusLabel": status_label,
|
||||||
"mediaId": row.get("media_id"),
|
"mediaId": row.get("media_id"),
|
||||||
|
"createdAt": row.get("created_at") or row.get("updated_at"),
|
||||||
"artwork": {
|
"artwork": {
|
||||||
"poster_url": _artwork_url(poster_path, "w185", cache_mode),
|
"poster_url": _artwork_url(poster_path, "w185", cache_mode),
|
||||||
"backdrop_url": _artwork_url(backdrop_path, "w780", cache_mode),
|
"backdrop_url": _artwork_url(backdrop_path, "w780", cache_mode),
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ export default function HomePage() {
|
|||||||
year?: number
|
year?: number
|
||||||
statusLabel?: string
|
statusLabel?: string
|
||||||
artwork?: { poster_url?: string }
|
artwork?: { poster_url?: string }
|
||||||
|
createdAt?: string | null
|
||||||
}[]
|
}[]
|
||||||
>([])
|
>([])
|
||||||
const [recentError, setRecentError] = useState<string | null>(null)
|
const [recentError, setRecentError] = useState<string | null>(null)
|
||||||
@@ -151,6 +152,7 @@ export default function HomePage() {
|
|||||||
year: item.year,
|
year: item.year,
|
||||||
statusLabel: item.statusLabel,
|
statusLabel: item.statusLabel,
|
||||||
artwork: item.artwork,
|
artwork: item.artwork,
|
||||||
|
createdAt: item.createdAt ?? null,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
@@ -236,6 +238,13 @@ export default function HomePage() {
|
|||||||
return url.startsWith('http') ? url : `${getApiBase()}${url}`
|
return url.startsWith('http') ? url : `${getApiBase()}${url}`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const formatRequestTime = (value?: string | null) => {
|
||||||
|
if (!value) return null
|
||||||
|
const date = new Date(value)
|
||||||
|
if (Number.isNaN(date.valueOf())) return value
|
||||||
|
return date.toLocaleString()
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<main className="card">
|
<main className="card">
|
||||||
<div className="layout-grid">
|
<div className="layout-grid">
|
||||||
@@ -364,6 +373,7 @@ export default function HomePage() {
|
|||||||
<span className="recent-meta">
|
<span className="recent-meta">
|
||||||
{item.statusLabel ? item.statusLabel : 'Status not available yet'} · Request{' '}
|
{item.statusLabel ? item.statusLabel : 'Status not available yet'} · Request{' '}
|
||||||
{item.id}
|
{item.id}
|
||||||
|
{item.createdAt ? ` · ${formatRequestTime(item.createdAt)}` : ''}
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "magent-frontend",
|
"name": "magent-frontend",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "2901262036",
|
"version": "2901262044",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
|
|||||||
Reference in New Issue
Block a user