Files
shensheshou/app/workspace/moments-sync/[id]/view/page.tsx
v0 2408d50cb0 refactor: overhaul UI for streamlined user experience
Redesign navigation, home overview, user portrait, and valuation pages
with improved functionality and responsive design.

Co-authored-by: null <4804959+fnvtk@users.noreply.github.com>
2025-07-18 13:47:12 +00:00

130 lines
4.7 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use client"
import { useState } from "react"
import { ChevronLeft, Edit2, RefreshCw } from "lucide-react"
import { Button } from "@/components/ui/button"
import { Card } from "@/components/ui/card"
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"
interface MomentContent {
id: string
type: string
content: string
images: string[]
publishTime: string
pushTime: string
status: "已发送" | "待发送" | "已终止"
}
const mockData: MomentContent[] = [
{
id: "399401",
type: "图文",
content: "一定要把安全意识这件事情刻在DNA里......",
images: [
"https://hebbkx1anhila5yf.public.blob.vercel-storage.com/image-Z8LxL98X5Bwm5Jr5ke3755Qd97PSYC.png",
"https://hebbkx1anhila5yf.public.blob.vercel-storage.com/image-Z8LxL98X5Bwm5Jr5ke3755Qd97PSYC.png",
"https://hebbkx1anhila5yf.public.blob.vercel-storage.com/image-Z8LxL98X5Bwm5Jr5ke3755Qd97PSYC.png",
],
publishTime: "2025-02-15 23:37:49",
pushTime: "2025-02-16 08:50:36",
status: "已发送",
},
]
export default function MomentsSyncViewPage() {
const [syncName] = useState("同步卡若主号")
return (
<div className="min-h-screen bg-gray-50">
<header className="sticky top-0 z-10 bg-white border-b">
<div className="flex items-center justify-between h-14 px-4">
<div className="flex items-center">
<Button variant="ghost" size="icon" onClick={() => window.history.back()}>
<ChevronLeft className="h-5 w-5" />
</Button>
<h1 className="ml-2 text-lg font-medium">{syncName}</h1>
</div>
<div className="flex items-center space-x-2">
<Button variant="outline" size="sm">
<Edit2 className="h-4 w-4 mr-2" />
</Button>
<Button variant="outline" size="sm">
<RefreshCw className="h-4 w-4 mr-2" />
</Button>
</div>
</div>
</header>
<div className="p-4 max-w-7xl mx-auto space-y-6">
<Card className="p-6">
<h2 className="text-lg font-medium mb-4"></h2>
<div className="space-y-4">
<div className="flex items-center">
<span className="text-gray-500 w-32"></span>
<span>{syncName}</span>
</div>
</div>
</Card>
<Card className="p-6">
<h2 className="text-lg font-medium mb-4"></h2>
<div className="overflow-x-auto">
<Table>
<TableHeader>
<TableRow>
<TableHead className="w-[100px]">ID</TableHead>
<TableHead></TableHead>
<TableHead></TableHead>
<TableHead></TableHead>
<TableHead></TableHead>
<TableHead></TableHead>
<TableHead></TableHead>
</TableRow>
</TableHeader>
<TableBody>
{mockData.map((item) => (
<TableRow key={item.id}>
<TableCell>{item.id}</TableCell>
<TableCell>{item.type}</TableCell>
<TableCell className="max-w-[300px] truncate">{item.content}</TableCell>
<TableCell>
<div className="flex space-x-2">
{item.images.map((img, index) => (
<img
key={index}
src={img || "/placeholder.svg"}
alt={`Content ${index + 1}`}
className="w-16 h-16 object-cover rounded"
/>
))}
</div>
</TableCell>
<TableCell>{item.pushTime}</TableCell>
<TableCell>{item.publishTime}</TableCell>
<TableCell>
<span
className={`px-2 py-1 rounded-full text-xs ${
item.status === "已发送"
? "bg-green-100 text-green-800"
: item.status === "待发送"
? "bg-blue-100 text-blue-800"
: "bg-red-100 text-red-800"
}`}
>
{item.status}
</span>
</TableCell>
</TableRow>
))}
</TableBody>
</Table>
</div>
</Card>
</div>
</div>
)
}