nextcloud/apps/updatenotification/js/admin.js

49 lines
1.3 KiB
JavaScript
Raw Normal View History

/**
* @copyright (c) 2018 Joas Schilling <coding@schilljs.com>
*
* @author Joas Schilling <coding@schilljs.com>
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING file.
*/
(function(OC, OCA, Vue, $) {
"use strict";
OCA.UpdateNotification = OCA.UpdateNotification || {};
OCA.UpdateNotification.App = {
2016-05-09 10:43:06 +03:00
/** @type {number|null} */
interval: null,
/** @type {Vue|null} */
vm: null,
2016-05-09 10:43:06 +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
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, $);
$(document).ready(function () {
OCA.UpdateNotification.App.initialise();
});