Skip to content

Commit 11af81e

Browse files
AI-ASSCalcium-IonApple\Applesongquanpeng
committed
feat: add new theme air (songquanpeng#1167)
* chore: add theme air with new-api main branch v0.2.0.3-alpha.1(first step) * feat: 完成渠道界面 * chore: 优化渠道界面样式问题 * feat: 完成兑换码界面 * feat: 完成充值(钱包)界面 * chore: 初代air主题将使用default主题的运营设置界面、系统设置界面、其他设置界面 * feat: 完成日志界面 * feat: 完成用户管理界面 * feat: 完成个人设置界面 * feat: 完成令牌界面 * chore: 优化令牌界面逻辑 * feat: 修改版权信息 * chore: make necessary changes --------- Co-authored-by: Calon <[email protected]> Co-authored-by: Apple\Apple <[email protected]> Co-authored-by: JustSong <[email protected]>
1 parent 205aba6 commit 11af81e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+9648
-0
lines changed

Dockerfile

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ WORKDIR /web/berry
1212
RUN npm install
1313
RUN DISABLE_ESLINT_PLUGIN='true' REACT_APP_VERSION=$(cat VERSION) npm run build
1414

15+
WORKDIR /web/air
16+
RUN npm install
17+
RUN DISABLE_ESLINT_PLUGIN='true' REACT_APP_VERSION=$(cat VERSION) npm run build
18+
1519
FROM golang AS builder2
1620

1721
ENV GO111MODULE=on \

common/config/config.go

+1
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ var Theme = env.String("THEME", "default")
107107
var ValidThemes = map[string]bool{
108108
"default": true,
109109
"berry": true,
110+
"air": true,
110111
}
111112

112113
// All duration's unit is seconds

web/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@
3333
|![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)|
3434
|![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)|
3535

36+
### 主题:air
37+
[Calon](https://github.com/Calcium-Ion) 开发。
38+
|![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)|
39+
|:---:|:---:|
40+
41+
3642
#### 开发说明
3743

3844
请查看 [web/berry/README.md](https://github.com/songquanpeng/one-api/tree/main/web/berry/README.md)

web/THEMES

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
default
22
berry
3+
air

web/air/.gitignore

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*
24+
.idea
25+
package-lock.json
26+
yarn.lock

web/air/README.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# React Template
2+
3+
## Basic Usages
4+
5+
```shell
6+
# Runs the app in the development mode
7+
npm start
8+
9+
# Builds the app for production to the `build` folder
10+
npm run build
11+
```
12+
13+
If you want to change the default server, please set `REACT_APP_SERVER` environment variables before build,
14+
for example: `REACT_APP_SERVER=http://your.domain.com`.
15+
16+
Before you start editing, make sure your `Actions on Save` options have `Optimize imports` & `Run Prettier` enabled.
17+
18+
## Reference
19+
20+
1. https://github.com/OIerDb-ng/OIerDb
21+
2. https://github.com/cornflourblue/react-hooks-redux-registration-login-example

web/air/package.json

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"name": "react-template",
3+
"version": "0.1.0",
4+
"private": true,
5+
"dependencies": {
6+
"@douyinfe/semi-icons": "^2.46.1",
7+
"@douyinfe/semi-ui": "^2.46.1",
8+
"@visactor/react-vchart": "~1.8.8",
9+
"@visactor/vchart": "~1.8.8",
10+
"@visactor/vchart-semi-theme": "~1.8.8",
11+
"axios": "^0.27.2",
12+
"history": "^5.3.0",
13+
"marked": "^4.1.1",
14+
"react": "^18.2.0",
15+
"react-dom": "^18.2.0",
16+
"react-dropzone": "^14.2.3",
17+
"react-fireworks": "^1.0.4",
18+
"react-router-dom": "^6.3.0",
19+
"react-scripts": "5.0.1",
20+
"react-telegram-login": "^1.1.2",
21+
"react-toastify": "^9.0.8",
22+
"react-turnstile": "^1.0.5",
23+
"semantic-ui-css": "^2.5.0",
24+
"semantic-ui-react": "^2.1.3",
25+
"usehooks-ts": "^2.9.1"
26+
},
27+
"scripts": {
28+
"start": "react-scripts start",
29+
"build": "react-scripts build && mv -f build ../build/air",
30+
"test": "react-scripts test",
31+
"eject": "react-scripts eject"
32+
},
33+
"eslintConfig": {
34+
"extends": [
35+
"react-app",
36+
"react-app/jest"
37+
]
38+
},
39+
"browserslist": {
40+
"production": [
41+
">0.2%",
42+
"not dead",
43+
"not op_mini all"
44+
],
45+
"development": [
46+
"last 1 chrome version",
47+
"last 1 firefox version",
48+
"last 1 safari version"
49+
]
50+
},
51+
"devDependencies": {
52+
"prettier": "2.8.8",
53+
"typescript": "4.4.2"
54+
},
55+
"prettier": {
56+
"singleQuote": true,
57+
"jsxSingleQuote": true
58+
},
59+
"proxy": "http://localhost:3000"
60+
}

web/air/public/favicon.ico

4.19 KB
Binary file not shown.

web/air/public/index.html

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="icon" href="logo.png" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1" />
7+
<meta name="theme-color" content="#ffffff" />
8+
<meta
9+
name="description"
10+
content="OpenAI 接口聚合管理,支持多种渠道包括 Azure,可用于二次分发管理 key,仅单可执行文件,已打包好 Docker 镜像,一键部署,开箱即用"
11+
/>
12+
<title>New API</title>
13+
</head>
14+
<body>
15+
<noscript>You need to enable JavaScript to run this app.</noscript>
16+
<div id="root"></div>
17+
</body>
18+
</html>

web/air/public/logo.png

7.9 KB
Loading

web/air/public/robots.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# https://www.robotstxt.org/robotstxt.html
2+
User-agent: *
3+
Disallow:

0 commit comments

Comments
 (0)