style(ops-web): unify table actions as circular icon buttons

Replace the mixed text-link / button action lists in Accounts,
AdminUsers, and SiteDomainMappings with a shared .table-actions-row +
.action-* class set in styles.css. Each row now renders compact icon
buttons (edit/delete/approve/revoke/key/kol/reset/play) tinted by intent,
matching the new KolSubscriptions console look.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-29 22:07:55 +08:00
parent 73fd7db21a
commit 0729b76cc7
4 changed files with 150 additions and 40 deletions
+33 -12
View File
@@ -45,18 +45,38 @@
{{ formatDate(record.created_at) }}
</template>
<template v-else-if="column.key === 'actions'">
<a-space>
<a @click="openResetPassword(record)">重置密码</a>
<a-popconfirm
:title="record.status === 'active' ? '确认停用该账号?' : '确认启用该账号?'"
:disabled="record.id === auth.operator?.id"
@confirm="toggleStatus(record)"
>
<a :class="{ disabled: record.id === auth.operator?.id }">
{{ record.status === "active" ? "停用" : "启用" }}
</a>
</a-popconfirm>
</a-space>
<div class="table-actions-row">
<a-tooltip title="重置密码">
<a-button
type="text"
shape="circle"
size="small"
class="action-btn action-key"
@click="openResetPassword(record)"
>
<KeyOutlined />
</a-button>
</a-tooltip>
<a-tooltip :title="record.status === 'active' ? '停用账号' : '启用账号'">
<a-popconfirm
:title="record.status === 'active' ? '确认停用该账号?' : '确认启用该账号?'"
:disabled="record.id === auth.operator?.id"
@confirm="toggleStatus(record)"
>
<a-button
type="text"
shape="circle"
size="small"
:class="['action-btn', record.status === 'active' ? 'action-revoke' : 'action-play']"
:disabled="record.id === auth.operator?.id"
>
<StopOutlined v-if="record.status === 'active'" />
<PlayCircleOutlined v-else />
</a-button>
</a-popconfirm>
</a-tooltip>
</div>
</template>
</template>
</a-table>
@@ -101,6 +121,7 @@
</template>
<script setup lang="ts">
import { KeyOutlined, StopOutlined, PlayCircleOutlined } from "@ant-design/icons-vue";
import type { TablePaginationConfig } from "ant-design-vue";
import { message } from "ant-design-vue";
import dayjs from "dayjs";