|
38 | 38 | </b-form-group> |
39 | 39 | </b-form> |
40 | 40 | </b-nav> |
41 | | - <a class="navbarBrand d-md-none"> |
| 41 | + <a class="navbar-brand d-md-none"> |
42 | 42 | <i class="fa fa-circle text-gray mr-n-sm" /> |
43 | 43 | <i class="fa fa-circle text-warning" /> |
44 | 44 | |
|
50 | 50 | <b-nav class="ml-auto"> |
51 | 51 | <b-nav-item-dropdown |
52 | 52 | id="basic-nav-dropdown" |
53 | | - class="notificationsMenu d-sm-down-none mr-2" |
54 | | - extra-menu-classes="notificationsWrapper py-0 animated animated-fast fadeInUp" |
| 53 | + class="notifications-menu d-sm-down-none mr-2" |
| 54 | + extra-menu-classes="notifications-wrapper py-0 animated animated-fast fadeInUp" |
55 | 55 | right> |
56 | 56 | <template slot="button-content"> |
57 | 57 | <span class="avatar thumb-sm float-left mr-2"> |
|
62 | 62 | </template> |
63 | 63 | <Notifications /> |
64 | 64 | </b-nav-item-dropdown> |
65 | | - <b-nav-item-dropdown class="settingsDropdown d-sm-down-none" no-caret right> |
| 65 | + <b-nav-item-dropdown class="settings-dropdown d-sm-down-none" no-caret right> |
66 | 66 | <template slot="button-content"> |
67 | 67 | <i class="la la-cog px-2" /> |
68 | 68 | </template> |
|
81 | 81 | <a class="d-sm-down-none px-2" id="toggle-chat" href="#" @click="toggleChat"> |
82 | 82 | <i class="la la-globe" /> |
83 | 83 | </a> |
84 | | - <div id="chat-notification" class="chatNotification hide"> |
85 | | - <div class="chatNotificationInner"> |
| 84 | + <i v-if="chatNotificationIcon" class="chat-notification-sing animated bounceIn"></i> |
| 85 | + <div id="chat-notification" class="chat-notification" :class="{'notification-hidden': !chatNotificationPopover}"> |
| 86 | + <div class="chat-notification-inner"> |
86 | 87 | <h6 class="title d-flex text-white"> |
87 | 88 | <span class="thumb-xs"> |
88 | 89 | <img src="../../assets/people/a6.jpg" alt="" |
|
108 | 109 |
|
109 | 110 | <script> |
110 | 111 | import { mapState, mapActions } from 'vuex'; |
111 | | -import $ from 'jquery'; |
112 | 112 | import Notifications from '@/components/Notifications/Notifications'; |
113 | 113 |
|
114 | 114 | export default { |
115 | | - name: 'Headed', |
| 115 | + name: 'Header', |
116 | 116 | components: { Notifications }, |
117 | 117 | computed: { |
118 | | - ...mapState('layout', { |
119 | | - sidebarClose: state => state.sidebarClose, |
120 | | - sidebarStatic: state => state.sidebarStatic, |
121 | | - }), |
| 118 | + ...mapState('layout', ['sidebarClose', 'sidebarStatic', 'chatNotificationIcon', 'chatNotificationPopover']), |
122 | 119 | }, |
123 | 120 | methods: { |
124 | | - ...mapActions('layout', ['toggleSidebar', 'toggleChat', 'switchSidebar', 'changeSidebarActive']), |
| 121 | + ...mapActions('layout', ['toggleSidebar', 'toggleChat', 'switchSidebar', 'changeSidebarActive', 'initApp']), |
125 | 122 | switchSidebarMethod() { |
126 | 123 | if (!this.sidebarClose) { |
127 | 124 | this.switchSidebar(true); |
@@ -151,22 +148,7 @@ export default { |
151 | 148 | }, |
152 | 149 | created() { |
153 | 150 | if (window.innerWidth > 576) { |
154 | | - setTimeout(() => { |
155 | | - const $chatNotification = $('#chat-notification'); |
156 | | - $chatNotification.removeClass('hide').addClass('animated fadeIn') |
157 | | - .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', () => { |
158 | | - $chatNotification.removeClass('animated fadeIn'); |
159 | | - setTimeout(() => { |
160 | | - $chatNotification.addClass('animated fadeOut') |
161 | | - .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd' |
162 | | - + ' oanimationend animationend', () => { |
163 | | - $chatNotification.addClass('hide'); |
164 | | - }); |
165 | | - }, 6000); |
166 | | - }); |
167 | | - $chatNotification.siblings('#toggle-chat') |
168 | | - .append('<i class="chat-notification-sing animated bounceIn"></i>'); |
169 | | - }, 4000); |
| 151 | + this.initApp(); |
170 | 152 | } |
171 | 153 | }, |
172 | 154 | }; |
|
0 commit comments