From 1f295481f511b3aac082013679fd0036731acad4 Mon Sep 17 00:00:00 2001 From: JustSong Date: Mon, 1 Jan 2024 18:55:03 +0800 Subject: [PATCH] feat: able to add more UI theme (#860) --- .github/workflows/linux-release.yml | 6 ++-- .github/workflows/macos-release.yml | 6 ++-- .github/workflows/windows-release.yml | 6 ++-- Dockerfile | 13 ++++++-- common/constants.go | 2 ++ main.go | 9 ++---- router/main.go | 4 +-- router/web-router.go | 10 +++++-- web/README.md | 28 ++++++------------ web/THEMES | 1 + web/build/.gitkeep | 0 web/{ => default}/.gitignore | 0 web/default/README.md | 21 +++++++++++++ web/{ => default}/package.json | 2 +- web/{ => default}/public/favicon.ico | Bin web/{ => default}/public/index.html | 0 web/{ => default}/public/logo.png | Bin web/{ => default}/public/robots.txt | 0 web/{ => default}/src/App.js | 0 .../src/components/ChannelsTable.js | 0 web/{ => default}/src/components/Footer.js | 0 .../src/components/GitHubOAuth.js | 0 web/{ => default}/src/components/Header.js | 0 web/{ => default}/src/components/Loading.js | 0 web/{ => default}/src/components/LoginForm.js | 0 web/{ => default}/src/components/LogsTable.js | 0 .../src/components/OperationSetting.js | 0 .../src/components/OtherSetting.js | 0 .../src/components/PasswordResetConfirm.js | 0 .../src/components/PasswordResetForm.js | 0 .../src/components/PersonalSetting.js | 0 .../src/components/PrivateRoute.js | 0 .../src/components/RedemptionsTable.js | 0 .../src/components/RegisterForm.js | 0 .../src/components/SystemSetting.js | 0 .../src/components/TokensTable.js | 0 .../src/components/UsersTable.js | 0 web/{ => default}/src/components/utils.js | 0 .../src/constants/channel.constants.js | 0 .../src/constants/common.constant.js | 0 web/{ => default}/src/constants/index.js | 0 .../src/constants/toast.constants.js | 0 .../src/constants/user.constants.js | 0 web/{ => default}/src/context/Status/index.js | 0 .../src/context/Status/reducer.js | 0 web/{ => default}/src/context/User/index.js | 0 web/{ => default}/src/context/User/reducer.js | 0 web/{ => default}/src/helpers/api.js | 0 web/{ => default}/src/helpers/auth-header.js | 0 web/{ => default}/src/helpers/history.js | 0 web/{ => default}/src/helpers/index.js | 0 web/{ => default}/src/helpers/render.js | 0 web/{ => default}/src/helpers/utils.js | 0 web/{ => default}/src/index.css | 0 web/{ => default}/src/index.js | 0 web/{ => default}/src/pages/About/index.js | 0 .../src/pages/Channel/EditChannel.js | 0 web/{ => default}/src/pages/Channel/index.js | 0 web/{ => default}/src/pages/Chat/index.js | 0 web/{ => default}/src/pages/Home/index.js | 0 web/{ => default}/src/pages/Log/index.js | 0 web/{ => default}/src/pages/NotFound/index.js | 0 .../src/pages/Redemption/EditRedemption.js | 0 .../src/pages/Redemption/index.js | 0 web/{ => default}/src/pages/Setting/index.js | 0 .../src/pages/Token/EditToken.js | 0 web/{ => default}/src/pages/Token/index.js | 0 web/{ => default}/src/pages/TopUp/index.js | 0 web/{ => default}/src/pages/User/AddUser.js | 0 web/{ => default}/src/pages/User/EditUser.js | 0 web/{ => default}/src/pages/User/index.js | 0 web/{ => default}/vercel.json | 0 72 files changed, 66 insertions(+), 42 deletions(-) create mode 100644 web/THEMES create mode 100644 web/build/.gitkeep rename web/{ => default}/.gitignore (100%) create mode 100644 web/default/README.md rename web/{ => default}/package.json (94%) rename web/{ => default}/public/favicon.ico (100%) rename web/{ => default}/public/index.html (100%) rename web/{ => default}/public/logo.png (100%) rename web/{ => default}/public/robots.txt (100%) rename web/{ => default}/src/App.js (100%) rename web/{ => default}/src/components/ChannelsTable.js (100%) rename web/{ => default}/src/components/Footer.js (100%) rename web/{ => default}/src/components/GitHubOAuth.js (100%) rename web/{ => default}/src/components/Header.js (100%) rename web/{ => default}/src/components/Loading.js (100%) rename web/{ => default}/src/components/LoginForm.js (100%) rename web/{ => default}/src/components/LogsTable.js (100%) rename web/{ => default}/src/components/OperationSetting.js (100%) rename web/{ => default}/src/components/OtherSetting.js (100%) rename web/{ => default}/src/components/PasswordResetConfirm.js (100%) rename web/{ => default}/src/components/PasswordResetForm.js (100%) rename web/{ => default}/src/components/PersonalSetting.js (100%) rename web/{ => default}/src/components/PrivateRoute.js (100%) rename web/{ => default}/src/components/RedemptionsTable.js (100%) rename web/{ => default}/src/components/RegisterForm.js (100%) rename web/{ => default}/src/components/SystemSetting.js (100%) rename web/{ => default}/src/components/TokensTable.js (100%) rename web/{ => default}/src/components/UsersTable.js (100%) rename web/{ => default}/src/components/utils.js (100%) rename web/{ => default}/src/constants/channel.constants.js (100%) rename web/{ => default}/src/constants/common.constant.js (100%) rename web/{ => default}/src/constants/index.js (100%) rename web/{ => default}/src/constants/toast.constants.js (100%) rename web/{ => default}/src/constants/user.constants.js (100%) rename web/{ => default}/src/context/Status/index.js (100%) rename web/{ => default}/src/context/Status/reducer.js (100%) rename web/{ => default}/src/context/User/index.js (100%) rename web/{ => default}/src/context/User/reducer.js (100%) rename web/{ => default}/src/helpers/api.js (100%) rename web/{ => default}/src/helpers/auth-header.js (100%) rename web/{ => default}/src/helpers/history.js (100%) rename web/{ => default}/src/helpers/index.js (100%) rename web/{ => default}/src/helpers/render.js (100%) rename web/{ => default}/src/helpers/utils.js (100%) rename web/{ => default}/src/index.css (100%) rename web/{ => default}/src/index.js (100%) rename web/{ => default}/src/pages/About/index.js (100%) rename web/{ => default}/src/pages/Channel/EditChannel.js (100%) rename web/{ => default}/src/pages/Channel/index.js (100%) rename web/{ => default}/src/pages/Chat/index.js (100%) rename web/{ => default}/src/pages/Home/index.js (100%) rename web/{ => default}/src/pages/Log/index.js (100%) rename web/{ => default}/src/pages/NotFound/index.js (100%) rename web/{ => default}/src/pages/Redemption/EditRedemption.js (100%) rename web/{ => default}/src/pages/Redemption/index.js (100%) rename web/{ => default}/src/pages/Setting/index.js (100%) rename web/{ => default}/src/pages/Token/EditToken.js (100%) rename web/{ => default}/src/pages/Token/index.js (100%) rename web/{ => default}/src/pages/TopUp/index.js (100%) rename web/{ => default}/src/pages/User/AddUser.js (100%) rename web/{ => default}/src/pages/User/EditUser.js (100%) rename web/{ => default}/src/pages/User/index.js (100%) rename web/{ => default}/vercel.json (100%) diff --git a/.github/workflows/linux-release.yml b/.github/workflows/linux-release.yml index 364b83aec5..d937579569 100644 --- a/.github/workflows/linux-release.yml +++ b/.github/workflows/linux-release.yml @@ -18,14 +18,14 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 16 - - name: Build Frontend + - name: Build Frontend (theme default) env: CI: "" run: | - cd web + cd web/default npm install REACT_APP_VERSION=$(git describe --tags) npm run build - cd .. + cd ../.. - name: Set up Go uses: actions/setup-go@v3 with: diff --git a/.github/workflows/macos-release.yml b/.github/workflows/macos-release.yml index bdd0d20879..69bb93f53f 100644 --- a/.github/workflows/macos-release.yml +++ b/.github/workflows/macos-release.yml @@ -18,14 +18,14 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 16 - - name: Build Frontend + - name: Build Frontend (theme default) env: CI: "" run: | - cd web + cd web/default npm install REACT_APP_VERSION=$(git describe --tags) npm run build - cd .. + cd ../.. - name: Set up Go uses: actions/setup-go@v3 with: diff --git a/.github/workflows/windows-release.yml b/.github/workflows/windows-release.yml index 33193a8972..c08e95d28b 100644 --- a/.github/workflows/windows-release.yml +++ b/.github/workflows/windows-release.yml @@ -21,14 +21,14 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 16 - - name: Build Frontend + - name: Build Frontend (theme default) env: CI: "" run: | - cd web + cd web/default npm install REACT_APP_VERSION=$(git describe --tags) npm run build - cd .. + cd ../.. - name: Set up Go uses: actions/setup-go@v3 with: diff --git a/Dockerfile b/Dockerfile index ffb8c21be1..566481686c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,18 @@ FROM node:16 as builder WORKDIR /build -COPY web/package.json . -RUN npm install COPY ./web . COPY ./VERSION . -RUN DISABLE_ESLINT_PLUGIN='true' REACT_APP_VERSION=$(cat VERSION) npm run build +RUN themes=$(cat THEMES) \ + && IFS=$'\n' \ + && for theme in $themes; do \ + theme_path="web/$theme" \ + && echo "Building theme: $theme" \ + && cd $theme_path \ + && npm install \ + && DISABLE_ESLINT_PLUGIN='true' REACT_APP_VERSION=$(cat VERSION) npm run build \ + && cd /app \ + done FROM golang AS builder2 diff --git a/common/constants.go b/common/constants.go index e4cbf8bfb5..7058904166 100644 --- a/common/constants.go +++ b/common/constants.go @@ -100,6 +100,8 @@ var RelayTimeout = GetOrDefault("RELAY_TIMEOUT", 0) // unit is second var GeminiSafetySetting = GetOrDefaultString("GEMINI_SAFETY_SETTING", "BLOCK_NONE") +var Theme = GetOrDefaultString("THEME", "default") + const ( RequestIdKey = "X-Oneapi-Request-Id" ) diff --git a/main.go b/main.go index 889385164f..3ab1872c39 100644 --- a/main.go +++ b/main.go @@ -15,15 +15,12 @@ import ( "strconv" ) -//go:embed web/build +//go:embed web/build/* var buildFS embed.FS -//go:embed web/build/index.html -var indexPage []byte - func main() { common.SetupLogger() - common.SysLog("One API " + common.Version + " started") + common.SysLog(fmt.Sprintf("One API %s started with theme %s", common.Version, common.Theme)) if os.Getenv("GIN_MODE") != "debug" { gin.SetMode(gin.ReleaseMode) } @@ -95,7 +92,7 @@ func main() { store := cookie.NewStore([]byte(common.SessionSecret)) server.Use(sessions.Sessions("session", store)) - router.SetRouter(server, buildFS, indexPage) + router.SetRouter(server, buildFS) var port = os.Getenv("PORT") if port == "" { port = strconv.Itoa(*common.Port) diff --git a/router/main.go b/router/main.go index b8ac40555f..85127a1a25 100644 --- a/router/main.go +++ b/router/main.go @@ -10,7 +10,7 @@ import ( "strings" ) -func SetRouter(router *gin.Engine, buildFS embed.FS, indexPage []byte) { +func SetRouter(router *gin.Engine, buildFS embed.FS) { SetApiRouter(router) SetDashboardRouter(router) SetRelayRouter(router) @@ -20,7 +20,7 @@ func SetRouter(router *gin.Engine, buildFS embed.FS, indexPage []byte) { common.SysLog("FRONTEND_BASE_URL is ignored on master node") } if frontendBaseUrl == "" { - SetWebRouter(router, buildFS, indexPage) + SetWebRouter(router, buildFS) } else { frontendBaseUrl = strings.TrimSuffix(frontendBaseUrl, "/") router.NoRoute(func(c *gin.Context) { diff --git a/router/web-router.go b/router/web-router.go index 8f9c18a2ed..2f86db384c 100644 --- a/router/web-router.go +++ b/router/web-router.go @@ -2,6 +2,7 @@ package router import ( "embed" + "fmt" "github.com/gin-contrib/gzip" "github.com/gin-contrib/static" "github.com/gin-gonic/gin" @@ -12,17 +13,22 @@ import ( "strings" ) -func SetWebRouter(router *gin.Engine, buildFS embed.FS, indexPage []byte) { +func SetWebRouter(router *gin.Engine, buildFS embed.FS) { router.Use(gzip.Gzip(gzip.DefaultCompression)) router.Use(middleware.GlobalWebRateLimit()) router.Use(middleware.Cache()) - router.Use(static.Serve("/", common.EmbedFolder(buildFS, "web/build"))) + router.Use(static.Serve("/", common.EmbedFolder(buildFS, fmt.Sprintf("web/build/%s", common.Theme)))) router.NoRoute(func(c *gin.Context) { if strings.HasPrefix(c.Request.RequestURI, "/v1") || strings.HasPrefix(c.Request.RequestURI, "/api") { controller.RelayNotFound(c) return } c.Header("Cache-Control", "no-cache") + indexPage, err := buildFS.ReadFile(fmt.Sprintf("web/build/%s/index.html", common.Theme)) + if err != nil { + controller.RelayNotFound(c) + return + } c.Data(http.StatusOK, "text/html; charset=utf-8", indexPage) }) } diff --git a/web/README.md b/web/README.md index 1b1031a3a2..1454940f56 100644 --- a/web/README.md +++ b/web/README.md @@ -1,21 +1,11 @@ -# React Template +# One API 的前端界面 +> 每个文件夹代表一个主题,欢迎提交你的主题 -## Basic Usages +## 提交新的主题 +1. 在 `web` 文件夹下新建一个文件夹,文件夹名为主题名。 +2. 把你的主题文件放到这个文件夹下。 +3. 修改 `package.json` 文件,把 `build` 命令改为:`"build": "react-scripts build && mv build ../build/default"`,其中 `default` 为你的主题名。 -```shell -# Runs the app in the development mode -npm start - -# Builds the app for production to the `build` folder -npm run build -``` - -If you want to change the default server, please set `REACT_APP_SERVER` environment variables before build, -for example: `REACT_APP_SERVER=http://your.domain.com`. - -Before you start editing, make sure your `Actions on Save` options have `Optimize imports` & `Run Prettier` enabled. - -## Reference - -1. https://github.com/OIerDb-ng/OIerDb -2. https://github.com/cornflourblue/react-hooks-redux-registration-login-example \ No newline at end of file +## 主题列表 +### default +默认主题 \ No newline at end of file diff --git a/web/THEMES b/web/THEMES new file mode 100644 index 0000000000..331d858ce9 --- /dev/null +++ b/web/THEMES @@ -0,0 +1 @@ +default \ No newline at end of file diff --git a/web/build/.gitkeep b/web/build/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/web/.gitignore b/web/default/.gitignore similarity index 100% rename from web/.gitignore rename to web/default/.gitignore diff --git a/web/default/README.md b/web/default/README.md new file mode 100644 index 0000000000..1b1031a3a2 --- /dev/null +++ b/web/default/README.md @@ -0,0 +1,21 @@ +# React Template + +## Basic Usages + +```shell +# Runs the app in the development mode +npm start + +# Builds the app for production to the `build` folder +npm run build +``` + +If you want to change the default server, please set `REACT_APP_SERVER` environment variables before build, +for example: `REACT_APP_SERVER=http://your.domain.com`. + +Before you start editing, make sure your `Actions on Save` options have `Optimize imports` & `Run Prettier` enabled. + +## Reference + +1. https://github.com/OIerDb-ng/OIerDb +2. https://github.com/cornflourblue/react-hooks-redux-registration-login-example \ No newline at end of file diff --git a/web/package.json b/web/default/package.json similarity index 94% rename from web/package.json rename to web/default/package.json index a2bf305476..872ad36a83 100644 --- a/web/package.json +++ b/web/default/package.json @@ -18,7 +18,7 @@ }, "scripts": { "start": "react-scripts start", - "build": "react-scripts build", + "build": "react-scripts build && mv build ../build/default", "test": "react-scripts test", "eject": "react-scripts eject" }, diff --git a/web/public/favicon.ico b/web/default/public/favicon.ico similarity index 100% rename from web/public/favicon.ico rename to web/default/public/favicon.ico diff --git a/web/public/index.html b/web/default/public/index.html similarity index 100% rename from web/public/index.html rename to web/default/public/index.html diff --git a/web/public/logo.png b/web/default/public/logo.png similarity index 100% rename from web/public/logo.png rename to web/default/public/logo.png diff --git a/web/public/robots.txt b/web/default/public/robots.txt similarity index 100% rename from web/public/robots.txt rename to web/default/public/robots.txt diff --git a/web/src/App.js b/web/default/src/App.js similarity index 100% rename from web/src/App.js rename to web/default/src/App.js diff --git a/web/src/components/ChannelsTable.js b/web/default/src/components/ChannelsTable.js similarity index 100% rename from web/src/components/ChannelsTable.js rename to web/default/src/components/ChannelsTable.js diff --git a/web/src/components/Footer.js b/web/default/src/components/Footer.js similarity index 100% rename from web/src/components/Footer.js rename to web/default/src/components/Footer.js diff --git a/web/src/components/GitHubOAuth.js b/web/default/src/components/GitHubOAuth.js similarity index 100% rename from web/src/components/GitHubOAuth.js rename to web/default/src/components/GitHubOAuth.js diff --git a/web/src/components/Header.js b/web/default/src/components/Header.js similarity index 100% rename from web/src/components/Header.js rename to web/default/src/components/Header.js diff --git a/web/src/components/Loading.js b/web/default/src/components/Loading.js similarity index 100% rename from web/src/components/Loading.js rename to web/default/src/components/Loading.js diff --git a/web/src/components/LoginForm.js b/web/default/src/components/LoginForm.js similarity index 100% rename from web/src/components/LoginForm.js rename to web/default/src/components/LoginForm.js diff --git a/web/src/components/LogsTable.js b/web/default/src/components/LogsTable.js similarity index 100% rename from web/src/components/LogsTable.js rename to web/default/src/components/LogsTable.js diff --git a/web/src/components/OperationSetting.js b/web/default/src/components/OperationSetting.js similarity index 100% rename from web/src/components/OperationSetting.js rename to web/default/src/components/OperationSetting.js diff --git a/web/src/components/OtherSetting.js b/web/default/src/components/OtherSetting.js similarity index 100% rename from web/src/components/OtherSetting.js rename to web/default/src/components/OtherSetting.js diff --git a/web/src/components/PasswordResetConfirm.js b/web/default/src/components/PasswordResetConfirm.js similarity index 100% rename from web/src/components/PasswordResetConfirm.js rename to web/default/src/components/PasswordResetConfirm.js diff --git a/web/src/components/PasswordResetForm.js b/web/default/src/components/PasswordResetForm.js similarity index 100% rename from web/src/components/PasswordResetForm.js rename to web/default/src/components/PasswordResetForm.js diff --git a/web/src/components/PersonalSetting.js b/web/default/src/components/PersonalSetting.js similarity index 100% rename from web/src/components/PersonalSetting.js rename to web/default/src/components/PersonalSetting.js diff --git a/web/src/components/PrivateRoute.js b/web/default/src/components/PrivateRoute.js similarity index 100% rename from web/src/components/PrivateRoute.js rename to web/default/src/components/PrivateRoute.js diff --git a/web/src/components/RedemptionsTable.js b/web/default/src/components/RedemptionsTable.js similarity index 100% rename from web/src/components/RedemptionsTable.js rename to web/default/src/components/RedemptionsTable.js diff --git a/web/src/components/RegisterForm.js b/web/default/src/components/RegisterForm.js similarity index 100% rename from web/src/components/RegisterForm.js rename to web/default/src/components/RegisterForm.js diff --git a/web/src/components/SystemSetting.js b/web/default/src/components/SystemSetting.js similarity index 100% rename from web/src/components/SystemSetting.js rename to web/default/src/components/SystemSetting.js diff --git a/web/src/components/TokensTable.js b/web/default/src/components/TokensTable.js similarity index 100% rename from web/src/components/TokensTable.js rename to web/default/src/components/TokensTable.js diff --git a/web/src/components/UsersTable.js b/web/default/src/components/UsersTable.js similarity index 100% rename from web/src/components/UsersTable.js rename to web/default/src/components/UsersTable.js diff --git a/web/src/components/utils.js b/web/default/src/components/utils.js similarity index 100% rename from web/src/components/utils.js rename to web/default/src/components/utils.js diff --git a/web/src/constants/channel.constants.js b/web/default/src/constants/channel.constants.js similarity index 100% rename from web/src/constants/channel.constants.js rename to web/default/src/constants/channel.constants.js diff --git a/web/src/constants/common.constant.js b/web/default/src/constants/common.constant.js similarity index 100% rename from web/src/constants/common.constant.js rename to web/default/src/constants/common.constant.js diff --git a/web/src/constants/index.js b/web/default/src/constants/index.js similarity index 100% rename from web/src/constants/index.js rename to web/default/src/constants/index.js diff --git a/web/src/constants/toast.constants.js b/web/default/src/constants/toast.constants.js similarity index 100% rename from web/src/constants/toast.constants.js rename to web/default/src/constants/toast.constants.js diff --git a/web/src/constants/user.constants.js b/web/default/src/constants/user.constants.js similarity index 100% rename from web/src/constants/user.constants.js rename to web/default/src/constants/user.constants.js diff --git a/web/src/context/Status/index.js b/web/default/src/context/Status/index.js similarity index 100% rename from web/src/context/Status/index.js rename to web/default/src/context/Status/index.js diff --git a/web/src/context/Status/reducer.js b/web/default/src/context/Status/reducer.js similarity index 100% rename from web/src/context/Status/reducer.js rename to web/default/src/context/Status/reducer.js diff --git a/web/src/context/User/index.js b/web/default/src/context/User/index.js similarity index 100% rename from web/src/context/User/index.js rename to web/default/src/context/User/index.js diff --git a/web/src/context/User/reducer.js b/web/default/src/context/User/reducer.js similarity index 100% rename from web/src/context/User/reducer.js rename to web/default/src/context/User/reducer.js diff --git a/web/src/helpers/api.js b/web/default/src/helpers/api.js similarity index 100% rename from web/src/helpers/api.js rename to web/default/src/helpers/api.js diff --git a/web/src/helpers/auth-header.js b/web/default/src/helpers/auth-header.js similarity index 100% rename from web/src/helpers/auth-header.js rename to web/default/src/helpers/auth-header.js diff --git a/web/src/helpers/history.js b/web/default/src/helpers/history.js similarity index 100% rename from web/src/helpers/history.js rename to web/default/src/helpers/history.js diff --git a/web/src/helpers/index.js b/web/default/src/helpers/index.js similarity index 100% rename from web/src/helpers/index.js rename to web/default/src/helpers/index.js diff --git a/web/src/helpers/render.js b/web/default/src/helpers/render.js similarity index 100% rename from web/src/helpers/render.js rename to web/default/src/helpers/render.js diff --git a/web/src/helpers/utils.js b/web/default/src/helpers/utils.js similarity index 100% rename from web/src/helpers/utils.js rename to web/default/src/helpers/utils.js diff --git a/web/src/index.css b/web/default/src/index.css similarity index 100% rename from web/src/index.css rename to web/default/src/index.css diff --git a/web/src/index.js b/web/default/src/index.js similarity index 100% rename from web/src/index.js rename to web/default/src/index.js diff --git a/web/src/pages/About/index.js b/web/default/src/pages/About/index.js similarity index 100% rename from web/src/pages/About/index.js rename to web/default/src/pages/About/index.js diff --git a/web/src/pages/Channel/EditChannel.js b/web/default/src/pages/Channel/EditChannel.js similarity index 100% rename from web/src/pages/Channel/EditChannel.js rename to web/default/src/pages/Channel/EditChannel.js diff --git a/web/src/pages/Channel/index.js b/web/default/src/pages/Channel/index.js similarity index 100% rename from web/src/pages/Channel/index.js rename to web/default/src/pages/Channel/index.js diff --git a/web/src/pages/Chat/index.js b/web/default/src/pages/Chat/index.js similarity index 100% rename from web/src/pages/Chat/index.js rename to web/default/src/pages/Chat/index.js diff --git a/web/src/pages/Home/index.js b/web/default/src/pages/Home/index.js similarity index 100% rename from web/src/pages/Home/index.js rename to web/default/src/pages/Home/index.js diff --git a/web/src/pages/Log/index.js b/web/default/src/pages/Log/index.js similarity index 100% rename from web/src/pages/Log/index.js rename to web/default/src/pages/Log/index.js diff --git a/web/src/pages/NotFound/index.js b/web/default/src/pages/NotFound/index.js similarity index 100% rename from web/src/pages/NotFound/index.js rename to web/default/src/pages/NotFound/index.js diff --git a/web/src/pages/Redemption/EditRedemption.js b/web/default/src/pages/Redemption/EditRedemption.js similarity index 100% rename from web/src/pages/Redemption/EditRedemption.js rename to web/default/src/pages/Redemption/EditRedemption.js diff --git a/web/src/pages/Redemption/index.js b/web/default/src/pages/Redemption/index.js similarity index 100% rename from web/src/pages/Redemption/index.js rename to web/default/src/pages/Redemption/index.js diff --git a/web/src/pages/Setting/index.js b/web/default/src/pages/Setting/index.js similarity index 100% rename from web/src/pages/Setting/index.js rename to web/default/src/pages/Setting/index.js diff --git a/web/src/pages/Token/EditToken.js b/web/default/src/pages/Token/EditToken.js similarity index 100% rename from web/src/pages/Token/EditToken.js rename to web/default/src/pages/Token/EditToken.js diff --git a/web/src/pages/Token/index.js b/web/default/src/pages/Token/index.js similarity index 100% rename from web/src/pages/Token/index.js rename to web/default/src/pages/Token/index.js diff --git a/web/src/pages/TopUp/index.js b/web/default/src/pages/TopUp/index.js similarity index 100% rename from web/src/pages/TopUp/index.js rename to web/default/src/pages/TopUp/index.js diff --git a/web/src/pages/User/AddUser.js b/web/default/src/pages/User/AddUser.js similarity index 100% rename from web/src/pages/User/AddUser.js rename to web/default/src/pages/User/AddUser.js diff --git a/web/src/pages/User/EditUser.js b/web/default/src/pages/User/EditUser.js similarity index 100% rename from web/src/pages/User/EditUser.js rename to web/default/src/pages/User/EditUser.js diff --git a/web/src/pages/User/index.js b/web/default/src/pages/User/index.js similarity index 100% rename from web/src/pages/User/index.js rename to web/default/src/pages/User/index.js diff --git a/web/vercel.json b/web/default/vercel.json similarity index 100% rename from web/vercel.json rename to web/default/vercel.json