aboutsummaryrefslogtreecommitdiffstats
path: root/apps/updatenotification/js/updatenotification.js
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-11-26 11:16:44 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2018-11-26 11:16:44 +0100
commit2fd198bd85068d8c1f292ce0e49a55d4d076165d (patch)
tree5bc755804e9e67b07a16afc104c2f3b64afe1439 /apps/updatenotification/js/updatenotification.js
parentcdc9c387f4f7734a12fb5fdbc70d18131f8b557a (diff)
downloadnextcloud-server-2fd198bd85068d8c1f292ce0e49a55d4d076165d.tar.gz
nextcloud-server-2fd198bd85068d8c1f292ce0e49a55d4d076165d.zip
Compile assets
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/updatenotification/js/updatenotification.js')
-rw-r--r--apps/updatenotification/js/updatenotification.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/updatenotification/js/updatenotification.js b/apps/updatenotification/js/updatenotification.js
index 06732d27fbb..df10bce5be0 100644
--- a/apps/updatenotification/js/updatenotification.js
+++ b/apps/updatenotification/js/updatenotification.js
@@ -1,4 +1,4 @@
-!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/js/",n(n.s=9)}([function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(module,__webpack_exports__,__webpack_require__){"use strict";var nextcloud_vue__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(3),nextcloud_vue__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(nextcloud_vue__WEBPACK_IMPORTED_MODULE_0__),v_tooltip__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4),vue_click_outside__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(5),vue_click_outside__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(vue_click_outside__WEBPACK_IMPORTED_MODULE_2__);__webpack_exports__.a={name:"root",components:{Multiselect:nextcloud_vue__WEBPACK_IMPORTED_MODULE_0__.Multiselect,PopoverMenu:nextcloud_vue__WEBPACK_IMPORTED_MODULE_0__.PopoverMenu},directives:{ClickOutside:vue_click_outside__WEBPACK_IMPORTED_MODULE_2___default(),tooltip:v_tooltip__WEBPACK_IMPORTED_MODULE_1__.a},data:function(){return{newVersionString:"",lastCheckedDate:"",isUpdateChecked:!1,updaterEnabled:!0,versionIsEol:!1,downloadLink:"",isNewVersionAvailable:!1,updateServerURL:"",changelogURL:"",whatsNewData:[],currentChannel:"",channels:[],notifyGroups:"",availableGroups:[],isDefaultUpdateServerURL:!0,enableChangeWatcher:!1,availableAppUpdates:[],missingAppUpdates:[],appStoreFailed:!1,appStoreDisabled:!1,isListFetched:!1,hideMissingUpdates:!1,hideAvailableUpdates:!0,openedWhatsNew:!1}},_$el:null,_$releaseChannel:null,_$notifyGroups:null,watch:{notifyGroups:function(t){if(this.enableChangeWatcher){var e=[];_.each(t,function(t){e.push(t.value)}),OCP.AppConfig.setValue("updatenotification","notify_groups",JSON.stringify(e))}},isNewVersionAvailable:function(){this.isNewVersionAvailable&&$.ajax({url:OC.linkToOCS("apps/updatenotification/api/v1/applist",2)+this.newVersion,type:"GET",beforeSend:function(t){t.setRequestHeader("Accept","application/json")},success:function(t){this.availableAppUpdates=t.ocs.data.available,this.missingAppUpdates=t.ocs.data.missing,this.isListFetched=!0,this.appStoreFailed=!1}.bind(this),error:function(t){this.availableAppUpdates=[],this.missingAppUpdates=[],this.appStoreDisabled=t.responseJSON.ocs.data.appstore_disabled,this.isListFetched=!0,this.appStoreFailed=!0}.bind(this)})}},computed:{newVersionAvailableString:function(){return t("updatenotification","A new version is available: <strong>{newVersionString}</strong>",{newVersionString:this.newVersionString})},lastCheckedOnString:function(){return t("updatenotification","Checked on {lastCheckedDate}",{lastCheckedDate:this.lastCheckedDate})},statusText:function(){return this.isListFetched?this.appStoreDisabled?t("updatenotification","Please make sure your config.php does not set <samp>appstoreenabled</samp> to false."):this.appStoreFailed?t("updatenotification","Could not connect to the appstore or the appstore returned no updates at all. Search manually for updates or make sure your server has access to the internet and can connect to the appstore."):0===this.missingAppUpdates.length?t("updatenotification","<strong>All</strong> apps have an update for this version available",this):n("updatenotification","<strong>%n</strong> app has no update for this version available","<strong>%n</strong> apps have no update for this version available",this.missingAppUpdates.length):t("updatenotification","Checking apps for compatible updates")},productionInfoString:function(){return t("updatenotification","<strong>production</strong> will always provide the latest patch level, but not update to the next major release immediately. That update usually happens with the second minor release (x.0.2).")},stableInfoString:function(){return t("updatenotification","<strong>stable</strong> is the most recent stable version. It is suited for regular use and will always update to the latest major version.")},betaInfoString:function(){return t("updatenotification","<strong>beta</strong> is a pre-release version only for testing new features, not for production environments.")},whatsNew:function(){if(0===this.whatsNewData.length)return null;var e=[];for(var n in this.whatsNewData)e[n]={icon:"icon-checkmark",longtext:this.whatsNewData[n]};return this.changelogURL&&e.push({href:this.changelogURL,text:t("updatenotificaiton","View changelog"),icon:"icon-link",target:"_blank",action:""}),e}},methods:{clickUpdaterButton:function(){$.ajax({url:OC.generateUrl("/apps/updatenotification/credentials")}).success(function(data){$.ajax({url:OC.getRootPath()+"/updater/",headers:{"X-Updater-Auth":data},method:"POST",success:function(data){if("false"!==data){var body=$("body");$("head").remove(),body.html(data);var dom=$(data);dom.filter("script").each(function(){eval(this.text||this.textContent||this.innerHTML||"")}),body.removeAttr("id"),body.attr("id","body-settings")}},error:function(){OC.Notification.showTemporary(t("updatenotification","Could not start updater, please try the manual update")),this.updaterEnabled=!1}.bind(this)})}.bind(this))},changeReleaseChannel:function(){this.currentChannel=this._$releaseChannel.val(),$.ajax({url:OC.generateUrl("/apps/updatenotification/channel"),type:"POST",data:{channel:this.currentChannel},success:function(t){OC.msg.finishedAction("#channel_save_msg",t)}})},toggleHideMissingUpdates:function(){this.hideMissingUpdates=!this.hideMissingUpdates},toggleHideAvailableUpdates:function(){this.hideAvailableUpdates=!this.hideAvailableUpdates},toggleMenu:function(){this.openedWhatsNew=!this.openedWhatsNew},hideMenu:function(){this.openedWhatsNew=!1}},beforeMount:function(){var t=JSON.parse($("#updatenotification").attr("data-json"));this.newVersion=t.newVersion,this.newVersionString=t.newVersionString,this.lastCheckedDate=t.lastChecked,this.isUpdateChecked=t.isUpdateChecked,this.updaterEnabled=t.updaterEnabled,this.downloadLink=t.downloadLink,this.isNewVersionAvailable=t.isNewVersionAvailable,this.updateServerURL=t.updateServerURL,this.currentChannel=t.currentChannel,this.channels=t.channels,this.notifyGroups=t.notifyGroups,this.isDefaultUpdateServerURL=t.isDefaultUpdateServerURL,this.versionIsEol=t.versionIsEol,t.changes&&t.changes.changelogURL&&(this.changelogURL=t.changes.changelogURL),t.changes&&t.changes.whatsNew&&(t.changes.whatsNew.admin&&(this.whatsNewData=this.whatsNewData.concat(t.changes.whatsNew.admin)),this.whatsNewData=this.whatsNewData.concat(t.changes.whatsNew.regular))},mounted:function(){this._$el=$(this.$el),this._$releaseChannel=this._$el.find("#release-channel"),this._$notifyGroups=this._$el.find("#oca_updatenotification_groups_list"),this._$notifyGroups.on("change",function(){this.$emit("input")}.bind(this)),$.ajax({url:OC.linkToOCS("cloud",2)+"/groups",dataType:"json",success:function(t){var e=[];$.each(t.ocs.data.groups,function(t,n){e.push({value:n,label:n})}),this.availableGroups=e,this.enableChangeWatcher=!0}.bind(this)})}}},function(t,e,n){"use strict";(function(t,n){
+!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/js/",n(n.s=9)}([function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(module,__webpack_exports__,__webpack_require__){"use strict";var nextcloud_vue__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(3),nextcloud_vue__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(nextcloud_vue__WEBPACK_IMPORTED_MODULE_0__),v_tooltip__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4),vue_click_outside__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(5),vue_click_outside__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(vue_click_outside__WEBPACK_IMPORTED_MODULE_2__);__webpack_exports__.a={name:"root",components:{Multiselect:nextcloud_vue__WEBPACK_IMPORTED_MODULE_0__.Multiselect,PopoverMenu:nextcloud_vue__WEBPACK_IMPORTED_MODULE_0__.PopoverMenu},directives:{ClickOutside:vue_click_outside__WEBPACK_IMPORTED_MODULE_2___default(),tooltip:v_tooltip__WEBPACK_IMPORTED_MODULE_1__.a},data:function(){return{newVersionString:"",lastCheckedDate:"",isUpdateChecked:!1,updaterEnabled:!0,versionIsEol:!1,downloadLink:"",isNewVersionAvailable:!1,updateServerURL:"",changelogURL:"",whatsNewData:[],currentChannel:"",channels:[],notifyGroups:"",availableGroups:[],isDefaultUpdateServerURL:!0,enableChangeWatcher:!1,availableAppUpdates:[],missingAppUpdates:[],appStoreFailed:!1,appStoreDisabled:!1,isListFetched:!1,hideMissingUpdates:!1,hideAvailableUpdates:!0,openedWhatsNew:!1}},_$el:null,_$releaseChannel:null,_$notifyGroups:null,watch:{notifyGroups:function(t){if(this.enableChangeWatcher){var e=[];_.each(t,function(t){e.push(t.value)}),OCP.AppConfig.setValue("updatenotification","notify_groups",JSON.stringify(e))}},isNewVersionAvailable:function(){this.isNewVersionAvailable&&$.ajax({url:OC.linkToOCS("apps/updatenotification/api/v1/applist",2)+this.newVersion,type:"GET",beforeSend:function(t){t.setRequestHeader("Accept","application/json")},success:function(t){this.availableAppUpdates=t.ocs.data.available,this.missingAppUpdates=t.ocs.data.missing,this.isListFetched=!0,this.appStoreFailed=!1}.bind(this),error:function(t){this.availableAppUpdates=[],this.missingAppUpdates=[],this.appStoreDisabled=t.responseJSON.ocs.data.appstore_disabled,this.isListFetched=!0,this.appStoreFailed=!0}.bind(this)})}},computed:{newVersionAvailableString:function(){return t("updatenotification","A new version is available: <strong>{newVersionString}</strong>",{newVersionString:this.newVersionString})},lastCheckedOnString:function(){return t("updatenotification","Checked on {lastCheckedDate}",{lastCheckedDate:this.lastCheckedDate})},statusText:function(){return this.isListFetched?this.appStoreDisabled?t("updatenotification","Please make sure your config.php does not set <samp>appstoreenabled</samp> to false."):this.appStoreFailed?t("updatenotification","Could not connect to the appstore or the appstore returned no updates at all. Search manually for updates or make sure your server has access to the internet and can connect to the appstore."):0===this.missingAppUpdates.length?t("updatenotification","<strong>All</strong> apps have an update for this version available",this):n("updatenotification","<strong>%n</strong> app has no update for this version available","<strong>%n</strong> apps have no update for this version available",this.missingAppUpdates.length):t("updatenotification","Checking apps for compatible updates")},productionInfoString:function(){return t("updatenotification","<strong>production</strong> will always provide the latest patch level, but not update to the next major release immediately. That update usually happens with the second minor release (x.0.2).")},stableInfoString:function(){return t("updatenotification","<strong>stable</strong> is the most recent stable version. It is suited for regular use and will always update to the latest major version.")},betaInfoString:function(){return t("updatenotification","<strong>beta</strong> is a pre-release version only for testing new features, not for production environments.")},whatsNew:function(){if(0===this.whatsNewData.length)return null;var e=[];for(var n in this.whatsNewData)e[n]={icon:"icon-checkmark",longtext:this.whatsNewData[n]};return this.changelogURL&&e.push({href:this.changelogURL,text:t("updatenotificaiton","View changelog"),icon:"icon-link",target:"_blank",action:""}),e}},methods:{clickUpdaterButton:function(){$.ajax({url:OC.generateUrl("/apps/updatenotification/credentials")}).success(function(data){$.ajax({url:OC.getRootPath()+"/updater/",headers:{"X-Updater-Auth":data},method:"POST",success:function(data){if("false"!==data){var body=$("body");$("head").remove(),body.html(data);var dom=$(data);dom.filter("script").each(function(){eval(this.text||this.textContent||this.innerHTML||"")}),body.removeAttr("id"),body.attr("id","body-settings")}},error:function(){OC.Notification.showTemporary(t("updatenotification","Could not start updater, please try the manual update")),this.updaterEnabled=!1}.bind(this)})}.bind(this))},changeReleaseChannel:function(){this.currentChannel=this._$releaseChannel.val(),$.ajax({url:OC.generateUrl("/apps/updatenotification/channel"),type:"POST",data:{channel:this.currentChannel},success:function(t){OC.msg.finishedAction("#channel_save_msg",t)}})},toggleHideMissingUpdates:function(){this.hideMissingUpdates=!this.hideMissingUpdates},toggleHideAvailableUpdates:function(){this.hideAvailableUpdates=!this.hideAvailableUpdates},toggleMenu:function(){this.openedWhatsNew=!this.openedWhatsNew},hideMenu:function(){this.openedWhatsNew=!1}},beforeMount:function(){var t=JSON.parse($("#updatenotification").attr("data-json"));this.newVersion=t.newVersion,this.newVersionString=t.newVersionString,this.lastCheckedDate=t.lastChecked,this.isUpdateChecked=t.isUpdateChecked,this.updaterEnabled=t.updaterEnabled,this.downloadLink=t.downloadLink,this.isNewVersionAvailable=t.isNewVersionAvailable,this.updateServerURL=t.updateServerURL,this.currentChannel=t.currentChannel,this.channels=t.channels,this.notifyGroups=t.notifyGroups,this.isDefaultUpdateServerURL=t.isDefaultUpdateServerURL,this.versionIsEol=t.versionIsEol,t.changes&&t.changes.changelogURL&&(this.changelogURL=t.changes.changelogURL),t.changes&&t.changes.whatsNew&&(t.changes.whatsNew.admin&&(this.whatsNewData=this.whatsNewData.concat(t.changes.whatsNew.admin)),this.whatsNewData=this.whatsNewData.concat(t.changes.whatsNew.regular))},mounted:function(){this._$el=$(this.$el),this._$releaseChannel=this._$el.find("#release-channel"),this._$notifyGroups=this._$el.find("#oca_updatenotification_groups_list"),this._$notifyGroups.on("change",function(){this.$emit("input")}.bind(this)),$.ajax({url:OC.linkToOCS("cloud",2)+"/groups",dataType:"json",success:function(t){var e=[];$.each(t.ocs.data.groups,function(t,n){e.push({value:n,label:n})}),this.availableGroups=e,this.enableChangeWatcher=!0}.bind(this)})}}},function(t,e,n){"use strict";(function(t,n){
/*!
* Vue.js v2.5.17
* (c) 2014-2018 Evan You