feat: 参考原型图 ui优化提交 个人端-用户中心 相关的页面
This commit is contained in:
@@ -25,7 +25,7 @@ import {
|
||||
Switch,
|
||||
Typography,
|
||||
Select,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import CompactModeToggle from '../../common/ui/CompactModeToggle';
|
||||
import { isRoot } from '../../../helpers';
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
SplitButtonGroup,
|
||||
Tag,
|
||||
Tooltip,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
API,
|
||||
timestamp2string,
|
||||
@@ -42,7 +42,7 @@ import {
|
||||
hoverOrClickTrigger,
|
||||
} from '../../../helpers';
|
||||
import { CHANNEL_OPTIONS } from '../../../constants';
|
||||
import { IconTreeTriangleDown, IconMore } from '@douyinfe/semi-icons';
|
||||
import { IconTreeTriangleDown, IconMore } from '@/components/ui/icons';
|
||||
import { ShuffleBrandIcon } from '../../common/icons/BrandIcons';
|
||||
|
||||
// 删除单个渠道的确认文案:若该渠道被其他渠道列为兜底,追加影响说明。
|
||||
@@ -261,13 +261,13 @@ const renderDailyQuota = (record, dailyQuotaInfo, t) => {
|
||||
const percent = info.usage_percent || 0;
|
||||
const isExceeded = info.limit_exceeded;
|
||||
|
||||
let strokeColor = 'var(--semi-color-success)';
|
||||
let strokeColor = 'var(--ui-color-success)';
|
||||
if (percent >= 100) {
|
||||
strokeColor = 'var(--semi-color-danger)';
|
||||
strokeColor = 'var(--ui-color-danger)';
|
||||
} else if (percent >= 80) {
|
||||
strokeColor = 'var(--semi-color-warning)';
|
||||
strokeColor = 'var(--ui-color-warning)';
|
||||
} else if (percent >= 50) {
|
||||
strokeColor = 'var(--semi-color-primary)';
|
||||
strokeColor = 'var(--ui-color-primary)';
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -284,7 +284,7 @@ const renderDailyQuota = (record, dailyQuotaInfo, t) => {
|
||||
{t('使用率')}: {percent}%
|
||||
</div>
|
||||
{isExceeded && (
|
||||
<div style={{ color: 'var(--semi-color-danger)' }}>
|
||||
<div style={{ color: 'var(--ui-color-danger)' }}>
|
||||
{t('已达限额,今日不再调度')}
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -18,8 +18,8 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { Button, Form } from '@douyinfe/semi-ui';
|
||||
import { IconSearch } from '@douyinfe/semi-icons';
|
||||
import { Button, Form } from '@/components/ui';
|
||||
import { IconSearch } from '@/components/ui/icons';
|
||||
import { isRoot } from '../../../helpers';
|
||||
|
||||
const ChannelsFilters = ({
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React, { useMemo } from 'react';
|
||||
import { Empty } from '@douyinfe/semi-ui';
|
||||
import { Empty } from '@/components/ui';
|
||||
import CardTable from '../../common/ui/CardTable';
|
||||
import {
|
||||
IllustrationNoResult,
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { Tabs, TabPane, Tag } from '@douyinfe/semi-ui';
|
||||
import { Tabs, TabPane, Tag } from '@/components/ui';
|
||||
import { CHANNEL_OPTIONS } from '../../../constants';
|
||||
import { getChannelIcon } from '../../../helpers';
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { Modal, Input, Typography } from '@douyinfe/semi-ui';
|
||||
import { Modal, Input, Typography } from '@/components/ui';
|
||||
|
||||
const BatchTagModal = ({
|
||||
showBatchSetTag,
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { Modal, Button, Checkbox } from '@douyinfe/semi-ui';
|
||||
import { Modal, Button, Checkbox } from '@/components/ui';
|
||||
import { getChannelsColumns } from '../ChannelsColumnDefs';
|
||||
|
||||
const ColumnSelectorModal = ({
|
||||
@@ -99,7 +99,7 @@ const ColumnSelectorModal = ({
|
||||
</div>
|
||||
<div
|
||||
className='flex flex-wrap max-h-96 overflow-y-auto rounded-lg p-4'
|
||||
style={{ border: '1px solid var(--semi-color-border)' }}
|
||||
style={{ border: '1px solid var(--ui-color-border)' }}
|
||||
>
|
||||
{allColumns.map((column) => {
|
||||
// Skip columns without title
|
||||
|
||||
@@ -45,7 +45,7 @@ import {
|
||||
Row,
|
||||
Col,
|
||||
Highlight,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
getChannelModels,
|
||||
copy,
|
||||
@@ -69,7 +69,7 @@ import {
|
||||
IconBolt,
|
||||
IconChevronUp,
|
||||
IconChevronDown,
|
||||
} from '@douyinfe/semi-icons';
|
||||
} from '@/components/ui/icons';
|
||||
|
||||
const { Text, Title } = Typography;
|
||||
|
||||
@@ -3226,7 +3226,7 @@ const EditChannelModal = (props) => {
|
||||
extraText={
|
||||
<div className='flex gap-2 flex-wrap'>
|
||||
<Text
|
||||
className='!text-semi-color-primary cursor-pointer'
|
||||
className='!text-ui-color-primary cursor-pointer'
|
||||
onClick={() =>
|
||||
handleInputChange(
|
||||
'param_override',
|
||||
@@ -3237,7 +3237,7 @@ const EditChannelModal = (props) => {
|
||||
{t('旧格式模板')}
|
||||
</Text>
|
||||
<Text
|
||||
className='!text-semi-color-primary cursor-pointer'
|
||||
className='!text-ui-color-primary cursor-pointer'
|
||||
onClick={() =>
|
||||
handleInputChange(
|
||||
'param_override',
|
||||
@@ -3289,7 +3289,7 @@ const EditChannelModal = (props) => {
|
||||
<div className='flex flex-col gap-1'>
|
||||
<div className='flex gap-2 flex-wrap items-center'>
|
||||
<Text
|
||||
className='!text-semi-color-primary cursor-pointer'
|
||||
className='!text-ui-color-primary cursor-pointer'
|
||||
onClick={() =>
|
||||
handleInputChange(
|
||||
'header_override',
|
||||
@@ -3673,7 +3673,7 @@ const EditChannelModal = (props) => {
|
||||
marginTop: -8,
|
||||
marginBottom: 8,
|
||||
fontSize: 12,
|
||||
color: 'var(--semi-color-text-2)',
|
||||
color: 'var(--ui-color-text-2)',
|
||||
}}
|
||||
>
|
||||
{t(
|
||||
|
||||
@@ -38,7 +38,7 @@ import {
|
||||
Tag,
|
||||
Avatar,
|
||||
Form,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
IconSave,
|
||||
IconClose,
|
||||
@@ -46,7 +46,7 @@ import {
|
||||
IconUser,
|
||||
IconCode,
|
||||
IconSetting,
|
||||
} from '@douyinfe/semi-icons';
|
||||
} from '@/components/ui/icons';
|
||||
import { getChannelModels } from '../../../../helpers';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
@@ -497,7 +497,7 @@ const EditTagModal = (props) => {
|
||||
extraText={
|
||||
<Space>
|
||||
<Text
|
||||
className='!text-semi-color-primary cursor-pointer'
|
||||
className='!text-ui-color-primary cursor-pointer'
|
||||
onClick={() =>
|
||||
handleInputChange(
|
||||
'model_mapping',
|
||||
@@ -508,7 +508,7 @@ const EditTagModal = (props) => {
|
||||
{t('填入模板')}
|
||||
</Text>
|
||||
<Text
|
||||
className='!text-semi-color-primary cursor-pointer'
|
||||
className='!text-ui-color-primary cursor-pointer'
|
||||
onClick={() =>
|
||||
handleInputChange(
|
||||
'model_mapping',
|
||||
@@ -519,7 +519,7 @@ const EditTagModal = (props) => {
|
||||
{t('清空重定向')}
|
||||
</Text>
|
||||
<Text
|
||||
className='!text-semi-color-primary cursor-pointer'
|
||||
className='!text-ui-color-primary cursor-pointer'
|
||||
onClick={() => handleInputChange('model_mapping', '')}
|
||||
>
|
||||
{t('不更改')}
|
||||
@@ -569,7 +569,7 @@ const EditTagModal = (props) => {
|
||||
extraText={
|
||||
<div className='flex gap-2 flex-wrap'>
|
||||
<Text
|
||||
className='!text-semi-color-primary cursor-pointer'
|
||||
className='!text-ui-color-primary cursor-pointer'
|
||||
onClick={() =>
|
||||
handleInputChange(
|
||||
'param_override',
|
||||
@@ -580,7 +580,7 @@ const EditTagModal = (props) => {
|
||||
{t('旧格式模板')}
|
||||
</Text>
|
||||
<Text
|
||||
className='!text-semi-color-primary cursor-pointer'
|
||||
className='!text-ui-color-primary cursor-pointer'
|
||||
onClick={() =>
|
||||
handleInputChange(
|
||||
'param_override',
|
||||
@@ -611,7 +611,7 @@ const EditTagModal = (props) => {
|
||||
{t('新格式模板')}
|
||||
</Text>
|
||||
<Text
|
||||
className='!text-semi-color-primary cursor-pointer'
|
||||
className='!text-ui-color-primary cursor-pointer'
|
||||
onClick={() =>
|
||||
handleInputChange('param_override', null)
|
||||
}
|
||||
@@ -640,7 +640,7 @@ const EditTagModal = (props) => {
|
||||
<div className='flex flex-col gap-1'>
|
||||
<div className='flex gap-2 flex-wrap items-center'>
|
||||
<Text
|
||||
className='!text-semi-color-primary cursor-pointer'
|
||||
className='!text-ui-color-primary cursor-pointer'
|
||||
onClick={() =>
|
||||
handleInputChange(
|
||||
'header_override',
|
||||
@@ -659,7 +659,7 @@ const EditTagModal = (props) => {
|
||||
{t('填入模板')}
|
||||
</Text>
|
||||
<Text
|
||||
className='!text-semi-color-primary cursor-pointer'
|
||||
className='!text-ui-color-primary cursor-pointer'
|
||||
onClick={() =>
|
||||
handleInputChange('header_override', null)
|
||||
}
|
||||
|
||||
@@ -29,12 +29,12 @@ import {
|
||||
Tabs,
|
||||
Collapse,
|
||||
Tooltip,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
IllustrationNoResult,
|
||||
IllustrationNoResultDark,
|
||||
} from '../../../common/illustrations';
|
||||
import { IconSearch, IconInfoCircle } from '@douyinfe/semi-icons';
|
||||
import { IconSearch, IconInfoCircle } from '@/components/ui/icons';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { getModelCategories } from '../../../../helpers/render';
|
||||
|
||||
|
||||
@@ -26,8 +26,8 @@ import {
|
||||
Tag,
|
||||
Typography,
|
||||
Select,
|
||||
} from '@douyinfe/semi-ui';
|
||||
import { IconSearch } from '@douyinfe/semi-icons';
|
||||
} from '@/components/ui';
|
||||
import { IconSearch } from '@/components/ui/icons';
|
||||
import { copy, showError, showInfo, showSuccess } from '../../../../helpers';
|
||||
import { MODEL_TABLE_PAGE_SIZE } from '../../../../constants';
|
||||
|
||||
@@ -207,7 +207,7 @@ const ModelTestModal = ({
|
||||
<div className='flex items-center gap-2'>
|
||||
<Typography.Text
|
||||
strong
|
||||
className='!text-[var(--semi-color-text-0)] !text-base'
|
||||
className='!text-[var(--ui-color-text-0)] !text-base'
|
||||
>
|
||||
{currentTestChannel.name} {t('渠道的模型测试')}
|
||||
</Typography.Text>
|
||||
|
||||
@@ -36,7 +36,7 @@ import {
|
||||
Badge,
|
||||
Progress,
|
||||
Card,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
IllustrationNoResult,
|
||||
IllustrationNoResultDark,
|
||||
@@ -478,16 +478,16 @@ const MultiKeyManageModal = ({ visible, onCancel, channel, onRefresh }) => {
|
||||
<div
|
||||
className='rounded-xl p-4 mb-3'
|
||||
style={{
|
||||
background: 'var(--semi-color-bg-1)',
|
||||
border: '1px solid var(--semi-color-border)',
|
||||
background: 'var(--ui-color-bg-1)',
|
||||
border: '1px solid var(--ui-color-border)',
|
||||
}}
|
||||
>
|
||||
<Row gutter={16} align='middle'>
|
||||
<Col span={8}>
|
||||
<div
|
||||
style={{
|
||||
background: 'var(--semi-color-bg-0)',
|
||||
border: '1px solid var(--semi-color-border)',
|
||||
background: 'var(--ui-color-bg-0)',
|
||||
border: '1px solid var(--ui-color-border)',
|
||||
borderRadius: 12,
|
||||
padding: 12,
|
||||
}}
|
||||
@@ -503,7 +503,7 @@ const MultiKeyManageModal = ({ visible, onCancel, channel, onRefresh }) => {
|
||||
{enabledCount}
|
||||
</Text>
|
||||
<Text
|
||||
style={{ fontSize: 18, color: 'var(--semi-color-text-2)' }}
|
||||
style={{ fontSize: 18, color: 'var(--ui-color-text-2)' }}
|
||||
>
|
||||
/ {total}
|
||||
</Text>
|
||||
@@ -520,8 +520,8 @@ const MultiKeyManageModal = ({ visible, onCancel, channel, onRefresh }) => {
|
||||
<Col span={8}>
|
||||
<div
|
||||
style={{
|
||||
background: 'var(--semi-color-bg-0)',
|
||||
border: '1px solid var(--semi-color-border)',
|
||||
background: 'var(--ui-color-bg-0)',
|
||||
border: '1px solid var(--ui-color-border)',
|
||||
borderRadius: 12,
|
||||
padding: 12,
|
||||
}}
|
||||
@@ -537,7 +537,7 @@ const MultiKeyManageModal = ({ visible, onCancel, channel, onRefresh }) => {
|
||||
{manualDisabledCount}
|
||||
</Text>
|
||||
<Text
|
||||
style={{ fontSize: 18, color: 'var(--semi-color-text-2)' }}
|
||||
style={{ fontSize: 18, color: 'var(--ui-color-text-2)' }}
|
||||
>
|
||||
/ {total}
|
||||
</Text>
|
||||
@@ -554,8 +554,8 @@ const MultiKeyManageModal = ({ visible, onCancel, channel, onRefresh }) => {
|
||||
<Col span={8}>
|
||||
<div
|
||||
style={{
|
||||
background: 'var(--semi-color-bg-0)',
|
||||
border: '1px solid var(--semi-color-border)',
|
||||
background: 'var(--ui-color-bg-0)',
|
||||
border: '1px solid var(--ui-color-border)',
|
||||
borderRadius: 12,
|
||||
padding: 12,
|
||||
}}
|
||||
@@ -571,7 +571,7 @@ const MultiKeyManageModal = ({ visible, onCancel, channel, onRefresh }) => {
|
||||
{autoDisabledCount}
|
||||
</Text>
|
||||
<Text
|
||||
style={{ fontSize: 18, color: 'var(--semi-color-text-2)' }}
|
||||
style={{ fontSize: 18, color: 'var(--ui-color-text-2)' }}
|
||||
>
|
||||
/ {total}
|
||||
</Text>
|
||||
@@ -596,7 +596,7 @@ const MultiKeyManageModal = ({ visible, onCancel, channel, onRefresh }) => {
|
||||
title={() => (
|
||||
// xs 断点下两栏各占满一行:原来固定 14/10 分栏,在 358px 的弹窗体里
|
||||
// 右栏只有 ~124px,却要放约 330px 的四个按钮,「删除自动禁用密钥」
|
||||
// 会溢出到 .semi-modal-body{overflow-x:hidden} 之外被裁掉
|
||||
// 会溢出到 .ant-modal-body{overflow-x:hidden} 之外被裁掉
|
||||
<Row gutter={12} style={{ width: '100%' }}>
|
||||
<Col xs={24} sm={14}>
|
||||
<Row gutter={12} style={{ alignItems: 'center' }}>
|
||||
|
||||
Reference in New Issue
Block a user