改点颜色

This commit is contained in:
wood 2023-11-25 06:38:34 +08:00
parent ae006941c0
commit 42ed66132d
4 changed files with 34 additions and 16 deletions

View File

@ -34,7 +34,7 @@ function renderBalance(type, balance) {
case 4: // CloseAI case 4: // CloseAI
return <span style={{ color: 'var(--czl-primary-color-hover)' }}>¥{balance.toFixed(2)}</span>; return <span style={{ color: 'var(--czl-primary-color-hover)' }}>¥{balance.toFixed(2)}</span>;
case 8: // 自定义 case 8: // 自定义
return <span style={{ color: 'var(--czl-primary-color-pressed)' }}>${balance.toFixed(2)}</span>; return <span style={{ color: 'var(--czl-success-color)' }}>${balance.toFixed(2)}</span>;
case 5: // OpenAI-SB case 5: // OpenAI-SB
return <span style={{ color: 'var(--czl-primary-color-suppl)' }}>¥{(balance / 10000).toFixed(2)}</span>; return <span style={{ color: 'var(--czl-primary-color-suppl)' }}>¥{(balance / 10000).toFixed(2)}</span>;
case 10: // AI Proxy case 10: // AI Proxy
@ -457,7 +457,15 @@ const ChannelsTable = () => {
sortChannel('used_quota'); sortChannel('used_quota');
}} }}
> >
本月已用额度 本月
</Table.HeaderCell>
<Table.HeaderCell
style={{ cursor: 'pointer' }}
onClick={() => {
sortChannel('used_quota');
}}
>
总共
</Table.HeaderCell> </Table.HeaderCell>
<Table.HeaderCell <Table.HeaderCell
style={{ cursor: 'pointer' }} style={{ cursor: 'pointer' }}
@ -507,23 +515,22 @@ const ChannelsTable = () => {
<Table.Cell> <Table.Cell>
<Popup <Popup
content={channel.base_url} content={channel.base_url}
trigger={<span>{truncateString(channel.base_url.replace(/^https?:\/\//, ''), 20)}</span>} trigger={<span>{truncateString(channel.base_url.replace(/^https?:\/\//, ''), 10)}</span>}
basic basic
/> />
</Table.Cell> </Table.Cell>
<Table.Cell> <Table.Cell>
<Popup <Popup
content={channel.models} content={channel.models}
trigger={<span>{truncateString(channel.models, 20)}</span>} trigger={<span>{truncateString(channel.models, 10)}</span>}
basic basic
/> />
</Table.Cell> </Table.Cell>
<Table.Cell> <Table.Cell>
<Popup <Label basic style={{ color: 'var(--czl-blue-500)',border:'1px solid var(--czl-blue-500)' }}>${monthlyQuotas[channel.id]}</Label>
trigger={<span>${monthlyQuotas[channel.id]}</span>} </Table.Cell>
content={`总: ${formatUsedQuota(channel.used_quota)}`} <Table.Cell>
basic <Label basic style={{ color: 'var(--czl-blue-800)',border:'1px solid var(--czl-blue-800)' }}>{formatUsedQuota(channel.used_quota)}</Label>
/>
</Table.Cell> </Table.Cell>
<Table.Cell> <Table.Cell>
<Popup <Popup
@ -614,7 +621,7 @@ const ChannelsTable = () => {
<Table.Footer> <Table.Footer>
<Table.Row> <Table.Row>
<Table.HeaderCell colSpan='12'> <Table.HeaderCell colSpan='13'>
<Button size='small' as={Link} to='/channel/add' loading={loading}> <Button size='small' as={Link} to='/channel/add' loading={loading}>
添加新的渠道 添加新的渠道
</Button> </Button>

View File

@ -21,7 +21,7 @@ function renderTimestamp(timestamp) {
function renderStatus(status) { function renderStatus(status) {
switch (status) { switch (status) {
case 1: case 1:
return <Label basic style={{ color: 'var(--czl-success-color)' }}>已启用</Label>; return <Label basic style={{ color: 'var(--czl-blue-500)' }}>已启用</Label>;
case 2: case 2:
return <Label basic style={{ color: 'var(--czl-error-color)' }}> 已禁用 </Label>; return <Label basic style={{ color: 'var(--czl-error-color)' }}> 已禁用 </Label>;
case 3: case 3:

View File

@ -1,4 +1,15 @@
:root { :root {
--czl-blue-50: #f1f9fe;
--czl-blue-100: #e2f2fc;
--czl-blue-200: #bfe3f8;
--czl-blue-300: #87cef2;
--czl-blue-400: #48b5e8;
--czl-blue-500: #2ea7e0;
--czl-blue-600: #127db7;
--czl-blue-700: #106494;
--czl-blue-800: #11557b;
--czl-blue-900: #144766;
--czl-blue-950: #0d2d44;
--toastify-color-light: var(--czl-main) !important; --toastify-color-light: var(--czl-main) !important;
--toastify-color-dark: var(--czl-main-dark) !important; --toastify-color-dark: var(--czl-main-dark) !important;
--toastify-color-info: var(--czl-info-color) !important; --toastify-color-info: var(--czl-info-color) !important;
@ -229,7 +240,7 @@ code {
} }
.active-menu-item { .active-menu-item {
background-color: var(--czl-grayD) !important; background-color: var(--czl-blue-950) !important;
color: white !important; color: white !important;
border-radius: 16px !important; border-radius: 16px !important;
padding: 10px 16px !important; padding: 10px 16px !important;

View File

@ -90,7 +90,7 @@ const TopUp = () => {
icon='shop' icon='shop'
labelPosition='left' labelPosition='left'
content='获取兑换码' content='获取兑换码'
style={{ backgroundColor: 'var(--czl-primary-color)' }} style={{ backgroundColor: 'var(--czl-blue-700)' }}
onClick={openTopUpLink} onClick={openTopUpLink}
/> />
<Button <Button
@ -98,7 +98,7 @@ const TopUp = () => {
icon='exchange' icon='exchange'
labelPosition='left' labelPosition='left'
content={isSubmitting ? '兑换中...' : '兑换'} content={isSubmitting ? '兑换中...' : '兑换'}
style={{ backgroundColor: 'var(--czl-success-color)' }} style={{ backgroundColor: '#FFFFFF00',color: 'var(--czl-blue-700)',border: '1px solid var(--czl-blue-200)' }}
onClick={topUp} onClick={topUp}
disabled={isSubmitting} disabled={isSubmitting}
/> />
@ -108,8 +108,8 @@ const TopUp = () => {
<Grid.Column> <Grid.Column>
<Statistic.Group widths='one'> <Statistic.Group widths='one'>
<Statistic> <Statistic>
<Statistic.Value style={{ color: 'var(--czl-error-color)' }}>{renderQuota(userQuota)}</Statistic.Value> <Statistic.Value style={{ color: 'var(--czl-blue-800)' }}>{renderQuota(userQuota)}</Statistic.Value>
<Statistic.Label style={{ color: 'var(--czl-error-color)' }}>剩余额度</Statistic.Label> <Statistic.Label style={{ color: 'var(--czl-blue-800)' }}>剩余额度</Statistic.Label>
</Statistic> </Statistic>
</Statistic.Group> </Statistic.Group>
</Grid.Column> </Grid.Column>