mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-13 11:53:42 +08:00
feat: berry theme update & bug fix (#1471)
* feat: load channel models from server * chore: support AWS Claude/Cloudflare/Coze * fix: Popup message when copying fails * chore: Optimize tips
This commit is contained in:
@@ -11,12 +11,18 @@ export const CHANNEL_OPTIONS = {
|
||||
value: 14,
|
||||
color: 'primary'
|
||||
},
|
||||
// 33: {
|
||||
// key: 33,
|
||||
// text: 'AWS Claude',
|
||||
// value: 33,
|
||||
// color: 'primary'
|
||||
// },
|
||||
33: {
|
||||
key: 33,
|
||||
text: 'AWS Claude',
|
||||
value: 33,
|
||||
color: 'primary'
|
||||
},
|
||||
37: {
|
||||
key: 37,
|
||||
text: 'Cloudflare',
|
||||
value: 37,
|
||||
color: 'success'
|
||||
},
|
||||
3: {
|
||||
key: 3,
|
||||
text: 'Azure OpenAI',
|
||||
@@ -119,12 +125,12 @@ export const CHANNEL_OPTIONS = {
|
||||
value: 32,
|
||||
color: 'primary'
|
||||
},
|
||||
// 34: {
|
||||
// key: 34,
|
||||
// text: 'Coze',
|
||||
// value: 34,
|
||||
// color: 'primary'
|
||||
// },
|
||||
34: {
|
||||
key: 34,
|
||||
text: 'Coze',
|
||||
value: 34,
|
||||
color: 'primary'
|
||||
},
|
||||
35: {
|
||||
key: 35,
|
||||
text: 'Cohere',
|
||||
|
||||
@@ -1,24 +1,56 @@
|
||||
import { closeSnackbar } from 'notistack';
|
||||
import { IconX } from '@tabler/icons-react';
|
||||
import { IconButton } from '@mui/material';
|
||||
const action = (snackbarId) => (
|
||||
<>
|
||||
<IconButton
|
||||
onClick={() => {
|
||||
closeSnackbar(snackbarId);
|
||||
}}
|
||||
>
|
||||
<IconX stroke={1.5} size="1.25rem" />
|
||||
</IconButton>
|
||||
</>
|
||||
);
|
||||
|
||||
export const snackbarConstants = {
|
||||
Common: {
|
||||
ERROR: {
|
||||
variant: 'error',
|
||||
autoHideDuration: 5000
|
||||
autoHideDuration: 5000,
|
||||
preventDuplicate: true,
|
||||
action
|
||||
},
|
||||
WARNING: {
|
||||
variant: 'warning',
|
||||
autoHideDuration: 10000
|
||||
autoHideDuration: 10000,
|
||||
preventDuplicate: true,
|
||||
action
|
||||
},
|
||||
SUCCESS: {
|
||||
variant: 'success',
|
||||
autoHideDuration: 1500
|
||||
autoHideDuration: 1500,
|
||||
preventDuplicate: true,
|
||||
action
|
||||
},
|
||||
INFO: {
|
||||
variant: 'info',
|
||||
autoHideDuration: 3000
|
||||
autoHideDuration: 3000,
|
||||
preventDuplicate: true,
|
||||
action
|
||||
},
|
||||
NOTICE: {
|
||||
variant: 'info',
|
||||
autoHideDuration: 7000
|
||||
autoHideDuration: 20000,
|
||||
preventDuplicate: true,
|
||||
action
|
||||
},
|
||||
COPY: {
|
||||
variant: 'copy',
|
||||
persist: true,
|
||||
preventDuplicate: true,
|
||||
allowDownload: true,
|
||||
action
|
||||
}
|
||||
},
|
||||
Mobile: {
|
||||
|
||||
Reference in New Issue
Block a user