chore(format): reformat header and search page
This commit is contained in:
@@ -561,11 +561,11 @@ function SearchPageContent() {
|
||||
|
||||
<div className="flex items-center gap-2 w-full md:w-auto">
|
||||
<div className="relative flex-1 md:w-80">
|
||||
<Search className="absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" />
|
||||
<Search className="absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground z-10" />
|
||||
<Input
|
||||
type="search"
|
||||
placeholder="搜索陪玩、游戏、标签..."
|
||||
className="pl-9 rounded-full bg-muted/50 border-transparent focus-visible:bg-background"
|
||||
className="pl-9 h-12 rounded-xl border-border bg-card text-base shadow-[var(--shadow-card)] transition-shadow focus:shadow-[var(--shadow-card-hover)]"
|
||||
value={searchQuery}
|
||||
onChange={(e) => setSearchQuery(e.target.value)}
|
||||
/>
|
||||
@@ -649,7 +649,7 @@ function SearchPageContent() {
|
||||
<div className="flex items-center justify-between mb-6 bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60 sticky top-0 z-10 py-2 md:static md:bg-transparent md:p-0">
|
||||
<div className="flex items-center gap-2 overflow-x-auto pb-2 md:pb-0 no-scrollbar">
|
||||
<Button
|
||||
variant={sortBy === "composite" ? "secondary" : "ghost"}
|
||||
variant={sortBy === "composite" ? "default" : "ghost"}
|
||||
size="sm"
|
||||
onClick={() => setSortAndSync("composite")}
|
||||
className="whitespace-nowrap rounded-full"
|
||||
@@ -657,7 +657,7 @@ function SearchPageContent() {
|
||||
综合排序
|
||||
</Button>
|
||||
<Button
|
||||
variant={sortBy === "rating" ? "secondary" : "ghost"}
|
||||
variant={sortBy === "rating" ? "default" : "ghost"}
|
||||
size="sm"
|
||||
onClick={() => setSortAndSync("rating")}
|
||||
className="whitespace-nowrap rounded-full"
|
||||
@@ -665,7 +665,7 @@ function SearchPageContent() {
|
||||
评分最高
|
||||
</Button>
|
||||
<Button
|
||||
variant={sortBy === "orders" ? "secondary" : "ghost"}
|
||||
variant={sortBy === "orders" ? "default" : "ghost"}
|
||||
size="sm"
|
||||
onClick={() => setSortAndSync("orders")}
|
||||
className="whitespace-nowrap rounded-full"
|
||||
@@ -673,7 +673,7 @@ function SearchPageContent() {
|
||||
接单最多
|
||||
</Button>
|
||||
<Button
|
||||
variant={sortBy.startsWith("price") ? "secondary" : "ghost"}
|
||||
variant={sortBy.startsWith("price") ? "default" : "ghost"}
|
||||
size="sm"
|
||||
onClick={() => setSortAndSync(sortBy === "price_asc" ? "price_desc" : "price_asc")}
|
||||
className="whitespace-nowrap gap-1 rounded-full"
|
||||
|
||||
@@ -136,7 +136,9 @@ export function Header() {
|
||||
<DropdownMenuItem
|
||||
key={role}
|
||||
onClick={() => handleRoleSwitch(role)}
|
||||
className={cn(currentRole === role && "bg-accent")}
|
||||
className={cn(
|
||||
currentRole === role && "bg-accent text-accent-foreground rounded-md",
|
||||
)}
|
||||
>
|
||||
{label}
|
||||
</DropdownMenuItem>
|
||||
|
||||
Reference in New Issue
Block a user