update code

This commit is contained in:
manhlab
2021-04-07 06:32:42 -04:00
parent 7fb98911a6
commit a4753625f6
779 changed files with 335717 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
<template>
<div class="c-app">
<TheSidebar/>
<CWrapper>
<TheHeader/>
<div class="c-body">
<main class="c-main">
<CContainer fluid>
<transition name="fade">
<router-view></router-view>
</transition>
</CContainer>
</main>
<TheFooter/>
</div>
</CWrapper>
</div>
</template>
<script>
import TheSidebar from './TheSidebar'
import TheHeader from './TheHeader'
import TheFooter from './TheFooter'
export default {
name: 'TheContainer',
components: {
TheSidebar,
TheHeader,
TheFooter
}
}
</script>
<style scoped>
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.3s;
}
.fade-enter,
.fade-leave-to {
opacity: 0;
}
</style>

View File

@@ -0,0 +1,18 @@
<template>
<CFooter :fixed="false">
<!-- <div>
<a href="https://coreui.io" target="_blank">CoreUI</a>
<span class="ml-1">&copy; {{new Date().getFullYear()}} creativeLabs.</span>
</div>
<div class="ml-auto">
<span class="mr-1">Powered by</span>
<a href="https://coreui.io/vue" target="_blank">CoreUI for Vue</a>
</div> -->
</CFooter>
</template>
<script>
export default {
name: 'TheFooter'
}
</script>

View File

@@ -0,0 +1,42 @@
<template>
<CHeader fixed with-subheader light>
<CToggler
in-header
class="ml-3 d-lg-none"
@click="$store.commit('toggleSidebarMobile')"
/>
<CToggler
in-header
class="ml-3 d-md-down-none"
@click="$store.commit('toggleSidebarDesktop')"
/>
<CHeaderBrand class="mx-auto d-lg-none" to="/">
<CIcon name="logo" height="48" alt="Logo"/>
</CHeaderBrand>
<CHeaderNav class="d-md-down-none mr-auto">
</CHeaderNav>
<CHeaderNav class="mr-4">
<CHeaderNavItem class="d-md-down-none mx-2">
<!-- <CHeaderNavLink>
<CIcon name="cil-bell"/>
<CBadge color="danger" class="ml-auto">1</CBadge>
</CHeaderNavLink> -->
</CHeaderNavItem>
<TheHeaderDropdownAccnt/>
</CHeaderNav>
<CSubheader class="px-3">
<CBreadcrumbRouter class="border-0 mb-0"/>
</CSubheader>
</CHeader>
</template>
<script>
import TheHeaderDropdownAccnt from './TheHeaderDropdownAccnt'
export default {
name: 'TheHeader',
components: {
TheHeaderDropdownAccnt
}
}
</script>

View File

@@ -0,0 +1,51 @@
<template>
<div>
<CButton
size="sm"
color="info"
@click="goProfile"
variant="outline"
v-c-tooltip="'Thông tin cá nhân'"
>
<CIcon name="cil-user" class="m-0" />
</CButton>
<CButton size="sm" color="danger" @click="logout" variant="outline" v-c-tooltip="'Đăng xuất'">
<CIcon name="cil-power-standby" class="m-0" />
</CButton>
</div>
</template>
<script>
export default {
name: "TheHeaderDropdownAccnt",
data() {
return {
itemsCount: 42
};
},
methods: {
logout() {
this.$store
.dispatch("auth/logout")
.then(response => {
this.redirectToLogin();
})
.catch(error => {
this.redirectToLogin();
});
},
redirectToLogin() {
this.$router.push({ name: "Login" });
},
goProfile() {
this.$router.push({ name: "Profile" });
}
}
};
</script>
<style scoped>
.c-icon {
margin-right: 0.3rem;
}
</style>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,244 @@
export default [
{
_name: 'CSidebarNav',
_children: [
{
_name: 'CSidebarNavItem',
name: 'Trang chủ',
to: '/dashboard',
icon: 'cil-home',
},
// {
// _name: 'CSidebarNavTitle',
// _children: ['Theme']
// },
// {
// _name: 'CSidebarNavItem',
// name: 'Colors',
// to: '/theme/colors',
// icon: 'cil-drop'
// },
// {
// _name: 'CSidebarNavItem',
// name: 'Typography',
// to: '/theme/typography',
// icon: 'cil-pencil'
// },
// {
// _name: 'CSidebarNavItem',
// name: 'CKEditor',
// to: '/theme/ckeditor',
// icon: 'cil-short-text'
// },
// {
// _name: 'CSidebarNavTitle',
// _children: ['Components']
// },
// {
// _name: 'CSidebarNavDropdown',
// name: 'Base',
// route: '/base',
// icon: 'cil-puzzle',
// items: [
// {
// name: 'Breadcrumbs',
// to: '/base/breadcrumbs'
// },
// {
// name: 'Cards',
// to: '/base/cards'
// },
// {
// name: 'Carousels',
// to: '/base/carousels'
// },
// {
// name: 'Collapses',
// to: '/base/collapses'
// },
// {
// name: 'Forms',
// to: '/base/forms'
// },
// {
// name: 'Jumbotrons',
// to: '/base/jumbotrons'
// },
// {
// name: 'List Groups',
// to: '/base/list-groups'
// },
// {
// name: 'Navs',
// to: '/base/navs'
// },
// {
// name: 'Navbars',
// to: '/base/navbars'
// },
// {
// name: 'Paginations',
// to: '/base/paginations'
// },
// {
// name: 'Popovers',
// to: '/base/popovers'
// },
// {
// name: 'Progress Bars',
// to: '/base/progress-bars'
// },
// {
// name: 'Switches',
// to: '/base/switches'
// },
// {
// name: 'Tables',
// to: '/base/tables'
// },
// {
// name: 'Tabs',
// to: '/base/tabs'
// },
// {
// name: 'Tooltips',
// to: '/base/tooltips'
// }
// ]
// },
// {
// _name: 'CSidebarNavDropdown',
// name: 'Buttons',
// route: '/buttons',
// icon: 'cil-cursor',
// items: [
// {
// name: 'Buttons',
// to: '/buttons/standard-buttons'
// },
// {
// name: 'Button Dropdowns',
// to: '/buttons/dropdowns'
// },
// {
// name: 'Button Groups',
// to: '/buttons/button-groups'
// },
// {
// name: 'Brand Buttons',
// to: '/buttons/brand-buttons'
// }
// ]
// },
// {
// _name: 'CSidebarNavItem',
// name: 'Charts',
// to: '/charts',
// icon: 'cil-chart-pie'
// },
// {
// _name: 'CSidebarNavDropdown',
// name: 'Icons',
// route: '/icons',
// icon: 'cil-star',
// items: [
// {
// name: 'CoreUI Icons',
// to: '/icons/coreui-icons',
// badge: {
// color: 'info',
// text: 'NEW'
// }
// },
// {
// name: 'Brands',
// to: '/icons/brands'
// },
// {
// name: 'Flags',
// to: '/icons/flags'
// }
// ]
// },
// {
// _name: 'CSidebarNavDropdown',
// name: 'Notifications',
// route: '/notifications',
// icon: 'cil-bell',
// items: [
// {
// name: 'Alerts',
// to: '/notifications/alerts'
// },
// {
// name: 'Badges',
// to: '/notifications/badges'
// },
// {
// name: 'Modals',
// to: '/notifications/modals'
// }
// ]
// },
// {
// _name: 'CSidebarNavItem',
// name: 'Widgets',
// to: '/widgets',
// icon: 'cil-calculator',
// badge: {
// color: 'primary',
// text: 'NEW',
// shape: 'pill'
// }
// },
// {
// _name: 'CSidebarNavDivider',
// _class: 'm-2'
// },
// {
// _name: 'CSidebarNavTitle',
// _children: ['Extras']
// },
// {
// _name: 'CSidebarNavDropdown',
// name: 'Pages',
// route: '/pages',
// icon: 'cil-star',
// items: [
// {
// name: 'Login',
// to: '/pages/login'
// },
// {
// name: 'Register',
// to: '/pages/register'
// },
// {
// name: 'Error 404',
// to: '/pages/404'
// },
// {
// name: 'Error 500',
// to: '/pages/500'
// }
// ]
// },
// {
// _name: 'CSidebarNavItem',
// name: 'Download CoreUI',
// href: 'http://coreui.io/vue/',
// icon: { name: 'cil-cloud-download', class: 'text-white' },
// _class: 'bg-success text-white',
// target: '_blank'
// },
// {
// _name: 'CSidebarNavItem',
// name: 'Try CoreUI PRO',
// href: 'http://coreui.io/pro/vue/',
// icon: { name: 'cil-layers', class: 'text-white' },
// _class: 'bg-danger text-white',
// target: '_blank'
// }
]
}
]