nextcloud/settings/js/vue-5.js

2 lines
23 KiB
JavaScript
Raw Normal View History

(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{53:function(e,a,s){"use strict";s.r(a);var i=s(36),n=s(46),p=s.n(n),r={name:"appScore",props:["score"],computed:{scoreImage:function(){var t="rating/s"+Math.round(10*this.score)+".svg";return OC.imagePath("core",t)}}},o=s(6),l=Object(o.a)(r,function(){var t=this.$createElement;return(this._self._c||t)("img",{staticClass:"app-score-image",attrs:{src:this.scoreImage}})},[],!1,null,null,null).exports,c={mounted:function(){this.app.groups.length>0&&(this.groupCheckedAppsData=!0)},computed:{appGroups:function(){return this.app.groups.map(function(t){return{id:t,name:t}})},loading:function(){var t=this;return function(e){return t.$store.getters.loading(e)}},installing:function(){return this.$store.getters.loading("install")},enableButtonText:function(){return this.app.needsDownload?t("settings","Download and enable"):t("settings","Enable")},enableButtonTooltip:function(){return!!this.app.needsDownload&&t("settings","The app will be downloaded from the app store")}},methods:{asyncFindGroup:function(t){return this.$store.dispatch("getGroups",{search:t,limit:5,offset:0})},isLimitedToGroups:function(t){return!(!this.app.groups.length&&!this.groupCheckedAppsData)},setGroupLimit:function(){this.groupCheckedAppsData||this.$store.dispatch("enableApp",{appId:this.app.id,groups:[]})},canLimitToGroups:function(t){return!(t.types&&t.types.includes("filesystem")||t.types.includes("prelogin")||t.types.includes("authentication")||t.types.includes("logging")||t.types.includes("prevent_group_restriction"))},addGroupLimitation:function(t){var e=this.app.groups.concat([]).concat([t.id]);this.$store.dispatch("enableApp",{appId:this.app.id,groups:e})},removeGroupLimitation:function(t){var e=this.app.groups.concat([]),a=e.indexOf(t.id);a>-1&&e.splice(a,1),this.$store.dispatch("enableApp",{appId:this.app.id,groups:e})},enable:function(t){this.$store.dispatch("enableApp",{appId:t,groups:[]}).then(function(t){OC.Settings.Apps.rebuildNavigation()}).catch(function(t){OC.Notification.show(t)})},disable:function(t){this.$store.dispatch("disableApp",{appId:t}).then(function(t){OC.Settings.Apps.rebuildNavigation()}).catch(function(t){OC.Notification.show(t)})},remove:function(t){this.$store.dispatch("uninstallApp",{appId:t}).then(function(t){OC.Settings.Apps.rebuildNavigation()}).catch(function(t){OC.Notification.show(t)})},install:function(t){this.$store.dispatch("enableApp",{appId:t}).then(function(t){OC.Settings.Apps.rebuildNavigation()}).catch(function(t){OC.Notification.show(t)})},update:function(t){this.$store.dispatch("updateApp",{appId:t}).then(function(t){OC.Settings.Apps.rebuildNavigation()}).catch(function(t){OC.Notification.show(t)})}}},u=Object(o.a)(c,void 0,void 0,!1,null,null,null).exports,d={name:"svgFilterMixin",mounted:function(){this.filterId="invertIconApps"+Math.floor(100*Math.random())+(new Date).getSeconds()+(new Date).getMilliseconds()},computed:{filterUrl:function(){return"url(#".concat(this.filterId,")")}},data:function(){return{filterId:""}}},g=Object(o.a)(d,void 0,void 0,!1,null,null,null).exports,h={name:"appItem",mixins:[u,g],props:{app:{},category:{},listView:{type:Boolean,default:!0}},watch:{"$route.params.id":function(t){this.isSelected=this.app.id===t}},components:{Multiselect:p.a,AppScore:l},data:function(){return{isSelected:!1,scrolled:!1}},mounted:function(){this.isSelected=this.app.id===this.$route.params.id},computed:{},watchers:{},methods:{showAppDetails:function(t){"INPUT"!==t.currentTarget.tagName&&"A"!==t.currentTarget.tagName&&this.$router.push({name:"apps-details",params:{category:this.category,id:this.app.id}})},prefix:function(t,e){return t+"_"+e}}},v=Object(o.a)(h,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"section",class:{selected:t.isSelected},on:{click:t.showAppDetails}},[a("div",{staticClass:"app-image app-image-icon",on:{click:t.showAppDetails}},[t.listView&&!t.app.preview||!t.listView&&!t.app.screenshot?a("div",{staticClass:"icon-settings-dark"}):t._e(),t._v(" "),t.listView&&t.app.preview?a("svg",{attrs:{w
//# sourceMappingURL=vue-5.js.map