2019-05-23 18:51:28 +02:00
|
|
|
Vue.component('app-header', {
|
|
|
|
template: '#tmpl-app-header',
|
|
|
|
data: function() {
|
|
|
|
return {
|
|
|
|
now: new Date(),
|
|
|
|
};
|
|
|
|
},
|
2019-05-15 09:31:04 +02:00
|
|
|
|
2019-05-23 18:51:28 +02:00
|
|
|
created: function() {
|
|
|
|
const self = this;
|
|
|
|
setInterval(() => {
|
|
|
|
self.now = new Date();
|
|
|
|
}, 1000)
|
|
|
|
},
|
|
|
|
});
|
2018-04-17 23:09:07 +02:00
|
|
|
|
2019-05-23 18:51:28 +02:00
|
|
|
Vue.component('plugin', {
|
|
|
|
template: '#tmpl-plugin',
|
|
|
|
props: ['config','tag'],
|
2018-04-17 23:09:07 +02:00
|
|
|
|
2019-05-23 18:51:28 +02:00
|
|
|
data: function() {
|
|
|
|
return {
|
|
|
|
selected: false,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
});
|
2018-04-17 23:09:07 +02:00
|
|
|
|
2019-05-23 18:51:28 +02:00
|
|
|
// Declaration of the main vue app
|
|
|
|
var app = new Vue({
|
|
|
|
el: '#app',
|
|
|
|
// Override {{ }} delimiters to prevent clash with Flask templates
|
|
|
|
delimiters: ['[[',']]'],
|
2018-04-17 23:09:07 +02:00
|
|
|
|
2019-05-23 18:51:28 +02:00
|
|
|
data: function() {
|
|
|
|
return {
|
|
|
|
config: window.config,
|
|
|
|
selectedPlugin: undefined,
|
2019-05-26 03:53:48 +02:00
|
|
|
now: new Date(),
|
2019-05-23 18:51:28 +02:00
|
|
|
};
|
|
|
|
},
|
2018-04-17 23:09:07 +02:00
|
|
|
|
2019-05-23 18:51:28 +02:00
|
|
|
mounted: function() {},
|
2019-05-26 03:53:48 +02:00
|
|
|
created: function() {
|
|
|
|
const self = this;
|
|
|
|
setInterval(() => {
|
|
|
|
self.now = new Date();
|
|
|
|
}, 1000)
|
|
|
|
},
|
2019-05-23 18:51:28 +02:00
|
|
|
updated: function() {},
|
|
|
|
destroyed: function() {},
|
2019-05-15 09:31:04 +02:00
|
|
|
});
|
2019-05-23 18:51:28 +02:00
|
|
|
|