Fix updatenotifications vars and groups request

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2018-06-07 10:08:56 +02:00
parent c5c18a483c
commit b5d2c1b031
No known key found for this signature in database
GPG key ID: 60C25B8C072916CF
5 changed files with 52 additions and 48 deletions

View file

@ -263,7 +263,23 @@
this.hideAvailableUpdates = !this.hideAvailableUpdates; this.hideAvailableUpdates = !this.hideAvailableUpdates;
} }
}, },
beforeMount: function() {
// Parse server data
var data = JSON.parse($('#updatenotification').attr('data-json'));
this.newVersionString = data.newVersionString;
this.lastCheckedDate = data.lastChecked;
this.isUpdateChecked = data.isUpdateChecked;
this.updaterEnabled = data.updaterEnabled;
this.downloadLink = data.downloadLink;
this.isNewVersionAvailable = data.isNewVersionAvailable;
this.updateServerURL = data.updateServerURL;
this.currentChannel = data.currentChannel;
this.channels = data.channels;
this.notifyGroups = data.notifyGroups;
this.isDefaultUpdateServerURL = data.isDefaultUpdateServerURL;
this.versionIsEol = data.versionIsEol;
},
mounted: function () { mounted: function () {
this._$el = $(this.$el); this._$el = $(this.$el);
this._$releaseChannel = this._$el.find('#release-channel'); this._$releaseChannel = this._$el.find('#release-channel');
@ -273,15 +289,12 @@
}.bind(this)); }.bind(this));
$.ajax({ $.ajax({
url: OC.generateUrl('/settings/users/groups'), url: OC.linkToOCS('cloud', 2)+ '/groups',
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
var results = []; var results = [];
$.each(data.data.adminGroups, function(i, group) { $.each(data.ocs.data.groups, function(i, group) {
results.push({value: group.id, label: group.name}); results.push({value: group, label: group});
});
$.each(data.data.groups, function(i, group) {
results.push({value: group.id, label: group.name});
}); });
this.availableGroups = results; this.availableGroups = results;

View file

@ -22,7 +22,6 @@
import Vue from 'vue'; import Vue from 'vue';
import Root from './components/root' import Root from './components/root'
var data = JSON.parse($('#updatenotification').attr('data-json'));
Vue.mixin({ Vue.mixin({
methods: { methods: {
t: function(app, text, vars, count, options) { t: function(app, text, vars, count, options) {
@ -39,16 +38,3 @@ const vm = new Vue({
}).$mount('#updatenotification'); }).$mount('#updatenotification');
vm.newVersionString = data.newVersionString;
vm.lastCheckedDate = data.lastChecked;
vm.isUpdateChecked = data.isUpdateChecked;
vm.updaterEnabled = data.updaterEnabled;
vm.downloadLink = data.downloadLink;
vm.isNewVersionAvailable = data.isNewVersionAvailable;
vm.updateServerURL = data.updateServerURL;
vm.currentChannel = data.currentChannel;
vm.channels = data.channels;
vm.notifyGroups = data.notifyGroups;
vm.isDefaultUpdateServerURL = data.isDefaultUpdateServerURL;
vm.versionIsEol = data.versionIsEol;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -372,7 +372,7 @@
"arr-flatten": { "arr-flatten": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
"integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", "integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=",
"dev": true "dev": true
}, },
"arr-union": { "arr-union": {
@ -638,13 +638,13 @@
"bluebird": { "bluebird": {
"version": "3.5.1", "version": "3.5.1",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz",
"integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==", "integrity": "sha1-2VUfnemPH82h5oPRfukaBgLuLrk=",
"dev": true "dev": true
}, },
"bn.js": { "bn.js": {
"version": "4.11.8", "version": "4.11.8",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz",
"integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", "integrity": "sha1-LN4J617jQfSEdGuwMJsyU7GxRC8=",
"dev": true "dev": true
}, },
"brace-expansion": { "brace-expansion": {
@ -756,7 +756,7 @@
"browserify-zlib": { "browserify-zlib": {
"version": "0.2.0", "version": "0.2.0",
"resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz",
"integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", "integrity": "sha1-KGlFnZqjviRf6P4sofRuLn9U1z8=",
"dev": true, "dev": true,
"requires": { "requires": {
"pako": "~1.0.5" "pako": "~1.0.5"
@ -926,7 +926,7 @@
"cipher-base": { "cipher-base": {
"version": "1.0.4", "version": "1.0.4",
"resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz",
"integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", "integrity": "sha1-h2Dk7MJy9MNjUy+SbYdKriwTl94=",
"dev": true, "dev": true,
"requires": { "requires": {
"inherits": "^2.0.1", "inherits": "^2.0.1",
@ -1257,7 +1257,7 @@
"crypto-browserify": { "crypto-browserify": {
"version": "3.12.0", "version": "3.12.0",
"resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz",
"integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", "integrity": "sha1-OWz58xN/A+S45TLFj2mCVOAPgOw=",
"dev": true, "dev": true,
"requires": { "requires": {
"browserify-cipher": "^1.0.0", "browserify-cipher": "^1.0.0",
@ -1610,7 +1610,7 @@
"domain-browser": { "domain-browser": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz",
"integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", "integrity": "sha1-PTH1AZGmdJ3RN1p/Ui6CPULlTto=",
"dev": true "dev": true
}, },
"dot-prop": { "dot-prop": {
@ -1736,7 +1736,7 @@
"evp_bytestokey": { "evp_bytestokey": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz",
"integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", "integrity": "sha1-f8vbGY3HGVlDLv4ThCaE4FJaywI=",
"dev": true, "dev": true,
"requires": { "requires": {
"md5.js": "^1.3.4", "md5.js": "^1.3.4",
@ -2071,7 +2071,8 @@
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
@ -2486,7 +2487,8 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.1", "version": "5.1.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
@ -2542,6 +2544,7 @@
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
@ -2585,12 +2588,14 @@
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.0.2", "version": "3.0.2",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
} }
} }
}, },
@ -2740,7 +2745,7 @@
"hash.js": { "hash.js": {
"version": "1.1.3", "version": "1.1.3",
"resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz",
"integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", "integrity": "sha1-NA3tvmKQGHFRweodd3o0SJNd+EY=",
"dev": true, "dev": true,
"requires": { "requires": {
"inherits": "^2.0.3", "inherits": "^2.0.3",
@ -2944,7 +2949,7 @@
"is-buffer": { "is-buffer": {
"version": "1.1.6", "version": "1.1.6",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", "integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=",
"dev": true "dev": true
}, },
"is-data-descriptor": { "is-data-descriptor": {
@ -3338,7 +3343,7 @@
"miller-rabin": { "miller-rabin": {
"version": "4.0.1", "version": "4.0.1",
"resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz",
"integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", "integrity": "sha1-8IA1HIZbDcViqEYpZtqlNUPHik0=",
"dev": true, "dev": true,
"requires": { "requires": {
"bn.js": "^4.0.0", "bn.js": "^4.0.0",
@ -3366,7 +3371,7 @@
"minimatch": { "minimatch": {
"version": "3.0.4", "version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=",
"dev": true, "dev": true,
"requires": { "requires": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"
@ -3496,7 +3501,7 @@
"node-libs-browser": { "node-libs-browser": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz",
"integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==", "integrity": "sha1-X5QmPUBPbkR2fXJpAf/wVHjWAN8=",
"dev": true, "dev": true,
"requires": { "requires": {
"assert": "^1.1.1", "assert": "^1.1.1",
@ -3662,7 +3667,7 @@
"os-locale": { "os-locale": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz",
"integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", "integrity": "sha1-QrwpAKa1uL0XN2yOiCtlr8zyS/I=",
"dev": true, "dev": true,
"requires": { "requires": {
"execa": "^0.7.0", "execa": "^0.7.0",
@ -3709,7 +3714,7 @@
"pako": { "pako": {
"version": "1.0.6", "version": "1.0.6",
"resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz",
"integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==", "integrity": "sha1-AQEhG6pwxLykoPY/Igbpe3368lg=",
"dev": true "dev": true
}, },
"parallel-transform": { "parallel-transform": {
@ -5802,7 +5807,7 @@
"randombytes": { "randombytes": {
"version": "2.0.6", "version": "2.0.6",
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz",
"integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", "integrity": "sha1-0wLFIpSFiISKjTAMkytEwkIx2oA=",
"dev": true, "dev": true,
"requires": { "requires": {
"safe-buffer": "^5.1.0" "safe-buffer": "^5.1.0"
@ -6076,7 +6081,7 @@
"semver": { "semver": {
"version": "5.5.0", "version": "5.5.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz",
"integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", "integrity": "sha1-3Eu8emyp2Rbe5dQ1FvAJK1j3uKs=",
"dev": true "dev": true
}, },
"serialize-javascript": { "serialize-javascript": {
@ -6412,7 +6417,7 @@
"string-width": { "string-width": {
"version": "2.1.1", "version": "2.1.1",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
"integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=",
"dev": true, "dev": true,
"requires": { "requires": {
"is-fullwidth-code-point": "^2.0.0", "is-fullwidth-code-point": "^2.0.0",
@ -6875,7 +6880,7 @@
"vue-template-es2015-compiler": { "vue-template-es2015-compiler": {
"version": "1.6.0", "version": "1.6.0",
"resolved": "https://registry.npmjs.org/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.6.0.tgz", "resolved": "https://registry.npmjs.org/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.6.0.tgz",
"integrity": "sha512-x3LV3wdmmERhVCYy3quqA57NJW7F3i6faas++pJQWtknWT+n7k30F4TVdHvCLn48peTJFRvCpxs3UuFPqgeELg==", "integrity": "sha1-3EJpcTMwLOMBdSQ1amxht7abShg=",
"dev": true "dev": true
}, },
"watchpack": { "watchpack": {
@ -6990,7 +6995,7 @@
"webpack-sources": { "webpack-sources": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.1.0.tgz", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.1.0.tgz",
"integrity": "sha512-aqYp18kPphgoO5c/+NaUvEeACtZjMESmDChuD3NBciVpah3XpMEU9VAAtIaB1BsfJWWTSdv8Vv1m3T0aRk2dUw==", "integrity": "sha1-oQHrrlnWUHNU1x2AE5UKOot6WlQ=",
"dev": true, "dev": true,
"requires": { "requires": {
"source-list-map": "^2.0.0", "source-list-map": "^2.0.0",