diff --git a/Dockerfile b/Dockerfile index ec2f9d43..6743b139 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,6 +12,10 @@ WORKDIR /web/berry RUN npm install RUN DISABLE_ESLINT_PLUGIN='true' REACT_APP_VERSION=$(cat VERSION) npm run build +WORKDIR /web/air +RUN npm install +RUN DISABLE_ESLINT_PLUGIN='true' REACT_APP_VERSION=$(cat VERSION) npm run build + FROM golang AS builder2 ENV GO111MODULE=on \ diff --git a/common/config/config.go b/common/config/config.go index 83cfa933..a261523d 100644 --- a/common/config/config.go +++ b/common/config/config.go @@ -107,6 +107,7 @@ var Theme = env.String("THEME", "default") var ValidThemes = map[string]bool{ "default": true, "berry": true, + "air": true, } // All duration's unit is seconds diff --git a/web/README.md b/web/README.md index 86486085..59d91424 100644 --- a/web/README.md +++ b/web/README.md @@ -33,6 +33,12 @@ |![image](https://github.com/songquanpeng/one-api/assets/42402987/fb2b1c64-ef24-4027-9b80-0cd9d945a47f)|![image](https://github.com/songquanpeng/one-api/assets/42402987/b6b649ec-2888-4324-8b2d-d5e11554eed6)| |![image](https://github.com/songquanpeng/one-api/assets/42402987/6d3b22e0-436b-4e26-8911-bcc993c6a2bd)|![image](https://github.com/songquanpeng/one-api/assets/42402987/eef1e224-7245-44d7-804e-9d1c8fa3f29c)| +### 主题:air +由 [Calon](https://github.com/Calcium-Ion) 开发。 +|![image](https://github.com/songquanpeng/songquanpeng.github.io/assets/39998050/1ddb274b-a715-4e81-858b-857d520b6ff4)|![image](https://github.com/songquanpeng/songquanpeng.github.io/assets/39998050/163b0b8e-1f73-49cb-b632-3dcb986b56d5)| +|:---:|:---:| + + #### 开发说明 请查看 [web/berry/README.md](https://github.com/songquanpeng/one-api/tree/main/web/berry/README.md) diff --git a/web/THEMES b/web/THEMES index 6b0157cb..149e8698 100644 --- a/web/THEMES +++ b/web/THEMES @@ -1,2 +1,3 @@ default berry +air diff --git a/web/air/package.json b/web/air/package.json index dc6ca101..3bdf3952 100644 --- a/web/air/package.json +++ b/web/air/package.json @@ -26,7 +26,7 @@ }, "scripts": { "start": "react-scripts start", - "build": "react-scripts build", + "build": "react-scripts build && mv -f build ../build/air", "test": "react-scripts test", "eject": "react-scripts eject" }, diff --git a/web/air/public/favicon.ico b/web/air/public/favicon.ico index b04b0019..c2c8de0c 100644 Binary files a/web/air/public/favicon.ico and b/web/air/public/favicon.ico differ diff --git a/web/air/public/logo.png b/web/air/public/logo.png index 9009accf..0f237a22 100644 Binary files a/web/air/public/logo.png and b/web/air/public/logo.png differ diff --git a/web/air/src/components/Footer.js b/web/air/src/components/Footer.js index 334ee379..6fd0fa54 100644 --- a/web/air/src/components/Footer.js +++ b/web/air/src/components/Footer.js @@ -47,7 +47,10 @@ const Footer = () => { JustSong {' '} - 构建,源代码遵循{' '} + 构建,主题 air 来自{' '} + + Calon + {' '},源代码遵循{' '} MIT 协议 diff --git a/web/air/src/components/SiderBar.js b/web/air/src/components/SiderBar.js index cfd448ff..b3da272f 100644 --- a/web/air/src/components/SiderBar.js +++ b/web/air/src/components/SiderBar.js @@ -62,20 +62,20 @@ const SiderBar = () => { icon: }, { - text: '兑换码', + text: '兑换', itemKey: 'redemption', to: '/redemption', icon: , className: isAdmin() ? 'semi-navigation-item-normal' : 'tableHiddle' }, { - text: '钱包', + text: '充值', itemKey: 'topup', to: '/topup', icon: }, { - text: '用户管理', + text: '用户', itemKey: 'user', to: '/user', icon: , diff --git a/web/air/src/constants/channel.constants.js b/web/air/src/constants/channel.constants.js index bb18d0d2..4bf035f9 100644 --- a/web/air/src/constants/channel.constants.js +++ b/web/air/src/constants/channel.constants.js @@ -1,21 +1,37 @@ export const CHANNEL_OPTIONS = [ - {key: 1, text: 'OpenAI', value: 1, color: 'green', label: 'OpenAI'}, - {key: 2, text: 'Midjourney Proxy', value: 2, color: 'light-blue', label: 'Midjourney Proxy'}, - {key: 5, text: 'Midjourney Proxy Plus', value: 5, color: 'blue', label: 'Midjourney Proxy Plus'}, - {key: 4, text: 'Ollama', value: 4, color: 'grey', label: 'Ollama'}, - {key: 14, text: 'Anthropic Claude', value: 14, color: 'indigo', label: 'Anthropic Claude'}, - {key: 3, text: 'Azure OpenAI', value: 3, color: 'teal', label: 'Azure OpenAI'}, - {key: 11, text: 'Google PaLM2', value: 11, color: 'orange', label: 'Google PaLM2'}, - {key: 24, text: 'Google Gemini', value: 24, color: 'orange', label: 'Google Gemini'}, - {key: 15, text: '百度文心千帆', value: 15, color: 'blue', label: '百度文心千帆'}, - {key: 17, text: '阿里通义千问', value: 17, color: 'orange', label: '阿里通义千问'}, - {key: 18, text: '讯飞星火认知', value: 18, color: 'blue', label: '讯飞星火认知'}, - {key: 16, text: '智谱 ChatGLM', value: 16, color: 'violet', label: '智谱 ChatGLM'}, - {key: 16, text: '智谱 GLM-4V', value: 26, color: 'purple', label: '智谱 GLM-4V'}, - {key: 16, text: 'Moonshot', value: 25, color: 'green', label: 'Moonshot'}, - {key: 19, text: '360 智脑', value: 19, color: 'blue', label: '360 智脑'}, - {key: 23, text: '腾讯混元', value: 23, color: 'teal', label: '腾讯混元'}, - {key: 8, text: '自定义渠道', value: 8, color: 'pink', label: '自定义渠道'}, - {key: 22, text: '知识库:FastGPT', value: 22, color: 'blue', label: '知识库:FastGPT'}, - {key: 21, text: '知识库:AI Proxy', value: 21, color: 'purple', label: '知识库:AI Proxy'}, + { key: 1, text: 'OpenAI', value: 1, color: 'green' }, + { key: 14, text: 'Anthropic Claude', value: 14, color: 'black' }, + { key: 3, text: 'Azure OpenAI', value: 3, color: 'olive' }, + { key: 11, text: 'Google PaLM2', value: 11, color: 'orange' }, + { key: 24, text: 'Google Gemini', value: 24, color: 'orange' }, + { key: 28, text: 'Mistral AI', value: 28, color: 'orange' }, + { key: 15, text: '百度文心千帆', value: 15, color: 'blue' }, + { key: 17, text: '阿里通义千问', value: 17, color: 'orange' }, + { key: 18, text: '讯飞星火认知', value: 18, color: 'blue' }, + { key: 16, text: '智谱 ChatGLM', value: 16, color: 'violet' }, + { key: 19, text: '360 智脑', value: 19, color: 'blue' }, + { key: 25, text: 'Moonshot AI', value: 25, color: 'black' }, + { key: 23, text: '腾讯混元', value: 23, color: 'teal' }, + { key: 26, text: '百川大模型', value: 26, color: 'orange' }, + { key: 27, text: 'MiniMax', value: 27, color: 'red' }, + { key: 29, text: 'Groq', value: 29, color: 'orange' }, + { key: 30, text: 'Ollama', value: 30, color: 'black' }, + { key: 31, text: '零一万物', value: 31, color: 'green' }, + { key: 8, text: '自定义渠道', value: 8, color: 'pink' }, + { key: 22, text: '知识库:FastGPT', value: 22, color: 'blue' }, + { key: 21, text: '知识库:AI Proxy', value: 21, color: 'purple' }, + { key: 20, text: '代理:OpenRouter', value: 20, color: 'black' }, + { key: 2, text: '代理:API2D', value: 2, color: 'blue' }, + { key: 5, text: '代理:OpenAI-SB', value: 5, color: 'brown' }, + { key: 7, text: '代理:OhMyGPT', value: 7, color: 'purple' }, + { key: 10, text: '代理:AI Proxy', value: 10, color: 'purple' }, + { key: 4, text: '代理:CloseAI', value: 4, color: 'teal' }, + { key: 6, text: '代理:OpenAI Max', value: 6, color: 'violet' }, + { key: 9, text: '代理:AI.LS', value: 9, color: 'yellow' }, + { key: 12, text: '代理:API2GPT', value: 12, color: 'blue' }, + { key: 13, text: '代理:AIGC2D', value: 13, color: 'purple' } ]; + +for (let i = 0; i < CHANNEL_OPTIONS.length; i++) { + CHANNEL_OPTIONS[i].label = CHANNEL_OPTIONS[i].text; +} \ No newline at end of file diff --git a/web/air/src/pages/Home/index.js b/web/air/src/pages/Home/index.js index f3e29800..4803ba4e 100644 --- a/web/air/src/pages/Home/index.js +++ b/web/air/src/pages/Home/index.js @@ -103,11 +103,11 @@ const Home = () => { Turnstile 用户校验: {statusState?.status?.turnstile_check === true ? '已启用' : '未启用'}

-

- Telegram 身份验证: - {statusState?.status?.telegram_oauth === true - ? '已启用' : '未启用'} -

+ {/*

*/} + {/* Telegram 身份验证:*/} + {/* {statusState?.status?.telegram_oauth === true*/} + {/* ? '已启用' : '未启用'}*/} + {/*

*/} diff --git a/web/air/src/pages/TopUp/index.js b/web/air/src/pages/TopUp/index.js index c572f0fe..49b891cc 100644 --- a/web/air/src/pages/TopUp/index.js +++ b/web/air/src/pages/TopUp/index.js @@ -194,7 +194,7 @@ const TopUp = () => {
-

我的钱包

+

充值额度