增加服务器阈值规则
This commit is contained in:
parent
279c19ad7a
commit
d9caf505c1
@ -60,9 +60,10 @@ const LucideIconSelect: React.FC<LucideIconSelectProps> = ({
|
||||
<DialogTitle>选择图标</DialogTitle>
|
||||
</DialogHeader>
|
||||
|
||||
<div className="space-y-4 flex-1 flex flex-col overflow-hidden">
|
||||
{/* 搜索框 */}
|
||||
<div className="relative flex-shrink-0">
|
||||
<div className="space-y-4 flex-1 flex flex-col overflow-hidden px-6 pb-6">
|
||||
{/* 搜索框和当前选中 */}
|
||||
<div className="flex items-center gap-3 flex-shrink-0">
|
||||
<div className="relative flex-1">
|
||||
<Search className="absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" />
|
||||
<Input
|
||||
placeholder="搜索图标名称..."
|
||||
@ -71,6 +72,27 @@ const LucideIconSelect: React.FC<LucideIconSelectProps> = ({
|
||||
className="pl-10"
|
||||
/>
|
||||
</div>
|
||||
{/* 当前选中 */}
|
||||
{value && (
|
||||
<div className="flex items-center gap-2 px-3 py-2 border rounded-md bg-muted/50">
|
||||
<span className="text-sm text-muted-foreground whitespace-nowrap">当前选中:</span>
|
||||
<div className="flex items-center gap-2">
|
||||
<DynamicIcon name={value} className="h-4 w-4" />
|
||||
<code className="text-xs">{value}</code>
|
||||
</div>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
className="h-7 w-7 p-0"
|
||||
onClick={() => {
|
||||
onChange?.('');
|
||||
}}
|
||||
>
|
||||
×
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* 分类标签 */}
|
||||
<Tabs value={category} onValueChange={setCategory} className="flex-1 flex flex-col overflow-hidden">
|
||||
@ -130,28 +152,6 @@ const LucideIconSelect: React.FC<LucideIconSelectProps> = ({
|
||||
</div>
|
||||
</TabsContent>
|
||||
</Tabs>
|
||||
|
||||
{/* 当前选中 */}
|
||||
{value && (
|
||||
<div className="flex items-center gap-2 p-3 border rounded-md bg-muted/50 flex-shrink-0">
|
||||
<span className="text-sm text-muted-foreground">当前选中:</span>
|
||||
<div className="flex items-center gap-2">
|
||||
<DynamicIcon name={value} className="h-5 w-5" />
|
||||
<code className="text-sm">{value}</code>
|
||||
</div>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
className="ml-auto"
|
||||
onClick={() => {
|
||||
onChange?.('');
|
||||
onOpenChange(false);
|
||||
}}
|
||||
>
|
||||
清除
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
|
||||
@ -341,7 +341,7 @@ export const CategoryManageDialog: React.FC<CategoryManageDialogProps> = ({
|
||||
className="pl-8"
|
||||
/>
|
||||
</div>
|
||||
<Button onClick={handleSearch} variant="secondary">
|
||||
<Button onClick={handleSearch} variant="outline">
|
||||
<Search className="h-4 w-4 mr-2" />
|
||||
搜索
|
||||
</Button>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user