You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
187 lines
4.4 KiB
187 lines
4.4 KiB
<template>
|
|
<v-layout wrap>
|
|
<v-container class="Header">
|
|
<v-icon class="Menu" @click.stop="drawer = !drawer" dark>fas fa-bars</v-icon>
|
|
<a :href="mainHref">
|
|
<v-icon class="Home" dark>fas fa-home</v-icon>
|
|
</a>
|
|
<div class="Name caption"> {{ getAuthUser.name }} </div>
|
|
<div class="Time">
|
|
<div class="WM-Font-22 En Bold">{{ getCurrentTime }}</div>
|
|
<div class="WM-Font-14 Fa FaNum">{{ new Date() | moment("dddd jDD jMMMM jYYYY") }}</div>
|
|
</div>
|
|
<!-- <div class="Notification" dark>
|
|
<wm-notifications></wm-notifications>
|
|
</div>-->
|
|
</v-container>
|
|
|
|
<v-navigation-drawer v-model="drawer" app temporary right width="320">
|
|
<v-list class="pa-1">
|
|
<div class="row user-info">
|
|
<v-flex lg9 class="pa-3">
|
|
<img class="Avatar" :src="$_getPath()+'images/Global/Misc/Avatar.png'" />
|
|
<div class="Title">
|
|
<div class="Name Fa">{{ getAuthUser.name }}</div>
|
|
<div class="Role Fa">مدیریت</div>
|
|
</div>
|
|
</v-flex>
|
|
<v-flex lg3>
|
|
<a class="LogOut">
|
|
<v-tooltip bottom color="black" transition="slide-x-transition">
|
|
<template v-slot:activator="{ on }">
|
|
<v-btn class="mt-4" small @click.native.stop="logout" slot="activator" outlined fab color="black" dark v-on="on">
|
|
<v-icon dark>fas fa-power-off</v-icon>
|
|
</v-btn>
|
|
</template>
|
|
<span>خروج از حساب کاربری</span>
|
|
</v-tooltip>
|
|
</a>
|
|
</v-flex>
|
|
</div>
|
|
</v-list>
|
|
|
|
<v-list class="pt-0" dense>
|
|
<v-divider class="Divider"></v-divider>
|
|
<a :href="item.href" v-for="(item, key) in Items" :key="key">
|
|
<template v-if="$_hasPermission(item.permission, false, item.module)">
|
|
<wm-list-tile :TitleFa="item.titleFa" :TitleEn="item.titleEn"></wm-list-tile>
|
|
</template>
|
|
</a>
|
|
</v-list>
|
|
</v-navigation-drawer>
|
|
</v-layout>
|
|
</template>
|
|
|
|
<script>
|
|
import Tile from "@Global/components/Drawer/Tile";
|
|
import Notifications from "@Global/components/Drawer/Notifications";
|
|
import Routes from "@Global/utils/common/routes";
|
|
import { mapActions, mapGetters } from "vuex";
|
|
// import { getTime } from "@Global/utils/date/time";
|
|
export default {
|
|
data() {
|
|
return {
|
|
fav: true,
|
|
menu: true,
|
|
message: false,
|
|
hints: true,
|
|
drawer: false,
|
|
Items: [
|
|
// { titleEn: 'My Profile', titleFa: ' حساب کاربری من ', icon: 'dashboard', permission: "", href: '/User/List' },
|
|
// { titleEn: ' My Messages ', titleFa: ' پیام های من ', icon: 'question_answer', permission: "", href: '/User/List' },
|
|
{
|
|
titleEn: " My Users ",
|
|
titleFa: " کاربران مجموعه ی من ",
|
|
icon: "question_answer",
|
|
permission: "indexUser",
|
|
module: "core",
|
|
href: Routes.user(),
|
|
|
|
}
|
|
],
|
|
user: { name: "" },
|
|
mainHref: Routes.main(),
|
|
};
|
|
},
|
|
mounted() {
|
|
let self = this;
|
|
},
|
|
components: {
|
|
"wm-list-tile": Tile,
|
|
"wm-notifications": Notifications
|
|
},
|
|
computed: {
|
|
...mapGetters("auth", ["getAuthUser"]),
|
|
...mapGetters("common", ["getCurrentTime"]),
|
|
},
|
|
methods: {
|
|
...mapActions("auth", ["logout"]),
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.user-info .Title {
|
|
float: right;
|
|
}
|
|
.user-info .Avatar {
|
|
float: right;
|
|
width: 48px;
|
|
margin: 0px 10px;
|
|
}
|
|
.user-info .Title .Name {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.Header .Menu {
|
|
position: absolute;
|
|
right: 20px;
|
|
top: 20px;
|
|
}
|
|
.Header .Home {
|
|
position: absolute;
|
|
right: 50px;
|
|
top: 20px;
|
|
}
|
|
.Header .Name {
|
|
position: absolute;
|
|
right: 80px;
|
|
top: 20px;
|
|
color: #fff;
|
|
line-height: 18px;
|
|
}
|
|
|
|
.Notification {
|
|
position: absolute;
|
|
left: 20px;
|
|
top: 20px;
|
|
}
|
|
.Divider {
|
|
margin: 0px;
|
|
}
|
|
.Name {
|
|
font-size: 16px;
|
|
}
|
|
.Role {
|
|
font-size: 14px;
|
|
color: #aaaaaa;
|
|
}
|
|
.Time {
|
|
text-align: center;
|
|
color: #fff;
|
|
margin-top: -10px;
|
|
}
|
|
.Header {
|
|
padding-bottom: 0px;
|
|
}
|
|
.LogOut {
|
|
position: absolute;
|
|
left: 10px;
|
|
}
|
|
.drawer-trigger {
|
|
position: fixed;
|
|
top: 0px;
|
|
padding: 40px;
|
|
background-color: white;
|
|
left: 400px;
|
|
}
|
|
|
|
.drawer-trigger.active {
|
|
color: red;
|
|
}
|
|
|
|
.drawer {
|
|
position: fixed;
|
|
top: 0px;
|
|
left: -500px;
|
|
bottom: 0px;
|
|
background-color: white;
|
|
width: 500px;
|
|
}
|
|
|
|
.drawer.open {
|
|
left: 0px;
|
|
}
|
|
</style>
|