mirror of
https://github.com/creativetimofficial/vue-material-kit.git
synced 2025-05-23 04:04:22 +08:00
Adding SideBar dashboard Admin
This commit is contained in:
parent
b785227d74
commit
eff0ac75ae
@ -26,6 +26,10 @@ import ElTypography from "../layouts/sections/elements/typography/TypographyView
|
||||
|
||||
import AdminLoginView from "../views/Auth/AdminLogin.vue";
|
||||
import UserLoginView from "../views/Auth/UserLogin.vue";
|
||||
import AdminDashboardView from "../views/Admin/dashboard.vue";
|
||||
import AdminSettingsView from "../views/Admin/Settings.vue"
|
||||
import AdminUsersView from "../views/Admin/Users.vue"
|
||||
|
||||
// import AdminView from "../views/LandingPages/Author/AuthorView.vue";
|
||||
import { Role } from './constants';
|
||||
import { useStore } from '@/stores'
|
||||
@ -162,6 +166,11 @@ const router = createRouter({
|
||||
component: AdminLoginView,
|
||||
name: "admin-login",
|
||||
},
|
||||
{
|
||||
path: '/admin/dashboard',
|
||||
component: AdminDashboardView,
|
||||
name: "admin-dashboard",
|
||||
},
|
||||
// {
|
||||
// path: "/unauthorized",
|
||||
// name: "unauthorized",
|
||||
@ -172,6 +181,16 @@ const router = createRouter({
|
||||
name: "user-login",
|
||||
component: UserLoginView,
|
||||
},
|
||||
{
|
||||
path: '/admin/users',
|
||||
component: AdminUsersView,
|
||||
name: "admin-users",
|
||||
},
|
||||
{
|
||||
path: '/admin/settings',
|
||||
component: AdminSettingsView,
|
||||
name: "admin-settings",
|
||||
},
|
||||
|
||||
],
|
||||
});
|
||||
|
3
src/views/Admin/Settings.vue
Normal file
3
src/views/Admin/Settings.vue
Normal file
@ -0,0 +1,3 @@
|
||||
<template>
|
||||
Settings Page
|
||||
</template>
|
19
src/views/Admin/SideNavAdmin.vue
Normal file
19
src/views/Admin/SideNavAdmin.vue
Normal file
@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<aside class="sidebar">
|
||||
<ul>
|
||||
<li><a href="#" @click.prevent="goToPage('el-badges')">Dashboard</a></li>
|
||||
<li><a href="#" @click.prevent="goToPage('admin-users')">Users</a></li>
|
||||
<li><a href="#" @click.prevent="goToPage('admin-settings')">Settings</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
methods: {
|
||||
goToPage(page) {
|
||||
this.$router.push({ name: page });
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
3
src/views/Admin/Users.vue
Normal file
3
src/views/Admin/Users.vue
Normal file
@ -0,0 +1,3 @@
|
||||
<template>
|
||||
Users Page
|
||||
</template>
|
16
src/views/Admin/dashboard.vue
Normal file
16
src/views/Admin/dashboard.vue
Normal file
@ -0,0 +1,16 @@
|
||||
<template>
|
||||
<div class="layout">
|
||||
<Sidebar />
|
||||
<div class="content">
|
||||
<router-view />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Sidebar from './SideNavAdmin.vue';
|
||||
|
||||
export default {
|
||||
components: { Sidebar }
|
||||
}
|
||||
</script>
|
Loading…
x
Reference in New Issue
Block a user