整理上游搜索与编辑入口
上游搜索位于管理列表顶部,编辑弹窗仅保留配置字段;编辑和删除按钮补充可访问名称与悬停说明。保留已有上游预设、同步及编辑功能。 验证:TypeScript 与页面 lint 通过,发布后验收上游搜索和编辑弹窗。
This commit is contained in:
parent
5371ae2617
commit
525e105876
@ -15456,9 +15456,7 @@ export function AdminSettingsClient() {
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<Input aria-label="搜索上游" placeholder="搜索上游名称、类型或地址" className="mb-4 max-w-lg" value={providerSearch} onChange={event => setProviderSearch(event.target.value)} />
|
||||
{!providersData && <p role="status" className="py-6 text-sm text-muted-foreground">正在加载上游…</p>}
|
||||
<div className="space-y-4">
|
||||
<div className="space-y-4">
|
||||
<div className="space-y-2">
|
||||
<Label>名称</Label>
|
||||
<Input
|
||||
@ -15677,6 +15675,8 @@ export function AdminSettingsClient() {
|
||||
</div>
|
||||
</CardHeader>
|
||||
<CardContent className="px-0">
|
||||
<Input aria-label="搜索上游" placeholder="搜索上游名称、类型或地址" className="mb-4 max-w-lg" value={providerSearch} onChange={event => setProviderSearch(event.target.value)} />
|
||||
{!providersData && <p role="status" className="py-6 text-sm text-muted-foreground">正在加载上游…</p>}
|
||||
<div className="space-y-4">
|
||||
{providersData?.providers?.filter(provider => `${provider.name} ${provider.type} ${provider.baseUrl}`.toLowerCase().includes(providerSearch.trim().toLowerCase())).map((provider) => (
|
||||
<div
|
||||
@ -15868,6 +15868,8 @@ export function AdminSettingsClient() {
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<Button
|
||||
aria-label={`编辑上游 ${provider.name}`}
|
||||
title="编辑上游"
|
||||
onClick={() => {
|
||||
setProviderForm({
|
||||
id: provider.id,
|
||||
@ -15886,6 +15888,8 @@ export function AdminSettingsClient() {
|
||||
<Edit className="h-4 w-4" />
|
||||
</Button>
|
||||
<Button
|
||||
aria-label={`删除上游 ${provider.name}`}
|
||||
title="删除上游"
|
||||
onClick={() => handleDeleteProvider(provider.id)}
|
||||
size="sm"
|
||||
variant="destructive"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user