main/view/vue-config.js

39 lines
943 B
JavaScript

import {GlobalStore} from './lib/gstore-es6'
window.gstore = new GlobalStore();
// Header
window.gstore.add('header_title', 'ndli1718');
window.gstore.add('info', {
active: false,
type: 'warning',
message: 'Warning! blabla'
});
window.gstore.add('notif', [
{ class: 'bell', link: 'notifications', data: [] },
{ class: 'message', link: 'inbox', data: [] },
{ class: 'search', link: 'search', data: [] },
{ class: 'menu', link: 'menu', data: [] }
])
// Menu
window.gstore.add('menu_item', {
dashboard: {
label: 'Dashboard',
icon: 'dashboard'
}, profile: {
label: 'Profil',
icon: 'profile'
}, inbox: {
label: 'Boîte de réception',
icon: 'messages'
}
});
window.gstore.add('menu_item_active', 'dashboard');
window.gstore.add('min_menu', true);
// Functions
window.gstore.add('func', {
toggleMenuSize: function(){ window.gstore.data.min_menu=!window.gstore.data.min_menu; }
});