refactor: standardize admin page shell
This commit is contained in:
@@ -3,6 +3,7 @@ import { Bot, CheckCircle2, CircleDot, Send, XCircle } from 'lucide-react'
|
||||
|
||||
import { AppEmptyState } from '@/components/app/AppEmptyState'
|
||||
import { AppDetailLayout } from '@/components/app/AppDetailLayout'
|
||||
import { AppPage } from '@/components/app/AppPage'
|
||||
import { AppPageHeader } from '@/components/app/AppPageHeader'
|
||||
import { AppPriorityBadge } from '@/components/app/AppPriorityBadge'
|
||||
import { AppSection } from '@/components/app/AppSection'
|
||||
@@ -87,23 +88,22 @@ export function TicketDetailPage({ ticketId }: { ticketId: number }) {
|
||||
|
||||
if (error) {
|
||||
return (
|
||||
<main className="min-h-screen bg-background p-6 text-foreground">
|
||||
<AppPage maxWidth="6xl">
|
||||
<AppEmptyState title="无法加载工单" description={error} />
|
||||
</main>
|
||||
</AppPage>
|
||||
)
|
||||
}
|
||||
|
||||
if (!ticket) {
|
||||
return (
|
||||
<main className="min-h-screen bg-background p-6 text-foreground">
|
||||
<AppPage maxWidth="6xl">
|
||||
<AppEmptyState title="正在加载工单" />
|
||||
</main>
|
||||
</AppPage>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<main className="min-h-screen bg-background p-6 text-foreground">
|
||||
<div className="mx-auto flex max-w-6xl flex-col gap-4">
|
||||
<AppPage maxWidth="6xl">
|
||||
<AppPageHeader
|
||||
title={ticket.title}
|
||||
description={ticket.ticket_no}
|
||||
@@ -164,7 +164,6 @@ export function TicketDetailPage({ ticketId }: { ticketId: number }) {
|
||||
onOpenChange={setTransitionDialogOpen}
|
||||
onSubmit={handleTransition}
|
||||
/>
|
||||
</div>
|
||||
</main>
|
||||
</AppPage>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user