增加服务器阈值规则
This commit is contained in:
parent
279c19ad7a
commit
d9caf505c1
@ -60,16 +60,38 @@ 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">
|
||||||
<Search className="absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" />
|
<div className="relative flex-1">
|
||||||
<Input
|
<Search className="absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" />
|
||||||
placeholder="搜索图标名称..."
|
<Input
|
||||||
value={search}
|
placeholder="搜索图标名称..."
|
||||||
onChange={(e) => setSearch(e.target.value)}
|
value={search}
|
||||||
className="pl-10"
|
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>
|
</div>
|
||||||
|
|
||||||
{/* 分类标签 */}
|
{/* 分类标签 */}
|
||||||
@ -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>
|
||||||
|
|||||||
@ -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>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user