feat: 1.统一右侧抽屉关闭按钮布局 2.统一 UI 组件为 Ant Design 移除 radix-ui、floating-ui 组件 3. 修复 ESLint 文件格式错误的问题

This commit is contained in:
zhanjunhao
2026-11-10 14:08:10 +08:00
parent 28e924e371
commit 584728590b
202 changed files with 29195 additions and 12732 deletions
+17 -10
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 { useEffectEvent } from '../common/useEffectEvent';
import { useState, useEffect, useRef, useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import { Modal } from '@/components/ui';
@@ -162,7 +163,7 @@ export const useTaskLogsData = ({
const [compactMode, setCompactMode] = useTableCompactMode('taskLogs');
// Load saved column preferences from localStorage
useEffect(() => {
const onMount = useEffectEvent(() => {
const savedColumns = localStorage.getItem(STORAGE_KEY);
setVisibleColumns(
resolveColumnVisibility(
@@ -171,7 +172,8 @@ export const useTaskLogsData = ({
isAdminUser ? [] : [COLUMN_KEYS.CHANNEL],
),
);
}, []);
});
useEffect(() => onMount(), [onMount]);
// Get default column visibility based on user role
const getDefaultColumnVisibility = () => {
@@ -224,7 +226,7 @@ export const useTaskLogsData = ({
if (Object.keys(visibleColumns).length > 0) {
localStorage.setItem(STORAGE_KEY, JSON.stringify(visibleColumns));
}
}, [visibleColumns]);
}, [visibleColumns, STORAGE_KEY]);
// Get form values helper function
const getFormValues = () => {
@@ -439,17 +441,22 @@ export const useTaskLogsData = ({
};
// Initialize data
useEffect(() => {
const onScopeChange2 = useEffectEvent(() => {
const localPageSize =
parseInt(localStorage.getItem('task-page-size')) || ITEMS_PER_PAGE;
setPageSize(localPageSize);
loadLogs(1, localPageSize).then();
}, [
organizationMode,
sharedStartTimestamp,
sharedEndTimestamp,
sharedFilterRevision,
]);
});
useEffect(
() => onScopeChange2(),
[
onScopeChange2,
organizationMode,
sharedStartTimestamp,
sharedEndTimestamp,
sharedFilterRevision,
],
);
// 存在进行中的任务时,自动轮询刷新(10s 间隔),无 pending 则停止,避免无谓请求
const loadLogsRef = useRef(loadLogs);