Blame view
src/components/pageHeader/AppToolbar.vue
3.78 KB
93a68cfa1
|
1 |
<template> |
68d742034
|
2 3 4 |
<v-toolbar flat class="white pt-2" fixed app> <v-toolbar-title> <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide darkBlue-color"></v-toolbar-side-icon> |
03dcbf0c1
|
5 |
</v-toolbar-title> |
a17c68a03
|
6 |
<!-- ****** SEARCH ALL EXISTING STUDENTS ****** --> |
68d742034
|
7 8 |
<v-flex xs12 class="white"> <!-- <v-text-field |
a17c68a03
|
9 10 11 |
flat append-icon="search" label="Seacrh" |
cf94564ea
|
12 |
class="pl-3" |
a17c68a03
|
13 14 15 16 |
color="white" @input.native="emitSearch" type="text" dark |
68d742034
|
17 18 |
></v-text-field>--> <v-toolbar-title class="header-route-name pl-2">{{ $route.name }}</v-toolbar-title> |
a17c68a03
|
19 20 |
</v-flex> <v-spacer></v-spacer> |
68d742034
|
21 22 23 |
<v-toolbar-items class="hidden-sm-and-down"> <v-icon class="header-icon">notifications_none</v-icon> </v-toolbar-items> |
a17c68a03
|
24 25 |
<v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition"> <v-btn icon large flat slot="activator"> |
68d742034
|
26 |
<v-avatar size="26"> |
aa310d61a
|
27 |
<img src="/static/icon/setting1.png" alt="icon" /> |
a17c68a03
|
28 |
</v-avatar> |
93a68cfa1
|
29 |
</v-btn> |
a17c68a03
|
30 31 32 33 34 35 36 37 38 39 40 41 42 |
<v-list class="pa-0"> <v-list-tile v-for="(item,index) in items" :to="!item.href ? { name: item.name } : null" :href="item.href" @click="item.click" ripple="ripple" :disabled="item.disabled" :target="item.target" rel="noopener" :key="index" > <v-list-tile-action v-if="item.icon"> |
1571e40b5
|
43 |
<v-icon class="iconSize">{{ item.icon }}</v-icon> |
a17c68a03
|
44 45 46 47 48 49 50 |
</v-list-tile-action> <v-list-tile-content> <v-list-tile-title>{{ item.title }}</v-list-tile-title> </v-list-tile-content> </v-list-tile> </v-list> </v-menu> |
93a68cfa1
|
51 52 53 |
</v-toolbar> </template> <script> |
66a5c3b75
|
54 |
import http from "@/Services/http.js"; |
93a68cfa1
|
55 |
export default { |
03dcbf0c1
|
56 |
name: "app-toolbar", |
93a68cfa1
|
57 |
data: () => ({ |
a17c68a03
|
58 |
userName: "", |
03dcbf0c1
|
59 |
search: "", |
66a5c3b75
|
60 |
userData: {}, |
93a68cfa1
|
61 62 |
items: [ { |
db0c39244
|
63 |
icon: "account_circle", |
79583580d
|
64 |
href: "/resetPassword", |
03dcbf0c1
|
65 66 |
title: "Change Password", click: e => { |
93a68cfa1
|
67 68 69 70 71 72 73 74 75 76 77 78 |
console.log(e); } }, // { // icon: 'settings', // href: '#', // title: 'Settings', // click: (e) => { // console.log(e); // } // }, { |
db0c39244
|
79 |
icon: "lock", |
03dcbf0c1
|
80 81 82 83 |
href: "#", title: "Logout", click: e => { window.getApp.$emit("APP_LOGOUT"); |
93a68cfa1
|
84 85 |
} } |
03dcbf0c1
|
86 |
] |
93a68cfa1
|
87 88 |
}), computed: { |
03dcbf0c1
|
89 |
toolbarColor() { |
93a68cfa1
|
90 91 92 |
return this.$vuetify.options.extra.mainNav; } }, |
66a5c3b75
|
93 94 95 |
mounted() { this.getUserData(); }, |
93a68cfa1
|
96 |
methods: { |
68d742034
|
97 98 99 |
// emitSearch(ev) { // this.$root.$emit("app:search", ev.target.value); // }, |
03dcbf0c1
|
100 101 |
handleDrawerToggle() { window.getApp.$emit("APP_DRAWER_TOGGLED"); |
93a68cfa1
|
102 |
}, |
03dcbf0c1
|
103 |
handleFullScreen() { |
93a68cfa1
|
104 |
Util.toggleFullScreen(); |
66a5c3b75
|
105 106 107 |
}, getUserData() { http() |
25205ccca
|
108 109 110 111 112 |
.get("/getParticularUserDetail", { headers: { Authorization: "Bearer " + this.$store.state.token } }) |
66a5c3b75
|
113 114 115 116 |
.then(response => { this.userData = response.data.data; }) .catch(error => { |
7d0816758
|
117 118 119 120 121 |
// if (error.response.status === 401) { // this.$router.replace({ path: "/" }); // this.$store.dispatch("setToken", null); // this.$store.dispatch("Id", null); // } |
66a5c3b75
|
122 |
}); |
93a68cfa1
|
123 |
} |
a17c68a03
|
124 |
} |
93a68cfa1
|
125 126 |
}; </script> |
03dcbf0c1
|
127 |
<style> |
a17c68a03
|
128 129 |
.v-icon { font-size: 30px; |
03dcbf0c1
|
130 |
} |
687e0b929
|
131 |
.fixcolors { |
79583580d
|
132 |
background: #444b54 !important; |
687e0b929
|
133 |
} |
68d742034
|
134 |
|
a17c68a03
|
135 136 137 138 139 |
@media screen and (min-width: 1270px) { .hide { display: none; } /* } |
a0fe54618
|
140 141 |
@media screen and (max-width: 962px) { .imglogo{ |
659b42db7
|
142 143 144 145 146 |
position: absolute; top: 13px; left: 13px !important; width: 70px; height: 24px; |
f42c1d9c9
|
147 |
} */ |
a0fe54618
|
148 |
} |
a17c68a03
|
149 150 151 152 153 154 155 156 |
@media screen and (max-width: 420px) { .v-list__tile { font-size: 14px; padding: 0 10px; } .name { font-size: 15px; } |
03dcbf0c1
|
157 158 |
} </style> |