mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 14:33:33 -07:00
split routes file
This commit is contained in:
parent
3d9d89b631
commit
5fa8fdd63e
3 changed files with 67 additions and 15 deletions
|
@ -18,6 +18,6 @@ export default {
|
|||
},
|
||||
});
|
||||
console.log(response);
|
||||
return response.data;
|
||||
return response;
|
||||
},
|
||||
};
|
||||
|
|
52
frontend/src/routes/admin.js
Normal file
52
frontend/src/routes/admin.js
Normal file
|
@ -0,0 +1,52 @@
|
|||
import Admin from "../pages/Admin";
|
||||
import General from "../components/Admin/General";
|
||||
import Backup from "../components/Admin/Backup";
|
||||
import Theme from "../components/Admin/Theme";
|
||||
import MealPlanner from "../components/Admin/MealPlanner";
|
||||
import Migration from "../components/Admin/Migration";
|
||||
import Profile from "../pages/Admin/Profile";
|
||||
import ManageUsers from "../pages/Admin/ManageUsers";
|
||||
import Settings from "../pages/Admin/Settings";
|
||||
|
||||
export default {
|
||||
path: "/admin",
|
||||
component: Admin,
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
component: Profile,
|
||||
},
|
||||
{
|
||||
path: "profile",
|
||||
component: Profile,
|
||||
},
|
||||
{
|
||||
path: "general",
|
||||
component: General,
|
||||
},
|
||||
{
|
||||
path: "backups",
|
||||
component: Backup,
|
||||
},
|
||||
{
|
||||
path: "themes",
|
||||
component: Theme,
|
||||
},
|
||||
{
|
||||
path: "meal-planner",
|
||||
component: MealPlanner,
|
||||
},
|
||||
{
|
||||
path: "migrations",
|
||||
component: Migration,
|
||||
},
|
||||
{
|
||||
path: "manage-users",
|
||||
component: ManageUsers,
|
||||
},
|
||||
{
|
||||
path: "settings",
|
||||
component: Settings,
|
||||
},
|
||||
],
|
||||
};
|
|
@ -1,19 +1,19 @@
|
|||
import HomePage from "./pages/HomePage";
|
||||
import Page404 from "./pages/404Page";
|
||||
import SearchPage from "./pages/SearchPage";
|
||||
import RecipePage from "./pages/RecipePage";
|
||||
import RecipeNewPage from "./pages/RecipeNewPage";
|
||||
import SettingsPage from "./pages/SettingsPage";
|
||||
import AllRecipesPage from "./pages/AllRecipesPage";
|
||||
import CategoryPage from "./pages/CategoryPage";
|
||||
import MeaplPlanPage from "./pages/MealPlanPage";
|
||||
import Debug from "./pages/Debug";
|
||||
import LoginPage from "./pages/LoginPage";
|
||||
import MealPlanThisWeekPage from "./pages/MealPlanThisWeekPage";
|
||||
import HomePage from "../pages/HomePage";
|
||||
import Page404 from "../pages/404Page";
|
||||
import SearchPage from "../pages/SearchPage";
|
||||
import RecipePage from "../pages/RecipePage";
|
||||
import RecipeNewPage from "../pages/RecipeNewPage";
|
||||
import AllRecipesPage from "../pages/AllRecipesPage";
|
||||
import CategoryPage from "../pages/CategoryPage";
|
||||
import MeaplPlanPage from "../pages/MealPlanPage";
|
||||
import Debug from "../pages/Debug";
|
||||
import LoginPage from "../pages/LoginPage";
|
||||
import MealPlanThisWeekPage from "../pages/MealPlanThisWeekPage";
|
||||
import api from "@/api";
|
||||
import Admin from "./admin";
|
||||
|
||||
export const routes = [
|
||||
{ path: "/", component: HomePage },
|
||||
{ path: "/", name: "home", component: HomePage },
|
||||
{ path: "/mealie", component: HomePage },
|
||||
{ path: "/login", component: LoginPage },
|
||||
{ path: "/debug", component: Debug },
|
||||
|
@ -22,9 +22,9 @@ export const routes = [
|
|||
{ path: "/recipes/:category", component: CategoryPage },
|
||||
{ path: "/recipe/:recipe", component: RecipePage },
|
||||
{ path: "/new/", component: RecipeNewPage },
|
||||
{ path: "/settings/site", component: SettingsPage },
|
||||
{ path: "/meal-plan/planner", component: MeaplPlanPage },
|
||||
{ path: "/meal-plan/this-week", component: MealPlanThisWeekPage },
|
||||
Admin,
|
||||
{
|
||||
path: "/meal-plan/today",
|
||||
beforeEnter: async (_to, _from, next) => {
|
Loading…
Add table
Add a link
Reference in a new issue