Blame view

src/components/AppToolbar.vue 2.93 KB
93a68cfa1   Jatinder Singh   first commit
1
2
  <template>
    <v-toolbar
8fc85e8ec   Jatinder Singh   data table changes
3
      color="grey"
93a68cfa1   Jatinder Singh   first commit
4
      fixed
93a68cfa1   Jatinder Singh   first commit
5
      app
defcc5da3   Jatinder Singh   report page
6
    >
03dcbf0c1   Neeraj Sharma   fix all api and r...
7
8
9
      <v-toolbar-title class="ml-0 pl-3">
      <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide"></v-toolbar-side-icon>
      </v-toolbar-title>
c7a4fe86a   Neeraj Sharma   responsive admin ...
10
11
      <!-- <v-flex xs3>
        <v-text-field
93a68cfa1   Jatinder Singh   first commit
12
          flat
93a68cfa1   Jatinder Singh   first commit
13
14
15
16
          prepend-icon="search"
          label="Find your user"
          v-model="search"
          color="black"
789f8298f   Jatinder Singh   change
17
          :search="search"
c7a4fe86a   Neeraj Sharma   responsive admin ...
18

93a68cfa1   Jatinder Singh   first commit
19
        >
c7a4fe86a   Neeraj Sharma   responsive admin ...
20
21
        </v-text-field>
      </v-flex> -->
93a68cfa1   Jatinder Singh   first commit
22
        <v-spacer></v-spacer>
659b42db7   Neeraj Sharma   changes something...
23
        <h5 class="white--text name">{{userName}}</h5>
93a68cfa1   Jatinder Singh   first commit
24
25
        <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition">
       <v-btn icon large flat slot="activator">
269061695   Jatinder Singh   changes
26
27
            <v-avatar size="40px">
             <img src="/static/icon/user.png"/>
93a68cfa1   Jatinder Singh   first commit
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
            </v-avatar>
        </v-btn>
          <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">
                <v-icon>{{ item.icon }}</v-icon>
              </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>
    </v-toolbar>
  </template>
  <script>
03dcbf0c1   Neeraj Sharma   fix all api and r...
44
45
  import NotificationList from "@/components/widgets/list/NotificationList";
  import Util from "@/util";
93a68cfa1   Jatinder Singh   first commit
46
  export default {
03dcbf0c1   Neeraj Sharma   fix all api and r...
47
48
    search: "",
    name: "app-toolbar",
93a68cfa1   Jatinder Singh   first commit
49
50
51
52
    components: {
      NotificationList
    },
    data: () => ({
03dcbf0c1   Neeraj Sharma   fix all api and r...
53
      search: "",
eba96ec51   Neeraj Sharma   set login name on...
54
      userName:'',
93a68cfa1   Jatinder Singh   first commit
55
56
57
      items: [
        {
          // icon: 'account_circle',
03dcbf0c1   Neeraj Sharma   fix all api and r...
58
59
60
          href: "/changepassword",
          title: "Change Password",
          click: e => {
93a68cfa1   Jatinder Singh   first commit
61
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);
        //   }
        // },
        {
          // icon: 'fullscreen_exit',
03dcbf0c1   Neeraj Sharma   fix all api and r...
74
75
76
77
78
          href: "#",
          title: "Logout",
          click: e => {
            window.getApp.$emit("APP_LOGOUT");
         //   this.$store.dispatch("setToken", null);
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: {
03dcbf0c1   Neeraj Sharma   fix all api and r...
89
90
      handleDrawerToggle() {
        window.getApp.$emit("APP_DRAWER_TOGGLED");
93a68cfa1   Jatinder Singh   first commit
91
      },
03dcbf0c1   Neeraj Sharma   fix all api and r...
92
      handleFullScreen() {
93a68cfa1   Jatinder Singh   first commit
93
94
        Util.toggleFullScreen();
      }
eba96ec51   Neeraj Sharma   set login name on...
95
    }, 
ac10393a4   Neeraj Sharma   add calender date...
96
    mounted(){
eba96ec51   Neeraj Sharma   set login name on...
97
98
    this.userName = this.$store.state.name;
  }
93a68cfa1   Jatinder Singh   first commit
99
100
  };
  </script>
03dcbf0c1   Neeraj Sharma   fix all api and r...
101
102
103
104
105
106
107
108
  <style>
  .v-icon{
    font-size:30px;
  }
  @media screen and (min-width: 1270px){
  .hide{
    display: none;
  }
a0fe54618   Neeraj Sharma   finally fix
109
110
111
  /* }
  @media screen and (max-width: 962px) {
  .imglogo{
659b42db7   Neeraj Sharma   changes something...
112
113
114
115
116
      position: absolute;
      top: 13px;
      left: 13px !important;
      width: 70px;
      height: 24px;
f42c1d9c9   Neeraj Sharma   something change ...
117
  } */
a0fe54618   Neeraj Sharma   finally fix
118
  }
a647b5fbe   Neeraj Sharma   fix logo
119
  @media screen and (max-width: 420px){
03dcbf0c1   Neeraj Sharma   fix all api and r...
120
121
122
123
  .v-list__tile {
    font-size:14px;
    padding: 0 10px;
  }
659b42db7   Neeraj Sharma   changes something...
124
125
126
  .name{
    font-size:15px; 
  }
03dcbf0c1   Neeraj Sharma   fix all api and r...
127
128
  }
  </style>