優化手機介面

This commit is contained in:
2025-10-12 01:55:31 +08:00
parent 6f7ed92a8a
commit fbb423243a
2 changed files with 23 additions and 20 deletions

View File

@@ -344,28 +344,31 @@ function AdminResultDetailContent() {
<div className="min-h-screen bg-background">
{/* Header */}
<header className="border-b bg-card/50 backdrop-blur-sm">
<div className="container mx-auto px-4 py-4">
<div className="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4">
<div className="flex items-center gap-3">
<Button variant="ghost" size="sm" asChild>
<div className="container mx-auto px-3 sm:px-4 py-3 sm:py-4">
<div className="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between sm:gap-4">
{/* 返回按鈕和標題區域 */}
<div className="flex items-start gap-3">
<Button variant="ghost" size="sm" asChild className="flex-shrink-0">
<Link href="/admin/results">
<ArrowLeft className="w-4 h-4 mr-2" />
<ArrowLeft className="w-4 h-4 sm:mr-2" />
<span className="hidden sm:inline"></span>
</Link>
</Button>
<div className={`w-10 h-10 ${testTypeInfo.color} rounded-lg flex items-center justify-center`}>
<IconComponent className="w-6 h-6 text-white" />
<div className={`w-8 h-8 sm:w-10 sm:h-10 ${testTypeInfo.color} rounded-lg flex items-center justify-center flex-shrink-0`}>
<IconComponent className="w-5 h-5 sm:w-6 sm:h-6 text-white" />
</div>
<div>
<h1 className="text-xl font-bold text-foreground">
<div className="min-w-0 flex-1">
<h1 className="text-base sm:text-lg lg:text-xl font-bold text-foreground leading-tight">
{user.name} - {testTypeInfo.name}
</h1>
<p className="text-sm text-muted-foreground">
<p className="text-xs sm:text-sm text-muted-foreground mt-1">
{new Date(result.completedAt).toLocaleString("zh-TW")}
</p>
</div>
</div>
<div className="flex justify-end gap-2">
{/* 功能按鈕區域 */}
<div className="flex justify-end gap-2 sm:gap-3">
<Button
onClick={() => {
if (navigator.share) {
@@ -381,7 +384,7 @@ function AdminResultDetailContent() {
}}
variant="outline"
size="sm"
className="print:hidden"
className="print:hidden flex-shrink-0"
>
<Share2 className="w-4 h-4 sm:mr-2" />
<span className="hidden sm:inline"></span>
@@ -390,7 +393,7 @@ function AdminResultDetailContent() {
onClick={() => window.print()}
variant="outline"
size="sm"
className="print:hidden"
className="print:hidden flex-shrink-0"
>
<Printer className="w-4 h-4 sm:mr-2" />
<span className="hidden sm:inline"></span>