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 5713d541b0
commit d224d5b6fa
202 changed files with 29195 additions and 12732 deletions
@@ -60,7 +60,6 @@ const ChannelsTable = (channelsData) => {
setCurrentMultiKeyChannel,
// Auto-ban exclusion
isChannelExcluded,
excludedChannels,
autoBanExclusionFilter,
// Daily quota info
dailyQuotaInfo,
@@ -127,7 +126,7 @@ const ChannelsTable = (channelsData) => {
return channel;
})
.filter(Boolean);
}, [channels, autoBanExclusionFilter, isChannelExcluded, excludedChannels]);
}, [channels, autoBanExclusionFilter, isChannelExcluded]);
// Get all columns
const allColumns = useMemo(() => {
@@ -175,7 +174,6 @@ const ChannelsTable = (channelsData) => {
setShowMultiKeyManageModal,
setCurrentMultiKeyChannel,
isChannelExcluded,
excludedChannels,
dailyQuotaInfo,
]);
@@ -184,9 +182,7 @@ const ChannelsTable = (channelsData) => {
return allColumns.filter((column) => visibleColumns[column.key]);
};
const visibleColumnsList = useMemo(() => {
return getVisibleColumns();
}, [visibleColumns, allColumns]);
const visibleColumnsList = getVisibleColumns();
const tableColumns = useMemo(() => {
const sortableColumns = visibleColumnsList.map((column) =>
@@ -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 '../../../../hooks/common/useEffectEvent';
import '../../../console/module-alignment.css';
import React, { useEffect, useState, useRef, useMemo } from 'react';
import { useTranslation } from 'react-i18next';
@@ -964,7 +965,7 @@ const EditChannelModal = (props) => {
setModelOptions(optionsWithIcon);
}, [originModelOptions, inputs.models, t]);
useEffect(() => {
const onScopeChange = useEffectEvent(() => {
fetchModels().then();
fetchGroups().then();
if (!isEdit) {
@@ -977,7 +978,8 @@ const EditChannelModal = (props) => {
setBasicModels(localModels);
setInputs((inputs) => ({ ...inputs, models: localModels }));
}
}, [props.editingChannel.id]);
});
useEffect(() => onScopeChange(), [onScopeChange, props.editingChannel.id]);
useEffect(() => {
if (formApiRef.current) {
@@ -985,7 +987,7 @@ const EditChannelModal = (props) => {
}
}, [inputs]);
useEffect(() => {
const onVisibilityChange2 = useEffectEvent(() => {
if (props.visible) {
if (isEdit) {
loadChannel();
@@ -1004,7 +1006,11 @@ const EditChannelModal = (props) => {
// 关闭后作废在途的兜底数据请求
fallbackLoadSeqRef.current += 1;
}
}, [props.visible, channelId]);
});
useEffect(
() => onVisibilityChange2(),
[onVisibilityChange2, props.visible, channelId],
);
useEffect(() => {
if (!isEdit) {
@@ -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 '../../../../hooks/common/useEffectEvent';
import React, { useState, useEffect, useRef } from 'react';
import {
API,
@@ -270,7 +271,7 @@ const EditTagModal = (props) => {
setModelOptions(localModelOptions);
}, [originModelOptions, inputs.models]);
useEffect(() => {
const onVisibilityChange = useEffectEvent(() => {
const fetchTagModels = async () => {
if (!tag) return;
setLoading(true);
@@ -305,7 +306,8 @@ const EditTagModal = (props) => {
tag: tag,
new_tag: tag,
});
}, [visible, tag]);
});
useEffect(() => onVisibilityChange(), [onVisibilityChange, visible, tag]);
useEffect(() => {
if (formApiRef.current) {
@@ -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 '../../../../hooks/common/useEffectEvent';
import React, { useState, useEffect } from 'react';
import { useTranslation } from 'react-i18next';
import {
@@ -288,12 +289,16 @@ const MultiKeyManageModal = ({ visible, onCancel, channel, onRefresh }) => {
};
// Effect to load data when modal opens
useEffect(() => {
const onVisibilityChange = useEffectEvent(() => {
if (visible && channel?.id) {
setCurrentPage(1); // Reset to first page when opening
loadKeyStatus(1, pageSize);
}
}, [visible, channel?.id]);
});
useEffect(
() => onVisibilityChange(),
[onVisibilityChange, visible, channel?.id],
);
// Reset pagination when modal closes
useEffect(() => {