Blame view
src/components/pageHeader/AppToolbar.vue
3.25 KB
93a68cfa1
|
1 |
<template> |
687e0b929
|
2 |
<v-toolbar class="fixcolors" fixed app> |
cf94564ea
|
3 4 |
<v-toolbar-title class="ml-0"> <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide white--text"></v-toolbar-side-icon> |
03dcbf0c1
|
5 |
</v-toolbar-title> |
a17c68a03
|
6 7 |
<!-- ****** SEARCH ALL EXISTING STUDENTS ****** --> |
db0c39244
|
8 9 10 11 |
<v-flex xs7 sm3 class="userSearch" |
1c69557ac
|
12 |
v-if="$route.name != 'Dashboard' && $route.name != 'changepassword' && $route.name != 'generalSetting' && $route.name != 'resetPassword' && $route.name != 'bulkImport'" |
db0c39244
|
13 |
> |
a17c68a03
|
14 15 16 17 |
<v-text-field flat append-icon="search" label="Seacrh" |
cf94564ea
|
18 |
class="pl-3" |
a17c68a03
|
19 20 21 22 23 24 25 26 27 |
color="white" @input.native="emitSearch" type="text" dark ></v-text-field> </v-flex> <v-spacer></v-spacer> <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition"> <v-btn icon large flat slot="activator"> |
79583580d
|
28 |
<v-avatar> |
687e0b929
|
29 |
<!-- <img src="/static/icon/user.png" /> --> |
79583580d
|
30 |
<v-icon dark size="40px">account_circle</v-icon> |
a17c68a03
|
31 |
</v-avatar> |
93a68cfa1
|
32 |
</v-btn> |
a17c68a03
|
33 34 35 36 37 38 39 40 41 42 43 44 45 |
<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
|
46 |
<v-icon class="iconSize">{{ item.icon }}</v-icon> |
a17c68a03
|
47 48 49 50 51 52 53 |
</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
|
54 55 56 |
</v-toolbar> </template> <script> |
03dcbf0c1
|
57 |
import Util from "@/util"; |
93a68cfa1
|
58 |
export default { |
03dcbf0c1
|
59 |
name: "app-toolbar", |
93a68cfa1
|
60 |
data: () => ({ |
a17c68a03
|
61 |
userName: "", |
03dcbf0c1
|
62 |
search: "", |
93a68cfa1
|
63 64 |
items: [ { |
db0c39244
|
65 |
icon: "account_circle", |
79583580d
|
66 |
href: "/resetPassword", |
03dcbf0c1
|
67 68 |
title: "Change Password", click: e => { |
93a68cfa1
|
69 70 71 72 73 74 75 76 77 78 79 80 |
console.log(e); } }, // { // icon: 'settings', // href: '#', // title: 'Settings', // click: (e) => { // console.log(e); // } // }, { |
db0c39244
|
81 |
icon: "lock", |
03dcbf0c1
|
82 83 84 85 |
href: "#", title: "Logout", click: e => { window.getApp.$emit("APP_LOGOUT"); |
93a68cfa1
|
86 87 |
} } |
03dcbf0c1
|
88 |
] |
93a68cfa1
|
89 90 |
}), computed: { |
03dcbf0c1
|
91 |
toolbarColor() { |
93a68cfa1
|
92 93 94 95 |
return this.$vuetify.options.extra.mainNav; } }, methods: { |
db0c39244
|
96 97 98 |
emitSearch(ev) { this.$root.$emit("app:search", ev.target.value); console.log("ev.target.value", ev.target.value); |
a17c68a03
|
99 |
}, |
03dcbf0c1
|
100 101 |
handleDrawerToggle() { window.getApp.$emit("APP_DRAWER_TOGGLED"); |
93a68cfa1
|
102 |
}, |
03dcbf0c1
|
103 |
handleFullScreen() { |
93a68cfa1
|
104 105 |
Util.toggleFullScreen(); } |
a17c68a03
|
106 |
} |
93a68cfa1
|
107 108 |
}; </script> |
03dcbf0c1
|
109 |
<style> |
a17c68a03
|
110 111 |
.v-icon { font-size: 30px; |
03dcbf0c1
|
112 |
} |
687e0b929
|
113 |
.fixcolors { |
79583580d
|
114 |
background: #444b54 !important; |
687e0b929
|
115 |
} |
a17c68a03
|
116 117 118 119 120 |
@media screen and (min-width: 1270px) { .hide { display: none; } /* } |
a0fe54618
|
121 122 |
@media screen and (max-width: 962px) { .imglogo{ |
659b42db7
|
123 124 125 126 127 |
position: absolute; top: 13px; left: 13px !important; width: 70px; height: 24px; |
f42c1d9c9
|
128 |
} */ |
a0fe54618
|
129 |
} |
a17c68a03
|
130 131 132 133 134 135 136 137 |
@media screen and (max-width: 420px) { .v-list__tile { font-size: 14px; padding: 0 10px; } .name { font-size: 15px; } |
03dcbf0c1
|
138 139 |
} </style> |