2016-02-09 21:58:29 +03:00
|
|
|
/**
|
2018-01-18 14:25:52 +03:00
|
|
|
* @copyright (c) 2018 Joas Schilling <coding@schilljs.com>
|
2016-02-09 21:58:29 +03:00
|
|
|
*
|
2018-01-18 14:25:52 +03:00
|
|
|
* @author Joas Schilling <coding@schilljs.com>
|
2016-02-09 21:58:29 +03:00
|
|
|
*
|
2018-01-18 14:25:52 +03:00
|
|
|
* This file is licensed under the Affero General Public License version 3 or
|
|
|
|
* later. See the COPYING file.
|
2016-02-09 21:58:29 +03:00
|
|
|
*/
|
|
|
|
|
2018-01-18 14:25:52 +03:00
|
|
|
(function(OC, OCA, Vue, $) {
|
|
|
|
"use strict";
|
2017-05-10 14:03:15 +03:00
|
|
|
|
2018-01-18 14:25:52 +03:00
|
|
|
OCA.UpdateNotification = OCA.UpdateNotification || {};
|
2017-05-10 14:03:15 +03:00
|
|
|
|
2018-01-18 14:25:52 +03:00
|
|
|
OCA.UpdateNotification.App = {
|
2016-09-23 14:08:18 +03:00
|
|
|
|
2016-05-09 10:43:06 +03:00
|
|
|
|
2018-01-18 14:25:52 +03:00
|
|
|
/** @type {number|null} */
|
|
|
|
interval: null,
|
|
|
|
|
|
|
|
/** @type {Vue|null} */
|
|
|
|
vm: null,
|
2016-05-09 10:43:06 +03:00
|
|
|
|
2018-01-18 14:25:52 +03:00
|
|
|
/**
|
|
|
|
* Initialise the app
|
|
|
|
*/
|
|
|
|
initialise: function() {
|
|
|
|
var data = JSON.parse($('#updatenotification').attr('data-json'));
|
|
|
|
this.vm = new Vue(OCA.UpdateNotification.Components.Root);
|
2016-05-09 10:43:06 +03:00
|
|
|
|
2018-01-18 14:25:52 +03:00
|
|
|
this.vm.newVersionString = data.newVersionString;
|
|
|
|
this.vm.lastCheckedDate = data.lastChecked;
|
|
|
|
this.vm.isUpdateChecked = data.isUpdateChecked;
|
|
|
|
this.vm.updaterEnabled = data.updaterEnabled;
|
|
|
|
this.vm.downloadLink = data.downloadLink;
|
|
|
|
this.vm.isNewVersionAvailable = data.isNewVersionAvailable;
|
|
|
|
this.vm.updateServerURL = data.updateServerURL;
|
|
|
|
this.vm.currentChannel = data.currentChannel;
|
|
|
|
this.vm.channels = data.channels;
|
|
|
|
this.vm.notifyGroups = data.notifyGroups;
|
|
|
|
this.vm.isDefaultUpdateServerURL = data.isDefaultUpdateServerURL;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
})(OC, OCA, Vue, $);
|
2016-11-16 17:36:44 +03:00
|
|
|
|
2018-01-18 14:25:52 +03:00
|
|
|
$(document).ready(function () {
|
|
|
|
OCA.UpdateNotification.App.initialise();
|
2016-02-09 21:58:29 +03:00
|
|
|
});
|