Blame view

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