chore(format): run prettier
This commit is contained in:
@@ -56,8 +56,15 @@ export default function LoginPage() {
|
|||||||
</div>
|
</div>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor="password">密码</Label>
|
<Label htmlFor="password">密码</Label>
|
||||||
<Input id="password" type="password" placeholder="请输入密码" {...register("password")} />
|
<Input
|
||||||
{errors.password && <p className="text-xs text-destructive">{errors.password.message}</p>}
|
id="password"
|
||||||
|
type="password"
|
||||||
|
placeholder="请输入密码"
|
||||||
|
{...register("password")}
|
||||||
|
/>
|
||||||
|
{errors.password && (
|
||||||
|
<p className="text-xs text-destructive">{errors.password.message}</p>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<Button type="submit" className="w-full" disabled={isSubmitting}>
|
<Button type="submit" className="w-full" disabled={isSubmitting}>
|
||||||
{isSubmitting ? "登录中..." : "登录"}
|
{isSubmitting ? "登录中..." : "登录"}
|
||||||
|
|||||||
@@ -59,7 +59,9 @@ export default function RegisterPage() {
|
|||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor="nickname">昵称</Label>
|
<Label htmlFor="nickname">昵称</Label>
|
||||||
<Input id="nickname" placeholder="请输入昵称" {...register("nickname")} />
|
<Input id="nickname" placeholder="请输入昵称" {...register("nickname")} />
|
||||||
{errors.nickname && <p className="text-xs text-destructive">{errors.nickname.message}</p>}
|
{errors.nickname && (
|
||||||
|
<p className="text-xs text-destructive">{errors.nickname.message}</p>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor="phone">手机号</Label>
|
<Label htmlFor="phone">手机号</Label>
|
||||||
@@ -68,8 +70,15 @@ export default function RegisterPage() {
|
|||||||
</div>
|
</div>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor="password">密码</Label>
|
<Label htmlFor="password">密码</Label>
|
||||||
<Input id="password" type="password" placeholder="请输入密码" {...register("password")} />
|
<Input
|
||||||
{errors.password && <p className="text-xs text-destructive">{errors.password.message}</p>}
|
id="password"
|
||||||
|
type="password"
|
||||||
|
placeholder="请输入密码"
|
||||||
|
{...register("password")}
|
||||||
|
/>
|
||||||
|
{errors.password && (
|
||||||
|
<p className="text-xs text-destructive">{errors.password.message}</p>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor="confirmPassword">确认密码</Label>
|
<Label htmlFor="confirmPassword">确认密码</Label>
|
||||||
|
|||||||
+31
-7
@@ -22,12 +22,14 @@ export default function HomePage() {
|
|||||||
</div>
|
</div>
|
||||||
<div className="relative z-10 space-y-8 max-w-3xl mx-auto">
|
<div className="relative z-10 space-y-8 max-w-3xl mx-auto">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
<h1 className="text-4xl md:text-6xl font-bold tracking-tighter leading-tight">找到你的游戏搭档</h1>
|
<h1 className="text-4xl md:text-6xl font-bold tracking-tighter leading-tight">
|
||||||
|
找到你的游戏搭档
|
||||||
|
</h1>
|
||||||
<p className="text-lg md:text-xl text-muted-foreground leading-relaxed">
|
<p className="text-lg md:text-xl text-muted-foreground leading-relaxed">
|
||||||
找人一起打游戏,从这里开始
|
找人一起打游戏,从这里开始
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="discover-search" className="w-full max-w-2xl mx-auto">
|
<div id="discover-search" className="w-full max-w-2xl mx-auto">
|
||||||
<form method="get" action="/search" className="relative flex items-center w-full">
|
<form method="get" action="/search" className="relative flex items-center w-full">
|
||||||
<Search className="absolute left-4 h-5 w-5 text-muted-foreground z-10" />
|
<Search className="absolute left-4 h-5 w-5 text-muted-foreground z-10" />
|
||||||
@@ -72,15 +74,37 @@ export default function HomePage() {
|
|||||||
<div className="flex flex-col sm:flex-row sm:items-center justify-between gap-4">
|
<div className="flex flex-col sm:flex-row sm:items-center justify-between gap-4">
|
||||||
<h2 className="text-xl font-semibold">推荐内容</h2>
|
<h2 className="text-xl font-semibold">推荐内容</h2>
|
||||||
<div className="flex flex-wrap items-center gap-2 text-sm">
|
<div className="flex flex-wrap items-center gap-2 text-sm">
|
||||||
<Link href="/search?sort=composite" className="text-primary font-medium">综合排序</Link>
|
<Link href="/search?sort=composite" className="text-primary font-medium">
|
||||||
|
综合排序
|
||||||
|
</Link>
|
||||||
<span className="text-muted-foreground/30">|</span>
|
<span className="text-muted-foreground/30">|</span>
|
||||||
<Link href="/search?sort=rating" className="text-muted-foreground hover:text-foreground transition-colors">评分最高</Link>
|
<Link
|
||||||
|
href="/search?sort=rating"
|
||||||
|
className="text-muted-foreground hover:text-foreground transition-colors"
|
||||||
|
>
|
||||||
|
评分最高
|
||||||
|
</Link>
|
||||||
<span className="text-muted-foreground/30">|</span>
|
<span className="text-muted-foreground/30">|</span>
|
||||||
<Link href="/search?sort=orders" className="text-muted-foreground hover:text-foreground transition-colors">接单最多</Link>
|
<Link
|
||||||
|
href="/search?sort=orders"
|
||||||
|
className="text-muted-foreground hover:text-foreground transition-colors"
|
||||||
|
>
|
||||||
|
接单最多
|
||||||
|
</Link>
|
||||||
<span className="text-muted-foreground/30">|</span>
|
<span className="text-muted-foreground/30">|</span>
|
||||||
<Link href="/search?sort=price_asc" className="text-muted-foreground hover:text-foreground transition-colors">价格最低</Link>
|
<Link
|
||||||
|
href="/search?sort=price_asc"
|
||||||
|
className="text-muted-foreground hover:text-foreground transition-colors"
|
||||||
|
>
|
||||||
|
价格最低
|
||||||
|
</Link>
|
||||||
<span className="text-muted-foreground/30">|</span>
|
<span className="text-muted-foreground/30">|</span>
|
||||||
<Link href="/search?sort=price_desc" className="text-muted-foreground hover:text-foreground transition-colors">价格最高</Link>
|
<Link
|
||||||
|
href="/search?sort=price_desc"
|
||||||
|
className="text-muted-foreground hover:text-foreground transition-colors"
|
||||||
|
>
|
||||||
|
价格最高
|
||||||
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -110,10 +110,7 @@ export default async function PlayerDetailPage({ params }: { params: Promise<{ i
|
|||||||
<TabsContent value="services" className="mt-6">
|
<TabsContent value="services" className="mt-6">
|
||||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
||||||
{playerServices.map((service) => (
|
{playerServices.map((service) => (
|
||||||
<Card
|
<Card key={service.id} className="flex flex-col h-full">
|
||||||
key={service.id}
|
|
||||||
className="flex flex-col h-full"
|
|
||||||
>
|
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<div className="flex justify-between items-start">
|
<div className="flex justify-between items-start">
|
||||||
<Badge variant="outline">{service.gameName}</Badge>
|
<Badge variant="outline">{service.gameName}</Badge>
|
||||||
|
|||||||
@@ -404,7 +404,6 @@ function SearchPageContent() {
|
|||||||
[router, searchParams],
|
[router, searchParams],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const timer = setTimeout(() => {
|
const timer = setTimeout(() => {
|
||||||
const urlQ = searchParams.get("q") ?? ""
|
const urlQ = searchParams.get("q") ?? ""
|
||||||
|
|||||||
+118
-118
@@ -67,133 +67,133 @@ export default function ChatDetailPage({ params }: { params: Promise<{ id: strin
|
|||||||
<Link href="/chat" className="text-muted-foreground hover:text-foreground">
|
<Link href="/chat" className="text-muted-foreground hover:text-foreground">
|
||||||
<ArrowLeft className="h-5 w-5" />
|
<ArrowLeft className="h-5 w-5" />
|
||||||
</Link>
|
</Link>
|
||||||
<Avatar className="h-8 w-8">
|
<Avatar className="h-8 w-8">
|
||||||
<AvatarImage src={other.avatar} />
|
<AvatarImage src={other.avatar} />
|
||||||
<AvatarFallback>{other.name[0]}</AvatarFallback>
|
<AvatarFallback>{other.name[0]}</AvatarFallback>
|
||||||
</Avatar>
|
</Avatar>
|
||||||
<div>
|
<div>
|
||||||
<span className="text-sm font-medium">{other.name}</span>
|
<span className="text-sm font-medium">{other.name}</span>
|
||||||
<div className="flex items-center gap-1">
|
<div className="flex items-center gap-1">
|
||||||
<Badge variant="outline" className="text-[10px] px-1.5 py-0">
|
<Badge variant="outline" className="text-[10px] px-1.5 py-0">
|
||||||
{session.type === "order" ? "订单会话" : "咨询会话"}
|
{session.type === "order" ? "订单会话" : "咨询会话"}
|
||||||
</Badge>
|
</Badge>
|
||||||
{session.readonly && (
|
{session.readonly && (
|
||||||
<span className="text-[10px] text-muted-foreground flex items-center gap-0.5">
|
<span className="text-[10px] text-muted-foreground flex items-center gap-0.5">
|
||||||
<Lock className="h-3 w-3" />
|
<Lock className="h-3 w-3" />
|
||||||
只读
|
只读
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<ScrollArea className="flex-1 p-4">
|
<ScrollArea className="flex-1 p-4">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{messages.map((msg) => {
|
{messages.map((msg) => {
|
||||||
if (msg.type === "system") {
|
if (msg.type === "system") {
|
||||||
|
return (
|
||||||
|
<div key={msg.id} className="text-center">
|
||||||
|
<span className="text-xs text-muted-foreground bg-muted px-2 py-1 rounded">
|
||||||
|
{msg.content}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
const isMine = msg.senderId === userId
|
||||||
return (
|
return (
|
||||||
<div key={msg.id} className="text-center">
|
<div key={msg.id} className={cn("flex gap-2", isMine && "flex-row-reverse")}>
|
||||||
<span className="text-xs text-muted-foreground bg-muted px-2 py-1 rounded">
|
<Avatar className="h-8 w-8 shrink-0">
|
||||||
{msg.content}
|
<AvatarImage src={msg.senderAvatar} />
|
||||||
</span>
|
<AvatarFallback>{msg.senderName[0]}</AvatarFallback>
|
||||||
|
</Avatar>
|
||||||
|
<div className={cn("max-w-[70%]", isMine && "text-right")}>
|
||||||
|
{msg.type === "image" ? (
|
||||||
|
<Image
|
||||||
|
src={msg.content}
|
||||||
|
alt="聊天图片"
|
||||||
|
width={256}
|
||||||
|
height={192}
|
||||||
|
unoptimized
|
||||||
|
className="inline-block rounded-lg max-h-48 max-w-64 border"
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<p
|
||||||
|
className={cn(
|
||||||
|
"inline-block rounded-lg px-3 py-2 text-sm",
|
||||||
|
isMine ? "bg-primary text-primary-foreground" : "bg-muted",
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{msg.content}
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
<p className="text-[10px] text-muted-foreground mt-1">
|
||||||
|
{new Date(msg.createdAt).toLocaleTimeString("zh-CN", {
|
||||||
|
hour: "2-digit",
|
||||||
|
minute: "2-digit",
|
||||||
|
})}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
})}
|
||||||
const isMine = msg.senderId === userId
|
</div>
|
||||||
return (
|
</ScrollArea>
|
||||||
<div key={msg.id} className={cn("flex gap-2", isMine && "flex-row-reverse")}>
|
|
||||||
<Avatar className="h-8 w-8 shrink-0">
|
|
||||||
<AvatarImage src={msg.senderAvatar} />
|
|
||||||
<AvatarFallback>{msg.senderName[0]}</AvatarFallback>
|
|
||||||
</Avatar>
|
|
||||||
<div className={cn("max-w-[70%]", isMine && "text-right")}>
|
|
||||||
{msg.type === "image" ? (
|
|
||||||
<Image
|
|
||||||
src={msg.content}
|
|
||||||
alt="聊天图片"
|
|
||||||
width={256}
|
|
||||||
height={192}
|
|
||||||
unoptimized
|
|
||||||
className="inline-block rounded-lg max-h-48 max-w-64 border"
|
|
||||||
/>
|
|
||||||
) : (
|
|
||||||
<p
|
|
||||||
className={cn(
|
|
||||||
"inline-block rounded-lg px-3 py-2 text-sm",
|
|
||||||
isMine ? "bg-primary text-primary-foreground" : "bg-muted",
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
{msg.content}
|
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
<p className="text-[10px] text-muted-foreground mt-1">
|
|
||||||
{new Date(msg.createdAt).toLocaleTimeString("zh-CN", {
|
|
||||||
hour: "2-digit",
|
|
||||||
minute: "2-digit",
|
|
||||||
})}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
})}
|
|
||||||
</div>
|
|
||||||
</ScrollArea>
|
|
||||||
|
|
||||||
{!session.readonly ? (
|
{!session.readonly ? (
|
||||||
<div className="border-t p-4 bg-muted/30">
|
<div className="border-t p-4 bg-muted/30">
|
||||||
<input
|
<input
|
||||||
ref={imageInputRef}
|
ref={imageInputRef}
|
||||||
type="file"
|
type="file"
|
||||||
accept="image/*"
|
accept="image/*"
|
||||||
className="hidden"
|
className="hidden"
|
||||||
onChange={(event) => {
|
onChange={(event) => {
|
||||||
const file = event.target.files?.[0]
|
const file = event.target.files?.[0]
|
||||||
if (!file) return
|
if (!file) return
|
||||||
const result = sendImageMessage(session.id, URL.createObjectURL(file))
|
const result = sendImageMessage(session.id, URL.createObjectURL(file))
|
||||||
if (result && !result.ok) notifyInfo(result.message ?? "发送失败")
|
if (result && !result.ok) notifyInfo(result.message ?? "发送失败")
|
||||||
event.target.value = ""
|
event.target.value = ""
|
||||||
}}
|
}}
|
||||||
/>
|
|
||||||
<form
|
|
||||||
className="flex gap-2"
|
|
||||||
onSubmit={(e) => {
|
|
||||||
e.preventDefault()
|
|
||||||
const text = input.trim()
|
|
||||||
if (!text) return
|
|
||||||
|
|
||||||
const result = sendTextMessage(session.id, text)
|
|
||||||
if (result && !result.ok) {
|
|
||||||
notifyInfo(result.message ?? "发送失败")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
setInput("")
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Input
|
|
||||||
value={input}
|
|
||||||
onChange={(e) => setInput(e.target.value)}
|
|
||||||
placeholder="输入消息..."
|
|
||||||
className="flex-1"
|
|
||||||
/>
|
/>
|
||||||
<Button
|
<form
|
||||||
type="button"
|
className="flex gap-2"
|
||||||
size="icon"
|
onSubmit={(e) => {
|
||||||
variant="outline"
|
e.preventDefault()
|
||||||
onClick={() => imageInputRef.current?.click()}
|
const text = input.trim()
|
||||||
|
if (!text) return
|
||||||
|
|
||||||
|
const result = sendTextMessage(session.id, text)
|
||||||
|
if (result && !result.ok) {
|
||||||
|
notifyInfo(result.message ?? "发送失败")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
setInput("")
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<ImagePlus className="h-4 w-4" />
|
<Input
|
||||||
</Button>
|
value={input}
|
||||||
<Button type="submit" size="icon" disabled={!input.trim()}>
|
onChange={(e) => setInput(e.target.value)}
|
||||||
<Send className="h-4 w-4" />
|
placeholder="输入消息..."
|
||||||
</Button>
|
className="flex-1"
|
||||||
</form>
|
/>
|
||||||
</div>
|
<Button
|
||||||
) : (
|
type="button"
|
||||||
<div className="border-t p-4 text-center text-sm text-muted-foreground bg-muted/30">
|
size="icon"
|
||||||
<Lock className="h-4 w-4 inline mr-1" />
|
variant="outline"
|
||||||
订单已关闭,会话为只读状态
|
onClick={() => imageInputRef.current?.click()}
|
||||||
</div>
|
>
|
||||||
)}
|
<ImagePlus className="h-4 w-4" />
|
||||||
|
</Button>
|
||||||
|
<Button type="submit" size="icon" disabled={!input.trim()}>
|
||||||
|
<Send className="h-4 w-4" />
|
||||||
|
</Button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<div className="border-t p-4 text-center text-sm text-muted-foreground bg-muted/30">
|
||||||
|
<Lock className="h-4 w-4 inline mr-1" />
|
||||||
|
订单已关闭,会话为只读状态
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
+18
-18
@@ -63,13 +63,13 @@
|
|||||||
--muted-foreground: oklch(0.45 0.02 45);
|
--muted-foreground: oklch(0.45 0.02 45);
|
||||||
--accent: oklch(0.94 0.02 45);
|
--accent: oklch(0.94 0.02 45);
|
||||||
--accent-foreground: oklch(0.25 0.02 45);
|
--accent-foreground: oklch(0.25 0.02 45);
|
||||||
--destructive: oklch(0.60 0.20 25);
|
--destructive: oklch(0.6 0.2 25);
|
||||||
--destructive-foreground: oklch(0.98 0.01 45);
|
--destructive-foreground: oklch(0.98 0.01 45);
|
||||||
--border: oklch(0.90 0.02 45);
|
--border: oklch(0.9 0.02 45);
|
||||||
--input: oklch(0.90 0.02 45);
|
--input: oklch(0.9 0.02 45);
|
||||||
--ring: oklch(0.65 0.22 45);
|
--ring: oklch(0.65 0.22 45);
|
||||||
--chart-1: oklch(0.65 0.22 45);
|
--chart-1: oklch(0.65 0.22 45);
|
||||||
--chart-2: oklch(0.60 0.15 180);
|
--chart-2: oklch(0.6 0.15 180);
|
||||||
--chart-3: oklch(0.55 0.15 300);
|
--chart-3: oklch(0.55 0.15 300);
|
||||||
--chart-4: oklch(0.75 0.18 85);
|
--chart-4: oklch(0.75 0.18 85);
|
||||||
--chart-5: oklch(0.65 0.18 15);
|
--chart-5: oklch(0.65 0.18 15);
|
||||||
@@ -79,10 +79,10 @@
|
|||||||
--sidebar-primary-foreground: oklch(0.98 0.01 45);
|
--sidebar-primary-foreground: oklch(0.98 0.01 45);
|
||||||
--sidebar-accent: oklch(0.93 0.02 45);
|
--sidebar-accent: oklch(0.93 0.02 45);
|
||||||
--sidebar-accent-foreground: oklch(0.14 0.01 45);
|
--sidebar-accent-foreground: oklch(0.14 0.01 45);
|
||||||
--sidebar-border: oklch(0.90 0.02 45);
|
--sidebar-border: oklch(0.9 0.02 45);
|
||||||
--sidebar-ring: oklch(0.65 0.22 45);
|
--sidebar-ring: oklch(0.65 0.22 45);
|
||||||
--shadow-card: 0 2px 8px -2px rgba(0,0,0,0.04), 0 4px 16px -4px rgba(0,0,0,0.02);
|
--shadow-card: 0 2px 8px -2px rgba(0, 0, 0, 0.04), 0 4px 16px -4px rgba(0, 0, 0, 0.02);
|
||||||
--shadow-card-hover: 0 8px 24px -4px rgba(0,0,0,0.08), 0 12px 32px -8px rgba(0,0,0,0.04);
|
--shadow-card-hover: 0 8px 24px -4px rgba(0, 0, 0, 0.08), 0 12px 32px -8px rgba(0, 0, 0, 0.04);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dark {
|
.dark {
|
||||||
@@ -92,34 +92,34 @@
|
|||||||
--card-foreground: oklch(0.98 0.01 45);
|
--card-foreground: oklch(0.98 0.01 45);
|
||||||
--popover: oklch(0.18 0.01 45);
|
--popover: oklch(0.18 0.01 45);
|
||||||
--popover-foreground: oklch(0.98 0.01 45);
|
--popover-foreground: oklch(0.98 0.01 45);
|
||||||
--primary: oklch(0.70 0.22 45);
|
--primary: oklch(0.7 0.22 45);
|
||||||
--primary-foreground: oklch(0.14 0.01 45);
|
--primary-foreground: oklch(0.14 0.01 45);
|
||||||
--secondary: oklch(0.25 0.02 45);
|
--secondary: oklch(0.25 0.02 45);
|
||||||
--secondary-foreground: oklch(0.98 0.01 45);
|
--secondary-foreground: oklch(0.98 0.01 45);
|
||||||
--muted: oklch(0.25 0.02 45);
|
--muted: oklch(0.25 0.02 45);
|
||||||
--muted-foreground: oklch(0.70 0.02 45);
|
--muted-foreground: oklch(0.7 0.02 45);
|
||||||
--accent: oklch(0.25 0.02 45);
|
--accent: oklch(0.25 0.02 45);
|
||||||
--accent-foreground: oklch(0.98 0.01 45);
|
--accent-foreground: oklch(0.98 0.01 45);
|
||||||
--destructive: oklch(0.65 0.20 25);
|
--destructive: oklch(0.65 0.2 25);
|
||||||
--destructive-foreground: oklch(0.98 0.01 45);
|
--destructive-foreground: oklch(0.98 0.01 45);
|
||||||
--border: oklch(0.25 0.02 45);
|
--border: oklch(0.25 0.02 45);
|
||||||
--input: oklch(0.25 0.02 45);
|
--input: oklch(0.25 0.02 45);
|
||||||
--ring: oklch(0.70 0.22 45);
|
--ring: oklch(0.7 0.22 45);
|
||||||
--chart-1: oklch(0.70 0.22 45);
|
--chart-1: oklch(0.7 0.22 45);
|
||||||
--chart-2: oklch(0.65 0.15 180);
|
--chart-2: oklch(0.65 0.15 180);
|
||||||
--chart-3: oklch(0.65 0.15 300);
|
--chart-3: oklch(0.65 0.15 300);
|
||||||
--chart-4: oklch(0.80 0.18 85);
|
--chart-4: oklch(0.8 0.18 85);
|
||||||
--chart-5: oklch(0.70 0.18 15);
|
--chart-5: oklch(0.7 0.18 15);
|
||||||
--sidebar: oklch(0.18 0.01 45);
|
--sidebar: oklch(0.18 0.01 45);
|
||||||
--sidebar-foreground: oklch(0.85 0.02 45);
|
--sidebar-foreground: oklch(0.85 0.02 45);
|
||||||
--sidebar-primary: oklch(0.70 0.22 45);
|
--sidebar-primary: oklch(0.7 0.22 45);
|
||||||
--sidebar-primary-foreground: oklch(0.14 0.01 45);
|
--sidebar-primary-foreground: oklch(0.14 0.01 45);
|
||||||
--sidebar-accent: oklch(0.25 0.02 45);
|
--sidebar-accent: oklch(0.25 0.02 45);
|
||||||
--sidebar-accent-foreground: oklch(0.98 0.01 45);
|
--sidebar-accent-foreground: oklch(0.98 0.01 45);
|
||||||
--sidebar-border: oklch(0.25 0.02 45);
|
--sidebar-border: oklch(0.25 0.02 45);
|
||||||
--sidebar-ring: oklch(0.70 0.22 45);
|
--sidebar-ring: oklch(0.7 0.22 45);
|
||||||
--shadow-card: 0 2px 8px -2px rgba(0,0,0,0.04), 0 4px 16px -4px rgba(0,0,0,0.02);
|
--shadow-card: 0 2px 8px -2px rgba(0, 0, 0, 0.04), 0 4px 16px -4px rgba(0, 0, 0, 0.02);
|
||||||
--shadow-card-hover: 0 8px 24px -4px rgba(0,0,0,0.08), 0 12px 32px -8px rgba(0,0,0,0.04);
|
--shadow-card-hover: 0 8px 24px -4px rgba(0, 0, 0, 0.08), 0 12px 32px -8px rgba(0, 0, 0, 0.04);
|
||||||
}
|
}
|
||||||
|
|
||||||
@layer base {
|
@layer base {
|
||||||
|
|||||||
+21
-4
@@ -121,7 +121,11 @@ export function Header() {
|
|||||||
<>
|
<>
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
<Button variant="ghost" size="sm" className="hidden md:flex text-xs h-8 text-muted-foreground hover:text-foreground">
|
<Button
|
||||||
|
variant="ghost"
|
||||||
|
size="sm"
|
||||||
|
className="hidden md:flex text-xs h-8 text-muted-foreground hover:text-foreground"
|
||||||
|
>
|
||||||
{roleLabels[currentRole]}
|
{roleLabels[currentRole]}
|
||||||
</Button>
|
</Button>
|
||||||
</DropdownMenuTrigger>
|
</DropdownMenuTrigger>
|
||||||
@@ -140,7 +144,12 @@ export function Header() {
|
|||||||
</DropdownMenuContent>
|
</DropdownMenuContent>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
|
|
||||||
<Button variant="ghost" size="icon" className="relative h-9 w-9 text-muted-foreground hover:text-foreground" asChild>
|
<Button
|
||||||
|
variant="ghost"
|
||||||
|
size="icon"
|
||||||
|
className="relative h-9 w-9 text-muted-foreground hover:text-foreground"
|
||||||
|
asChild
|
||||||
|
>
|
||||||
<Link href="/notifications">
|
<Link href="/notifications">
|
||||||
<Bell className="h-4 w-4" />
|
<Bell className="h-4 w-4" />
|
||||||
{unreadCount > 0 && (
|
{unreadCount > 0 && (
|
||||||
@@ -153,7 +162,11 @@ export function Header() {
|
|||||||
|
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
<Button variant="ghost" size="icon" className="rounded-full h-9 w-9 text-muted-foreground hover:text-foreground">
|
<Button
|
||||||
|
variant="ghost"
|
||||||
|
size="icon"
|
||||||
|
className="rounded-full h-9 w-9 text-muted-foreground hover:text-foreground"
|
||||||
|
>
|
||||||
<Avatar className="h-7 w-7">
|
<Avatar className="h-7 w-7">
|
||||||
<AvatarImage src={user?.avatar} />
|
<AvatarImage src={user?.avatar} />
|
||||||
<AvatarFallback>{user?.nickname?.[0] ?? "?"}</AvatarFallback>
|
<AvatarFallback>{user?.nickname?.[0] ?? "?"}</AvatarFallback>
|
||||||
@@ -224,7 +237,11 @@ export function Header() {
|
|||||||
|
|
||||||
<Sheet open={mobileOpen} onOpenChange={setMobileOpen}>
|
<Sheet open={mobileOpen} onOpenChange={setMobileOpen}>
|
||||||
<SheetTrigger asChild>
|
<SheetTrigger asChild>
|
||||||
<Button variant="ghost" size="icon" className="md:hidden h-9 w-9 text-muted-foreground hover:text-foreground">
|
<Button
|
||||||
|
variant="ghost"
|
||||||
|
size="icon"
|
||||||
|
className="md:hidden h-9 w-9 text-muted-foreground hover:text-foreground"
|
||||||
|
>
|
||||||
<Menu className="h-5 w-5" />
|
<Menu className="h-5 w-5" />
|
||||||
</Button>
|
</Button>
|
||||||
</SheetTrigger>
|
</SheetTrigger>
|
||||||
|
|||||||
Reference in New Issue
Block a user