fix(ui): 修复登录与并发请求并统一表格、主题和页面展示

验证:868 项单测、ESLint、Prettier、UI 依赖审计和差异检查通过。
This commit is contained in:
zhanjunhao
2026-11-19 18:58:46 +08:00
parent 9f5e0cddfb
commit e70e0d2224
128 changed files with 4672 additions and 5391 deletions
@@ -22,6 +22,7 @@ For commercial licensing, please contact support@quantumnous.com
// 也会带上这里写的内容。客户端读公开接口 GET /api/weyai/desktop/release-notes,
// 未登录也能看到;草稿只在这里可见。root 和被下放了「WeyAi」页签的管理员都能用。
import { TableRowActions } from '@/components/common/table/TableToolbar';
import React, { useCallback, useEffect, useState } from 'react';
import {
Banner,
@@ -30,7 +31,6 @@ import {
Empty,
Input,
Modal,
Popconfirm,
Space,
Switch,
Table,
@@ -197,7 +197,37 @@ const SettingsWeyAiReleaseNotes = () => {
title: t('操作'),
width: 240,
render: (_, note) => (
<Space>
<TableRowActions
items={[
note.status === 'published' && {
key: 'withdraw',
label: t('撤回'),
onClick: () => setStatus(note, 'draft'),
disabled: busyId === note.id,
},
note.status !== 'published' && {
key: 'publish',
label: t('发布'),
onClick: () => setStatus(note, 'published'),
disabled: busyId === note.id,
},
{
key: 'delete',
label: t('删除'),
disabled: busyId === note.id,
danger: true,
onClick: () =>
Modal.confirm({
title: t('确定删除这条版本说明吗?'),
content: t('删除后客户端不再显示这个版本的说明'),
okText: t('确认'),
cancelText: t('取消'),
okButtonProps: { danger: true },
onOk: () => remove(note),
}),
},
]}
>
<Button
onClick={() => setDraft({ ...note })}
type='link'
@@ -205,40 +235,7 @@ const SettingsWeyAiReleaseNotes = () => {
>
{t('编辑')}
</Button>
{note.status === 'published' ? (
<Button
loading={busyId === note.id}
onClick={() => setStatus(note, 'draft')}
type='link'
size='small'
>
{t('撤回')}
</Button>
) : (
<Button
loading={busyId === note.id}
onClick={() => setStatus(note, 'published')}
type='link'
size='small'
>
{t('发布')}
</Button>
)}
<Popconfirm
title={t('确定删除这条版本说明吗?')}
content={t('删除后客户端不再显示这个版本的说明')}
onConfirm={() => remove(note)}
>
<Button
disabled={busyId === note.id}
type='link'
size='small'
danger
>
{t('删除')}
</Button>
</Popconfirm>
</Space>
</TableRowActions>
),
},
];