增加服务器阈值规则

This commit is contained in:
dengqichen 2025-12-08 17:16:20 +08:00
parent 279c19ad7a
commit d9caf505c1
2 changed files with 33 additions and 33 deletions

View File

@ -60,16 +60,38 @@ 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">
<Search className="absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" />
<Input
placeholder="搜索图标名称..."
value={search}
onChange={(e) => setSearch(e.target.value)}
className="pl-10"
/>
<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="搜索图标名称..."
value={search}
onChange={(e) => setSearch(e.target.value)}
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>
{/* 分类标签 */}
@ -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>

View File

@ -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>