feat: add new theme berry (#860)

* feat: add theme berry

* docs: add development notes

* fix: fix blank page

* chore: update implementation

* fix: fix package.json

* chore: update ui copy

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
This commit is contained in:
Buer
2024-01-07 14:20:07 +08:00
committed by GitHub
parent 6227eee5bc
commit 48989d4a0b
157 changed files with 13979 additions and 5 deletions

View File

@@ -0,0 +1,73 @@
import { lazy } from 'react';
// project imports
import MainLayout from 'layout/MainLayout';
import Loadable from 'ui-component/Loadable';
const Channel = Loadable(lazy(() => import('views/Channel')));
const Log = Loadable(lazy(() => import('views/Log')));
const Redemption = Loadable(lazy(() => import('views/Redemption')));
const Setting = Loadable(lazy(() => import('views/Setting')));
const Token = Loadable(lazy(() => import('views/Token')));
const Topup = Loadable(lazy(() => import('views/Topup')));
const User = Loadable(lazy(() => import('views/User')));
const Profile = Loadable(lazy(() => import('views/Profile')));
const NotFoundView = Loadable(lazy(() => import('views/Error')));
// dashboard routing
const Dashboard = Loadable(lazy(() => import('views/Dashboard')));
// ==============================|| MAIN ROUTING ||============================== //
const MainRoutes = {
path: '/panel',
element: <MainLayout />,
children: [
{
path: '',
element: <Dashboard />
},
{
path: 'dashboard',
element: <Dashboard />
},
{
path: 'channel',
element: <Channel />
},
{
path: 'log',
element: <Log />
},
{
path: 'redemption',
element: <Redemption />
},
{
path: 'setting',
element: <Setting />
},
{
path: 'token',
element: <Token />
},
{
path: 'topup',
element: <Topup />
},
{
path: 'user',
element: <User />
},
{
path: 'profile',
element: <Profile />
},
{
path: '404',
element: <NotFoundView />
}
]
};
export default MainRoutes;

View File

@@ -0,0 +1,58 @@
import { lazy } from 'react';
// project imports
import Loadable from 'ui-component/Loadable';
import MinimalLayout from 'layout/MinimalLayout';
// login option 3 routing
const AuthLogin = Loadable(lazy(() => import('views/Authentication/Auth/Login')));
const AuthRegister = Loadable(lazy(() => import('views/Authentication/Auth/Register')));
const GitHubOAuth = Loadable(lazy(() => import('views/Authentication/Auth/GitHubOAuth')));
const ForgetPassword = Loadable(lazy(() => import('views/Authentication/Auth/ForgetPassword')));
const ResetPassword = Loadable(lazy(() => import('views/Authentication/Auth/ResetPassword')));
const Home = Loadable(lazy(() => import('views/Home')));
const About = Loadable(lazy(() => import('views/About')));
const NotFoundView = Loadable(lazy(() => import('views/Error')));
// ==============================|| AUTHENTICATION ROUTING ||============================== //
const OtherRoutes = {
path: '/',
element: <MinimalLayout />,
children: [
{
path: '',
element: <Home />
},
{
path: '/about',
element: <About />
},
{
path: '/login',
element: <AuthLogin />
},
{
path: '/register',
element: <AuthRegister />
},
{
path: '/reset',
element: <ForgetPassword />
},
{
path: '/user/reset',
element: <ResetPassword />
},
{
path: '/oauth/github',
element: <GitHubOAuth />
},
{
path: '/404',
element: <NotFoundView />
}
]
};
export default OtherRoutes;

View File

@@ -0,0 +1,11 @@
import { useRoutes } from 'react-router-dom';
// routes
import MainRoutes from './MainRoutes';
import OtherRoutes from './OtherRoutes';
// ==============================|| ROUTING RENDER ||============================== //
export default function ThemeRoutes() {
return useRoutes([MainRoutes, OtherRoutes]);
}