feat: 合并代码后 系统设置 ui样式优化、bug修复、全局统一图标对齐等
This commit is contained in:
@@ -17,12 +17,15 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import {
|
||||
RefreshCcw as ActionRefreshCcw,
|
||||
CheckSquare as ActionCheckSquare,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, { useState, useCallback, useMemo, useEffect } from 'react';
|
||||
import {
|
||||
Button,
|
||||
Table,
|
||||
Tag,
|
||||
Empty,
|
||||
Checkbox,
|
||||
Form,
|
||||
Input,
|
||||
@@ -31,12 +34,7 @@ import {
|
||||
Modal,
|
||||
} from '@/components/ui';
|
||||
import { IconSearch } from '@/components/ui/icons';
|
||||
import {
|
||||
RefreshCcw,
|
||||
CheckSquare,
|
||||
AlertTriangle,
|
||||
CheckCircle,
|
||||
} from 'lucide-react';
|
||||
import { AlertTriangle, CheckCircle } from 'lucide-react';
|
||||
import {
|
||||
API,
|
||||
showError,
|
||||
@@ -47,10 +45,6 @@ import {
|
||||
import { useIsMobile } from '../../../hooks/common/useIsMobile';
|
||||
import { DEFAULT_ENDPOINT } from '../../../constants';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {
|
||||
IllustrationNoResult,
|
||||
IllustrationNoResultDark,
|
||||
} from '../../../components/common/illustrations';
|
||||
import ChannelSelectorModal from '../../../components/settings/ChannelSelectorModal';
|
||||
|
||||
function ConflictConfirmModal({ t, visible, items, onOk, onCancel }) {
|
||||
@@ -107,9 +101,6 @@ export default function UpstreamRatioSync(props) {
|
||||
const [differences, setDifferences] = useState({});
|
||||
const [resolutions, setResolutions] = useState({});
|
||||
|
||||
// 是否已经执行过同步
|
||||
const [hasSynced, setHasSynced] = useState(false);
|
||||
|
||||
// 分页相关状态
|
||||
const [currentPage, setCurrentPage] = useState(1);
|
||||
const [pageSize, setPageSize] = useState(10);
|
||||
@@ -227,7 +218,6 @@ export default function UpstreamRatioSync(props) {
|
||||
|
||||
setDifferences(differences);
|
||||
setResolutions({});
|
||||
setHasSynced(true);
|
||||
|
||||
if (Object.keys(differences).length === 0) {
|
||||
showSuccess(t('未找到差异化倍率,无需同步'));
|
||||
@@ -428,7 +418,7 @@ export default function UpstreamRatioSync(props) {
|
||||
<div className='flex flex-col md:flex-row justify-between items-center gap-4 w-full'>
|
||||
<div className='flex flex-col md:flex-row gap-2 w-full md:w-auto order-2 md:order-1'>
|
||||
<Button
|
||||
icon={<RefreshCcw size={14} />}
|
||||
icon={<ActionRefreshCcw size={14} />}
|
||||
className='w-full md:w-auto mt-2'
|
||||
onClick={() => {
|
||||
setModalVisible(true);
|
||||
@@ -445,7 +435,7 @@ export default function UpstreamRatioSync(props) {
|
||||
|
||||
return (
|
||||
<Button
|
||||
icon={<CheckSquare size={14} />}
|
||||
icon={<ActionCheckSquare size={14} />}
|
||||
type='secondary'
|
||||
onClick={applySync}
|
||||
disabled={!hasSelections}
|
||||
@@ -543,27 +533,6 @@ export default function UpstreamRatioSync(props) {
|
||||
}, [filteredDataSource]);
|
||||
|
||||
const renderDifferenceTable = () => {
|
||||
if (filteredDataSource.length === 0) {
|
||||
return (
|
||||
<Empty
|
||||
image={<IllustrationNoResult style={{ width: 150, height: 150 }} />}
|
||||
darkModeImage={
|
||||
<IllustrationNoResultDark style={{ width: 150, height: 150 }} />
|
||||
}
|
||||
description={
|
||||
searchKeyword.trim()
|
||||
? t('未找到匹配的模型')
|
||||
: Object.keys(differences).length === 0
|
||||
? hasSynced
|
||||
? t('暂无差异化倍率显示')
|
||||
: t('请先选择同步渠道')
|
||||
: t('请先选择同步渠道')
|
||||
}
|
||||
style={{ padding: 30 }}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
const columns = [
|
||||
{
|
||||
title: t('模型'),
|
||||
|
||||
Reference in New Issue
Block a user