重构前端逻辑

This commit is contained in:
dengqichen 2025-11-06 18:07:41 +08:00
parent e34248f3ea
commit 99161d3f7d
3 changed files with 46 additions and 47 deletions

View File

@ -12,7 +12,6 @@ import {
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
@ -310,10 +309,11 @@ export const PendingApprovalModal: React.FC<PendingApprovalModalProps> = ({
</>
)}
</AlertDialogTitle>
<AlertDialogDescription className="space-y-3">
</AlertDialogHeader>
<div className="space-y-3 px-6 py-4">
{selectedTask && (
<>
<div className="text-sm text-foreground">
<div className="text-sm text-muted-foreground">
{approvalResult === ApprovalResult.APPROVED ? '通过' : '拒绝'}
</div>
<div className="p-3 bg-muted/50 rounded-md space-y-1.5 text-xs">
@ -352,10 +352,9 @@ export const PendingApprovalModal: React.FC<PendingApprovalModalProps> = ({
</div>
</>
)}
</AlertDialogDescription>
</AlertDialogHeader>
</div>
<AlertDialogFooter>
<AlertDialogCancel disabled={submitting}></AlertDialogCancel>
<AlertDialogCancel></AlertDialogCancel>
<AlertDialogAction
onClick={handleSubmitApproval}
disabled={submitting}

View File

@ -18,7 +18,7 @@ const Forbidden: React.FC = () => {
};
return (
<div className="flex h-screen w-screen flex-col items-center justify-center bg-slate-50 p-8">
<div className="fixed inset-0 flex flex-col items-center justify-center bg-slate-50 p-8 overflow-hidden">
<div className="max-w-md text-center">
{/* 403 图标 */}
<div className="mb-6 flex justify-center">

View File

@ -18,7 +18,7 @@ const NotFound: React.FC = () => {
};
return (
<div className="flex h-screen w-screen flex-col items-center justify-center bg-slate-50 p-8">
<div className="fixed inset-0 flex flex-col items-center justify-center bg-slate-50 p-8 overflow-hidden">
<div className="max-w-md text-center">
{/* 404 图标 */}
<div className="mb-6 flex justify-center">