From 25d9c3e52921b107383e5d05f3649178bd7cd1cf Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Tue, 26 Jun 2018 17:25:37 +0200 Subject: adjust backend and gui to update and changelog server Signed-off-by: Arthur Schiwon --- apps/updatenotification/src/components/root.vue | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'apps/updatenotification/src') diff --git a/apps/updatenotification/src/components/root.vue b/apps/updatenotification/src/components/root.vue index 96cce351cac..fcc5a9dd831 100644 --- a/apps/updatenotification/src/components/root.vue +++ b/apps/updatenotification/src/components/root.vue @@ -222,7 +222,9 @@ }, whatsNew: function () { - + if(this.whatsNewData.length === 0) { + return null; + } var whatsNew = []; for (var i in this.whatsNewData) { whatsNew[i] = { icon: 'icon-star-dark', longtext: this.whatsNewData[i] }; @@ -307,7 +309,6 @@ beforeMount: function() { // Parse server data var data = JSON.parse($('#updatenotification').attr('data-json')); - console.warn(data); this.newVersionString = data.newVersionString; this.lastCheckedDate = data.lastChecked; @@ -321,7 +322,15 @@ this.notifyGroups = data.notifyGroups; this.isDefaultUpdateServerURL = data.isDefaultUpdateServerURL; this.versionIsEol = data.versionIsEol; - this.whatsNewData = data.whatsNew; + if(data.changes && data.changes.changelogURL) { + this.changelogURL = data.changes.changelogURL; + } + if(data.changes && data.changes.whatsNew) { + if(data.changes.whatsNew.admin) { + this.whatsNewData = this.whatsNewData.concat(data.changes.whatsNew.admin); + } + this.whatsNewData = this.whatsNewData.concat(data.changes.whatsNew.regular); + } }, mounted: function () { this._$el = $(this.$el); -- cgit v1.2.3