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
+28 -33
View File
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { TableRowActions } from '@/components/common/table/TableToolbar';
import { useTranslation } from 'react-i18next';
import TableEmpty from '../../components/common/table/TableEmpty';
import TableToolbar from '../../components/common/table/TableToolbar';
@@ -183,7 +184,32 @@ export default function InsightsPanel({ value, onChange, disabled, error }) {
const index = value.articles.findIndex((a) => a.id === item.id);
const move = (offset) => onChange(moveArticle(value, item.id, offset));
return (
<div className='website-insights-row-actions'>
<TableRowActions
items={[
{
key: 'up',
label: t('上移'),
title: sortable ? undefined : '请在全部分类且无搜索时调整顺序',
disabled: disabled || !sortable || index <= 0,
onClick: () => move(-1),
},
{
key: 'down',
label: t('下移'),
title: sortable ? undefined : '请在全部分类且无搜索时调整顺序',
disabled:
disabled || !sortable || index >= value.articles.length - 1,
onClick: () => move(1),
},
{
key: 'delete',
label: t('删除'),
danger: true,
disabled,
onClick: () => deleteArticle(item),
},
]}
>
<Button
type='link'
size='small'
@@ -194,38 +220,7 @@ export default function InsightsPanel({ value, onChange, disabled, error }) {
>
{t('编辑')}
</Button>
<Button
type='link'
size='small'
aria-label={`上移${item.title}`}
title={sortable ? undefined : '请在全部分类且无搜索时调整顺序'}
disabled={disabled || !sortable || index <= 0}
onClick={() => move(-1)}
>
{t('上移')}
</Button>
<Button
type='link'
size='small'
aria-label={`下移${item.title}`}
title={sortable ? undefined : '请在全部分类且无搜索时调整顺序'}
disabled={
disabled || !sortable || index >= value.articles.length - 1
}
onClick={() => move(1)}
>
{t('下移')}
</Button>
<Button
type='link'
size='small'
danger
disabled={disabled}
onClick={() => deleteArticle(item)}
>
{t('删除')}
</Button>
</div>
</TableRowActions>
);
},
},