feat: 合并代码后 系统设置 ui样式优化、bug修复、全局统一图标对齐等
This commit is contained in:
@@ -17,9 +17,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { RefreshCw as ActionRefreshCw } from '@/components/common/icons/ActionIcons';
|
||||
import React from 'react';
|
||||
import { Button, Tag } from '@/components/ui';
|
||||
import { RefreshCw } from 'lucide-react';
|
||||
import { isAdmin } from '../../../helpers';
|
||||
|
||||
const AdminTokensActions = ({
|
||||
@@ -58,7 +58,7 @@ const AdminTokensActions = ({
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
<Button icon={<RefreshCw size={16} />} onClick={onRefresh}>
|
||||
<Button icon={<ActionRefreshCw size={16} />} onClick={onRefresh}>
|
||||
{t('刷新')}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@@ -17,10 +17,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { Plus as ActionPlus } from '@/components/common/icons/ActionIcons';
|
||||
import React from 'react';
|
||||
import { Tabs, TabPane, Tag } from '@/components/ui';
|
||||
import { Button } from 'antd';
|
||||
import { Plus } from 'lucide-react';
|
||||
import { CHANNEL_OPTIONS } from '../../../constants';
|
||||
import { getChannelIcon, isRoot } from '../../../helpers';
|
||||
import './channels-tabs.css';
|
||||
@@ -45,7 +45,7 @@ const ChannelsTabs = ({
|
||||
className='console-create-action'
|
||||
type='primary'
|
||||
size='middle'
|
||||
icon={<Plus size={16} />}
|
||||
icon={<ActionPlus size={16} />}
|
||||
onClick={() => {
|
||||
setEditingChannel({ id: undefined });
|
||||
setShowEdit(true);
|
||||
|
||||
@@ -17,9 +17,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { Filter as ActionFilter } from '@/components/common/icons/ActionIcons';
|
||||
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { Alert, Button, Card } from 'antd';
|
||||
import { Filter, Layers } from 'lucide-react';
|
||||
import { Layers } from 'lucide-react';
|
||||
import { calculateModelPrice } from '../../../../helpers';
|
||||
import MarketModelCard from './MarketModelCard';
|
||||
import MarketLogo from './MarketLogo';
|
||||
@@ -224,7 +225,7 @@ const MarketCatalog = ({
|
||||
)}
|
||||
<Button
|
||||
className='mm-mobile-filter'
|
||||
icon={<Filter size={16} strokeWidth={1.65} />}
|
||||
icon={<ActionFilter size={16} strokeWidth={1.65} />}
|
||||
aria-expanded={filtersOpen}
|
||||
aria-controls='mm-filter-panel'
|
||||
onClick={onToggleFilters}
|
||||
|
||||
@@ -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 { Search as ActionSearch } from '@/components/common/icons/ActionIcons';
|
||||
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
||||
import { Button, Input } from 'antd';
|
||||
import { Search, Zap } from 'lucide-react';
|
||||
@@ -100,7 +101,7 @@ const MarketHero = ({ searchValue, setSearchValue, onReset, t }) => {
|
||||
<Button
|
||||
type='primary'
|
||||
htmlType='submit'
|
||||
icon={<Search size={16} strokeWidth={1.65} />}
|
||||
icon={<ActionSearch size={16} strokeWidth={1.65} />}
|
||||
>
|
||||
{t('搜索')}
|
||||
</Button>
|
||||
|
||||
@@ -17,9 +17,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { Copy as ActionCopy } from '@/components/common/icons/ActionIcons';
|
||||
import React from 'react';
|
||||
import { Button, Card, Tag, Tooltip } from 'antd';
|
||||
import { Copy, Lock } from 'lucide-react';
|
||||
import { Lock } from 'lucide-react';
|
||||
import { getDiscountBadgeText } from '../../../../helpers';
|
||||
import MarketLogo from './MarketLogo';
|
||||
|
||||
@@ -146,7 +147,7 @@ const MarketModelCard = ({
|
||||
<Button
|
||||
type='text'
|
||||
aria-label={t('复制模型名称')}
|
||||
icon={<Copy size={16} strokeWidth={1.65} />}
|
||||
icon={<ActionCopy size={16} strokeWidth={1.65} />}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
onCopy(model.model_name);
|
||||
|
||||
@@ -17,9 +17,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { Copy as ActionCopy } from '@/components/common/icons/ActionIcons';
|
||||
import React from 'react';
|
||||
import { Button as AntButton, Tooltip as AntTooltip } from 'antd';
|
||||
import { Copy } from 'lucide-react';
|
||||
import { Button, Space, Tag, Modal, Tooltip } from '@/components/ui';
|
||||
import {
|
||||
timestamp2string,
|
||||
@@ -372,7 +372,7 @@ export const getModelsColumns = ({
|
||||
size='small'
|
||||
className='models-name-copy'
|
||||
aria-label={t('复制模型名称')}
|
||||
icon={<Copy size={14} />}
|
||||
icon={<ActionCopy size={14} />}
|
||||
onClick={() => copyText(text)}
|
||||
/>
|
||||
</AntTooltip>
|
||||
|
||||
@@ -17,10 +17,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { Plus as ActionPlus } from '@/components/common/icons/ActionIcons';
|
||||
import React from 'react';
|
||||
import { Modal } from '@/components/ui';
|
||||
import { Button } from 'antd';
|
||||
import { Plus } from 'lucide-react';
|
||||
import { IconEdit, IconClose } from '@/components/ui/icons';
|
||||
import {
|
||||
getLobeHubIcon,
|
||||
@@ -165,7 +165,7 @@ const ModelsTabs = ({
|
||||
className='console-create-action'
|
||||
type='primary'
|
||||
size='middle'
|
||||
icon={<Plus size={16} />}
|
||||
icon={<ActionPlus size={16} />}
|
||||
onClick={() => setShowAddVendor(true)}
|
||||
>
|
||||
{t('新增供应商')}
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
color: var(--ui-color-primary);
|
||||
}
|
||||
|
||||
.models-name-cell .models-name-copy.ant-btn .lucide {
|
||||
.models-name-cell .models-name-copy.ant-btn :is(.lucide, .app-action-icon) {
|
||||
width: 0.8em;
|
||||
height: 0.8em;
|
||||
}
|
||||
|
||||
@@ -17,16 +17,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { Download as ActionDownload } from '@/components/common/icons/ActionIcons';
|
||||
import React from 'react';
|
||||
import { Button } from '@/components/ui';
|
||||
import {
|
||||
ListTodo,
|
||||
Clock,
|
||||
CheckCircle2,
|
||||
Download,
|
||||
XCircle,
|
||||
Loader2,
|
||||
} from 'lucide-react';
|
||||
import { ListTodo, Clock, CheckCircle2, XCircle, Loader2 } from 'lucide-react';
|
||||
import { exportToCsv, formatTimestampForCsv } from '../../../helpers/exportCsv';
|
||||
import { Space, Statistic } from 'antd';
|
||||
import { useConsolePage } from '../../console/ConsoleContext';
|
||||
@@ -120,7 +114,7 @@ const TaskLogsActions = ({
|
||||
<Space wrap>
|
||||
{stats.pendingCount > 0 && <span>{t('实时更新中')}</span>}
|
||||
<Button
|
||||
icon={<Download size={16} />}
|
||||
icon={<ActionDownload size={16} />}
|
||||
onClick={handleExportCsv}
|
||||
disabled={!logs.length}
|
||||
>
|
||||
@@ -249,7 +243,7 @@ const TaskLogsActions = ({
|
||||
{/* 导出当前页为 CSV,空列表时禁用避免生成只有表头的无用文件 */}
|
||||
<Button
|
||||
size='small'
|
||||
icon={<Download className='w-3.5 h-3.5' />}
|
||||
icon={<ActionDownload className='w-3.5 h-3.5' />}
|
||||
onClick={handleExportCsv}
|
||||
disabled={!logs || logs.length === 0}
|
||||
className={exportButtonClass}
|
||||
|
||||
@@ -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 { Search as ActionSearch } from '@/components/common/icons/ActionIcons';
|
||||
import React from 'react';
|
||||
import { Button, Form } from '@/components/ui';
|
||||
import {
|
||||
@@ -244,7 +245,7 @@ const TaskLogsFilters = ({
|
||||
type='primary'
|
||||
htmlType='submit'
|
||||
loading={loading}
|
||||
icon={<Search size={14} />}
|
||||
icon={<ActionSearch size={14} />}
|
||||
>
|
||||
{t('搜索')}
|
||||
</Button>
|
||||
|
||||
@@ -17,9 +17,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { Download as ActionDownload } from '@/components/common/icons/ActionIcons';
|
||||
import React, { useState } from 'react';
|
||||
import { Card, Tag as AntTag } from 'antd';
|
||||
import { Clock, Download } from 'lucide-react';
|
||||
import { Clock } from 'lucide-react';
|
||||
import { Button, Pagination } from '@/components/ui';
|
||||
import CardPro from '../../common/ui/CardPro';
|
||||
import { ColumnSettingsButton } from '../../common/table/ColumnSettings';
|
||||
@@ -102,7 +103,7 @@ const TaskLogsPage = ({
|
||||
)}
|
||||
{/* 导出当前页为 CSV,空列表时禁用避免生成只有表头的无用文件 */}
|
||||
<Button
|
||||
icon={<Download size={14} />}
|
||||
icon={<ActionDownload size={14} />}
|
||||
onClick={() => exportTaskLogsPageCsv(logs, isAdminUser, t)}
|
||||
disabled={!logs || logs.length === 0}
|
||||
>
|
||||
|
||||
@@ -17,6 +17,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import {
|
||||
X as ActionX,
|
||||
Settings2 as ActionSettings2,
|
||||
Check as ActionCheck,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import { useEffectEvent } from '../../../../hooks/common/useEffectEvent';
|
||||
import React, { useEffect, useState, useContext, useRef } from 'react';
|
||||
import {
|
||||
@@ -42,9 +47,6 @@ import {
|
||||
Key,
|
||||
CreditCard,
|
||||
Shield,
|
||||
X,
|
||||
Check,
|
||||
Settings2,
|
||||
Calendar,
|
||||
Hash,
|
||||
Layers,
|
||||
@@ -480,9 +482,9 @@ const EditTokenModal = (props) => {
|
||||
</div>
|
||||
<button
|
||||
onClick={handleCancel}
|
||||
className='p-1.5 rounded-lg text-gray-400 hover:text-gray-600 hover:bg-gray-100 dark:hover:bg-neutral-800 transition-colors'
|
||||
className='app-action-button p-1.5 rounded-lg text-gray-400 hover:text-gray-600 hover:bg-gray-100 dark:hover:bg-neutral-800 transition-colors'
|
||||
>
|
||||
<X size={18} />
|
||||
<ActionX size={18} />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -640,10 +642,10 @@ const EditTokenModal = (props) => {
|
||||
<button
|
||||
type='button'
|
||||
onClick={() => setAdvancedOpen(!advancedOpen)}
|
||||
className='w-full flex items-center justify-between px-4 py-3 bg-white dark:bg-neutral-900 hover:bg-gray-50 dark:hover:bg-neutral-800 transition-colors'
|
||||
className='app-action-button w-full flex items-center justify-between px-4 py-3 bg-white dark:bg-neutral-900 hover:bg-gray-50 dark:hover:bg-neutral-800 transition-colors'
|
||||
>
|
||||
<div className='flex items-center gap-2'>
|
||||
<Settings2 size={15} className='text-brand' />
|
||||
<ActionSettings2 size={15} className='text-brand' />
|
||||
<span className='text-sm font-medium text-gray-700 dark:text-gray-300'>
|
||||
{t('高级设置')}
|
||||
</span>
|
||||
@@ -759,7 +761,7 @@ const EditTokenModal = (props) => {
|
||||
theme='solid'
|
||||
className='flex-1 !h-10 !rounded-xl !font-medium !border-0 !text-white !bg-gradient-to-r !from-brand-from !via-brand !to-brand-to shadow-lg shadow-brand/30 hover:!opacity-90'
|
||||
onClick={() => formApiRef.current?.submitForm()}
|
||||
icon={<Check size={16} />}
|
||||
icon={<ActionCheck size={16} />}
|
||||
loading={loading}
|
||||
>
|
||||
{isEdit ? t('保存修改') : t('创建密钥')}
|
||||
|
||||
@@ -17,9 +17,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { Search as ActionSearch } from '@/components/common/icons/ActionIcons';
|
||||
import React from 'react';
|
||||
import { Button, Form } from '@/components/ui';
|
||||
import { Search } from 'lucide-react';
|
||||
import '../../common/table/log-filters.css';
|
||||
import FilterSearchButton from '../../common/table/FilterSearchButton';
|
||||
import { useFilterSearch } from '../../../hooks/common/useFilterSearch';
|
||||
@@ -189,7 +189,7 @@ const LogsFilters = ({
|
||||
type='primary'
|
||||
htmlType='submit'
|
||||
loading={loading}
|
||||
icon={<Search size={14} />}
|
||||
icon={<ActionSearch size={14} />}
|
||||
>
|
||||
{t('搜索')}
|
||||
</Button>
|
||||
|
||||
@@ -17,9 +17,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { Download as ActionDownload } from '@/components/common/icons/ActionIcons';
|
||||
import React, { useState } from 'react';
|
||||
import { Card } from 'antd';
|
||||
import { Download } from 'lucide-react';
|
||||
import { Button, Pagination } from '@/components/ui';
|
||||
import CardPro from '../../common/ui/CardPro';
|
||||
import { TableTitle } from '../../common/table/TableToolbar';
|
||||
@@ -69,7 +69,7 @@ const LogsPage = ({ usageRecordMode = false }) => {
|
||||
<TableTitle>{t('调用明细')}</TableTitle>
|
||||
<div className='usage-record-table-actions'>
|
||||
<Button
|
||||
icon={<Download size={14} />}
|
||||
icon={<ActionDownload size={14} />}
|
||||
onClick={() => logsData.setShowExportModal(true)}
|
||||
>
|
||||
{t('导出')}
|
||||
@@ -122,7 +122,7 @@ const LogsPage = ({ usageRecordMode = false }) => {
|
||||
tableActions={
|
||||
<>
|
||||
<Button
|
||||
icon={<Download size={14} />}
|
||||
icon={<ActionDownload size={14} />}
|
||||
onClick={() => logsData.setShowExportModal(true)}
|
||||
>
|
||||
{logsData.t('导出')}
|
||||
|
||||
@@ -17,9 +17,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { Plus as ActionPlus } from '@/components/common/icons/ActionIcons';
|
||||
import React from 'react';
|
||||
import { Button } from 'antd';
|
||||
import { Plus } from 'lucide-react';
|
||||
import { isAdmin } from '../../../helpers';
|
||||
|
||||
const UsersActions = ({ setShowAddUser, t }) => {
|
||||
@@ -34,7 +34,7 @@ const UsersActions = ({ setShowAddUser, t }) => {
|
||||
<Button
|
||||
className='console-create-action'
|
||||
type='primary'
|
||||
icon={<Plus size={16} />}
|
||||
icon={<ActionPlus size={16} />}
|
||||
onClick={handleAddUser}
|
||||
size='middle'
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user