增加服务器阈值规则

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,9 +60,10 @@ const LucideIconSelect: React.FC<LucideIconSelectProps> = ({
<DialogTitle></DialogTitle> <DialogTitle></DialogTitle>
</DialogHeader> </DialogHeader>
<div className="space-y-4 flex-1 flex flex-col overflow-hidden"> <div className="space-y-4 flex-1 flex flex-col overflow-hidden px-6 pb-6">
{/* 搜索框 */} {/* 搜索框和当前选中 */}
<div className="relative flex-shrink-0"> <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" /> <Search className="absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" />
<Input <Input
placeholder="搜索图标名称..." placeholder="搜索图标名称..."
@ -71,6 +72,27 @@ const LucideIconSelect: React.FC<LucideIconSelectProps> = ({
className="pl-10" className="pl-10"
/> />
</div> </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"> <Tabs value={category} onValueChange={setCategory} className="flex-1 flex flex-col overflow-hidden">
@ -130,28 +152,6 @@ const LucideIconSelect: React.FC<LucideIconSelectProps> = ({
</div> </div>
</TabsContent> </TabsContent>
</Tabs> </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> </div>
</DialogContent> </DialogContent>
</Dialog> </Dialog>

View File

@ -341,7 +341,7 @@ export const CategoryManageDialog: React.FC<CategoryManageDialogProps> = ({
className="pl-8" className="pl-8"
/> />
</div> </div>
<Button onClick={handleSearch} variant="secondary"> <Button onClick={handleSearch} variant="outline">
<Search className="h-4 w-4 mr-2" /> <Search className="h-4 w-4 mr-2" />
</Button> </Button>