fix(web): use text buttons for table row actions

This commit is contained in:
2026-09-28 14:33:54 +08:00
parent 5b2756fea8
commit 630a4feab1
7 changed files with 20 additions and 19 deletions
@@ -131,10 +131,10 @@ export default function AccountManagementList() {
align: 'right',
render: (_, account) => (
<Space wrap>
<Button size="small" onClick={() => openTags(account)}>
<Button type="text" size="small" onClick={() => openTags(account)}>
编辑标签
</Button>
<Button size="small" onClick={() => history.push(`/accounts/${account.id}/edit`)}>
<Button type="text" size="small" onClick={() => history.push(`/accounts/${account.id}/edit`)}>
编辑账号
</Button>
<Popconfirm
@@ -142,7 +142,7 @@ export default function AccountManagementList() {
onConfirm={() => deleteAccount(account)}
disabled={actionBusy === account.id}
>
<Button size="small" danger disabled={actionBusy === account.id}>
<Button type="text" size="small" danger disabled={actionBusy === account.id}>
删除
</Button>
</Popconfirm>
@@ -182,9 +182,9 @@ export default function MonitoringAccountList() {
align: 'right',
render: (_, account) => (
<Space wrap>
<Button size="small" onClick={() => openTags(account)}>编辑标签</Button>
<Button size="small" loading={actionBusy === account.id} disabled={actionBusy === account.id} onClick={() => syncCompetitor(account)}>强制同步</Button>
<Button size="small" disabled={actionBusy === account.id} onClick={() => toggleCompetitor(account)}>
<Button type="text" size="small" onClick={() => openTags(account)}>编辑标签</Button>
<Button type="text" size="small" loading={actionBusy === account.id} disabled={actionBusy === account.id} onClick={() => syncCompetitor(account)}>强制同步</Button>
<Button type="text" size="small" disabled={actionBusy === account.id} onClick={() => toggleCompetitor(account)}>
{account.enabled ? '暂停' : '恢复'}
</Button>
<Popconfirm
@@ -192,7 +192,7 @@ export default function MonitoringAccountList() {
onConfirm={() => deleteAccount(account)}
disabled={actionBusy === account.id}
>
<Button size="small" danger disabled={actionBusy === account.id}>删除</Button>
<Button type="text" size="small" danger disabled={actionBusy === account.id}>删除</Button>
</Popconfirm>
</Space>
),
+1 -1
View File
@@ -160,7 +160,7 @@ export default function Page() {
align: 'right',
render: (_, job) =>
job.status === 'failed' ? (
<Button size="small" disabled={retryID === job.id} onClick={() => retryShareJob(job.id)}>
<Button type="text" size="small" disabled={retryID === job.id} onClick={() => retryShareJob(job.id)}>
{retryID === job.id ? '入队中…' : '重新入队'}
</Button>
) : (
+3 -2
View File
@@ -132,6 +132,7 @@ export default function Page() {
return (
<Space wrap style={{ justifyContent: 'flex-end' }}>
<Button
type="text"
size="small"
title={`启动 ${runtime.name}${block ? `(${block})` : ''}`}
disabled={busy === runtime.alias || running || gatewayUnavailable || block !== ''}
@@ -139,11 +140,11 @@ export default function Page() {
>
启动
</Button>
<Button size="small" disabled={busy === runtime.alias || !stopping || gatewayUnavailable} onClick={() => runAction(runtime, 'stop')}>
<Button type="text" size="small" disabled={busy === runtime.alias || !stopping || gatewayUnavailable} onClick={() => runAction(runtime, 'stop')}>
停止
</Button>
<Popconfirm title={`回收 ${runtime.name}(${runtime.alias})?运行资源将被回收,Profile 目录保留。`} onConfirm={() => handleRecycle(runtime)}>
<Button size="small" danger disabled={busy === runtime.alias || gatewayUnavailable}>
<Button type="text" size="small" danger disabled={busy === runtime.alias || gatewayUnavailable}>
回收
</Button>
</Popconfirm>
+2 -2
View File
@@ -154,11 +154,11 @@ export default function Page() {
align: 'right',
render: (_, gateway) => (
<Space>
<Button size="small" disabled={busy === gateway.name || busy === 'edit'} onClick={() => setEditing(gateway)}>
<Button type="text" size="small" disabled={busy === gateway.name || busy === 'edit'} onClick={() => setEditing(gateway)}>
编辑
</Button>
<Popconfirm title={`删除网关 ${gateway.name}?`} onConfirm={() => removeGateway(gateway)}>
<Button size="small" danger disabled={busy === gateway.name || busy === 'edit'}>
<Button type="text" size="small" danger disabled={busy === gateway.name || busy === 'edit'}>
删除
</Button>
</Popconfirm>
+6 -6
View File
@@ -245,25 +245,25 @@ export default function Page() {
align: 'right',
render: (_, exit) => (
<Space wrap style={{ justifyContent: 'flex-end' }}>
<Button size="small" disabled={busy === exit.id} onClick={() => runAction(exit, 'check')}>
<Button type="text" size="small" disabled={busy === exit.id} onClick={() => runAction(exit, 'check')}>
检测
</Button>
{exit.health_status === 'disabled' ? (
<Button size="small" disabled={busy === exit.id} onClick={() => runAction(exit, 'enable')}>
<Button type="text" size="small" disabled={busy === exit.id} onClick={() => runAction(exit, 'enable')}>
启用
</Button>
) : (
<Popconfirm title={`停用网络出口 ${exit.id}?绑定账号将暂停,排队任务进入 hold。`} onConfirm={() => runAction(exit, 'disable')}>
<Button size="small" danger disabled={busy === exit.id}>
<Button type="text" size="small" danger disabled={busy === exit.id}>
停用
</Button>
</Popconfirm>
)}
<Button size="small" disabled={busy === exit.id} onClick={() => setEditing(exit)}>
<Button type="text" size="small" disabled={busy === exit.id} onClick={() => setEditing(exit)}>
编辑
</Button>
<Popconfirm title={`删除网络出口 ${exit.id}?有绑定或运行实例时会拒绝。`} onConfirm={() => deleteExit(exit)}>
<Button size="small" danger disabled={busy === exit.id}>
<Button type="text" size="small" danger disabled={busy === exit.id}>
删除
</Button>
</Popconfirm>
@@ -289,7 +289,7 @@ export default function Page() {
style={{ marginBottom: 16 }}
title={`环境不可用${bindingsError.status ? `(${bindingsError.status})` : ''}:无法读取账号绑定,状态暂时未知。`}
action={
<Button size="small" onClick={loadBindings}>
<Button type="text" size="small" onClick={loadBindings}>
重试环境状态
</Button>
}
+1 -1
View File
@@ -130,7 +130,7 @@ export default function Page() {
key: 'actions',
align: 'right',
render: (_, task) => (
<Button size="small" onClick={() => history.push(`/tasks/${task.id}`)}>
<Button type="text" size="small" onClick={() => history.push(`/tasks/${task.id}`)}>
查看
</Button>
),