(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{68:function(e,t){function s(e){return"function"==typeof e.value||(console.warn("[Vue-click-outside:] provided expression",e.expression,"is not a function."),!1)}function i(e){return void 0!==e.componentInstance&&e.componentInstance.$isServer}e.exports={bind:function(e,t,a){function n(t){if(a.context){var s=t.path||t.composedPath&&t.composedPath();s&&s.length>0&&s.unshift(t.target),e.contains(t.target)||function(e,t){if(!e||!t)return!1;for(var s=0,i=t.length;ss.parts.length&&(i.parts.length=s.parts.length)}else{for(var o=[],a=0;a',"\nscript:\n...\ninfiniteHandler($state) {\n ajax('https://www.example.com/api/news')\n .then((res) => {\n if (res.data.length) {\n $state.loaded();\n } else {\n $state.complete();\n }\n });\n}\n...","","more details: https://github.com/PeachScript/vue-infinite-loading/issues/57#issuecomment-324370549"].join("\n"),INFINITE_EVENT:"[Vue-infinite-loading warn]: `:on-infinite` property will be deprecated soon, please use `@infinite` event instead."},n={INFINITE_LOOP:["[Vue-infinite-loading error]: executed the callback function more than 10 times for a short time, it looks like searched a wrong scroll wrapper that doest not has fixed height or maximum height, please check it. If you want to force to set a element as scroll wrapper ranther than automatic searching, you can do this:",'\n\x3c!-- add a special attribute for the real scroll wrapper --\x3e\n
\n ...\n \x3c!-- set force-use-infinite-wrapper to true --\x3e\n \n
\n ',"more details: https://github.com/PeachScript/vue-infinite-loading/issues/55#issuecomment-316934169"].join("\n")},o=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e={passive:!0}}});window.addEventListener("testpassive",t,t),window.remove("testpassive",t,t)}catch(e){}return e}();t.a={name:"InfiniteLoading",data:function(){return{scrollParent:null,scrollHandler:null,isLoading:!1,isComplete:!1,isFirstLoad:!0,inThrottle:!1,throttleLimit:50,infiniteLoopChecked:!1,infiniteLoopTimer:null,continuousCallTimes:0}},components:{Spinner:i.a},computed:{isNoResults:{cache:!1,get:function(){var e=this.$slots["no-results"],t=e&&e[0].elm&&""===e[0].elm.textContent;return!this.isLoading&&this.isComplete&&this.isFirstLoad&&!t}},isNoMore:{cache:!1,get:function(){var e=this.$slots["no-more"],t=e&&e[0].elm&&""===e[0].elm.textContent;return!this.isLoading&&this.isComplete&&!this.isFirstLoad&&!t}}},props:{distance:{type:Number,default:100},onInfinite:Function,spinner:String,direction:{type:String,default:"bottom"},forceUseInfiniteWrapper:null},mounted:function(){var e=this;this.scrollParent=this.getScrollParent(),this.scrollHandler=function(e){var t=this;this.isLoading||(e&&e.constructor===Event?this.inThrottle||(this.inThrottle=!0,setTimeout(function(){t.attemptLoad(),t.inThrottle=!1},this.throttleLimit)):this.attemptLoad())}.bind(this),setTimeout(this.scrollHandler,1),this.scrollParent.addEventListener("scroll",this.scrollHandler,o),this.$on("$InfiniteLoading:loaded",function(t){e.isFirstLoad=!1,e.isLoading&&e.$nextTick(e.attemptLoad.bind(null,!0)),t&&t.target===e||console.warn(a.STATE_CHANGER)}),this.$on("$InfiniteLoading:complete",function(t){e.isLoading=!1,e.isComplete=!0,e.$nextTick(function(){e.$forceUpdate()}),e.scrollParent.removeEventListener("scroll",e.scrollHandler,o),t&&t.target===e||console.warn(a.STATE_CHANGER)}),this.$on("$InfiniteLoading:reset",function(){e.isLoading=!1,e.isComplete=!1,e.isFirstLoad=!0,e.inThrottle=!1,e.scrollParent.addEventListener("scroll",e.scrollHandler,o),setTimeout(e.scrollHandler,1)}),this.onInfinite&&console.warn(a.INFINITE_EVENT),this.stateChanger={loaded:function(){e.$emit("$InfiniteLoading:loaded",{target:e})},complete:function(){e.$emit("$InfiniteLoading:complete",{target:e})},reset:function(){e.$emit("$InfiniteLoading:reset",{target:e})}},this.$watch("forceUseInfiniteWrapper",function(){e.scrollParent=e.getScrollParent()})},deactivated:function(){this.isLoading=!1,this.scrollParent.removeEventListener("scroll",this.scrollHandler,o)},activated:function(){this.scrollParent.addEventListener("scroll",this.scrollHandler,o)},methods:{attemptLoad:function(e){var t=this,s=this.getCurrentDistance();!this.isComplete&&s<=this.distance&&this.$el.offsetWidth+this.$el.offsetHeight>0?(this.isLoading=!0,"function"==typeof this.onInfinite?this.onInfinite.call(null,this.stateChanger):this.$emit("infinite",this.stateChanger),!e||this.forceUseInfiniteWrapper||this.infiniteLoopChecked||(this.continuousCallTimes+=1,clearTimeout(this.infiniteLoopTimer),this.infiniteLoopTimer=setTimeout(function(){t.infiniteLoopChecked=!0},1e3),this.continuousCallTimes>10&&(console.error(n.INFINITE_LOOP),this.infiniteLoopChecked=!0))):this.isLoading=!1},getCurrentDistance:function(){return"top"===this.direction?isNaN(this.scrollParent.scrollTop)?this.scrollParent.pageYOffset:this.scrollParent.scrollTop:this.$el.getBoundingClientRect().top-(this.scrollParent===window?window.innerHeight:this.scrollParent.getBoundingClientRect().bottom)},getScrollParent:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.$el,t=void 0;return"BODY"===e.tagName?t=window:!this.forceUseInfiniteWrapper&&["scroll","auto"].indexOf(getComputedStyle(e).overflowY)>-1?t=e:(e.hasAttribute("infinite-wrapper")||e.hasAttribute("data-infinite-wrapper"))&&(t=e),t||this.getScrollParent(e.parentNode)}},destroyed:function(){this.isComplete||this.scrollParent.removeEventListener("scroll",this.scrollHandler,o)}}},function(e,t,s){"use strict";var i=s(12),a=s(13),n=s(2),o=function(e){s(10)},r=n(i.a,a.a,o,"data-v-10a220cc",null);t.a=r.exports},function(e,t,s){var i=s(11);"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals),s(1)("2914e7ad",i,!0)},function(e,t,s){(e.exports=s(0)(void 0)).push([e.i,'.loading-wave-dots[data-v-10a220cc]{position:relative}.loading-wave-dots[data-v-10a220cc] .wave-item{position:absolute;top:50%;left:50%;display:inline-block;margin-top:-4px;width:8px;height:8px;border-radius:50%;-webkit-animation:loading-wave-dots-data-v-10a220cc linear 2.8s infinite;animation:loading-wave-dots-data-v-10a220cc linear 2.8s infinite}.loading-wave-dots[data-v-10a220cc] .wave-item:first-child{margin-left:-36px}.loading-wave-dots[data-v-10a220cc] .wave-item:nth-child(2){margin-left:-20px;-webkit-animation-delay:.14s;animation-delay:.14s}.loading-wave-dots[data-v-10a220cc] .wave-item:nth-child(3){margin-left:-4px;-webkit-animation-delay:.28s;animation-delay:.28s}.loading-wave-dots[data-v-10a220cc] .wave-item:nth-child(4){margin-left:12px;-webkit-animation-delay:.42s;animation-delay:.42s}.loading-wave-dots[data-v-10a220cc] .wave-item:last-child{margin-left:28px;-webkit-animation-delay:.56s;animation-delay:.56s}@-webkit-keyframes loading-wave-dots-data-v-10a220cc{0%{-webkit-transform:translateY(0);transform:translateY(0);background:#bbb}10%{-webkit-transform:translateY(-6px);transform:translateY(-6px);background:#999}20%{-webkit-transform:translateY(0);transform:translateY(0);background:#bbb}to{-webkit-transform:translateY(0);transform:translateY(0);background:#bbb}}@keyframes loading-wave-dots-data-v-10a220cc{0%{-webkit-transform:translateY(0);transform:translateY(0);background:#bbb}10%{-webkit-transform:translateY(-6px);transform:translateY(-6px);background:#999}20%{-webkit-transform:translateY(0);transform:translateY(0);background:#bbb}to{-webkit-transform:translateY(0);transform:translateY(0);background:#bbb}}.loading-circles[data-v-10a220cc] .circle-item{width:5px;height:5px;-webkit-animation:loading-circles-data-v-10a220cc linear .75s infinite;animation:loading-circles-data-v-10a220cc linear .75s infinite}.loading-circles[data-v-10a220cc] .circle-item:first-child{margin-top:-14.5px;margin-left:-2.5px}.loading-circles[data-v-10a220cc] .circle-item:nth-child(2){margin-top:-11.26px;margin-left:6.26px}.loading-circles[data-v-10a220cc] .circle-item:nth-child(3){margin-top:-2.5px;margin-left:9.5px}.loading-circles[data-v-10a220cc] .circle-item:nth-child(4){margin-top:6.26px;margin-left:6.26px}.loading-circles[data-v-10a220cc] .circle-item:nth-child(5){margin-top:9.5px;margin-left:-2.5px}.loading-circles[data-v-10a220cc] .circle-item:nth-child(6){margin-top:6.26px;margin-left:-11.26px}.loading-circles[data-v-10a220cc] .circle-item:nth-child(7){margin-top:-2.5px;margin-left:-14.5px}.loading-circles[data-v-10a220cc] .circle-item:last-child{margin-top:-11.26px;margin-left:-11.26px}@-webkit-keyframes loading-circles-data-v-10a220cc{0%{background:#dfdfdf}90%{background:#505050}to{background:#dfdfdf}}@keyframes loading-circles-data-v-10a220cc{0%{background:#dfdfdf}90%{background:#505050}to{background:#dfdfdf}}.loading-bubbles[data-v-10a220cc] .bubble-item{background:#666;-webkit-animation:loading-bubbles-data-v-10a220cc linear .75s infinite;animation:loading-bubbles-data-v-10a220cc linear .75s infinite}.loading-bubbles[data-v-10a220cc] .bubble-item:first-child{margin-top:-12.5px;margin-left:-.5px}.loading-bubbles[data-v-10a220cc] .bubble-item:nth-child(2){margin-top:-9.26px;margin-left:8.26px}.loading-bubbles[data-v-10a220cc] .bubble-item:nth-child(3){margin-top:-.5px;margin-left:11.5px}.loading-bubbles[data-v-10a220cc] .bubble-item:nth-child(4){margin-top:8.26px;margin-left:8.26px}.loading-bubbles[data-v-10a220cc] .bubble-item:nth-child(5){margin-top:11.5px;margin-left:-.5px}.loading-bubbles[data-v-10a220cc] .bubble-item:nth-child(6){margin-top:8.26px;margin-left:-9.26px}.loading-bubbles[data-v-10a220cc] .bubble-item:nth-child(7){margin-top:-.5px;margin-left:-12.5px}.loading-bubbles[data-v-10a220cc] .bubble-item:last-child{margin-top:-9.26px;margin-left:-9.26px}@-webkit-keyframes loading-bubbles-data-v-10a220cc{0%{width:1px;height:1px;box-shadow:0 0 0 3px #666}90%{width:1px;height:1px;box-shadow:0 0 0 0 #666}to{width:1px;height:1px;box-shadow:0 0 0 3px #666}}@keyframes loading-bubbles-data-v-10a220cc{0%{width:1px;height:1px;box-shadow:0 0 0 3px #666}90%{width:1px;height:1px;box-shadow:0 0 0 0 #666}to{width:1px;height:1px;box-shadow:0 0 0 3px #666}}.loading-default[data-v-10a220cc]{position:relative;border:1px solid #999;-webkit-animation:loading-rotating-data-v-10a220cc ease 1.5s infinite;animation:loading-rotating-data-v-10a220cc ease 1.5s infinite}.loading-default[data-v-10a220cc]:before{content:"";position:absolute;display:block;top:0;left:50%;margin-top:-3px;margin-left:-3px;width:6px;height:6px;background-color:#999;border-radius:50%}.loading-spiral[data-v-10a220cc]{border:2px solid #777;border-right-color:transparent;-webkit-animation:loading-rotating-data-v-10a220cc linear .85s infinite;animation:loading-rotating-data-v-10a220cc linear .85s infinite}@-webkit-keyframes loading-rotating-data-v-10a220cc{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes loading-rotating-data-v-10a220cc{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.loading-bubbles[data-v-10a220cc],.loading-circles[data-v-10a220cc]{position:relative}.loading-bubbles[data-v-10a220cc] .bubble-item,.loading-circles[data-v-10a220cc] .circle-item{position:absolute;top:50%;left:50%;display:inline-block;border-radius:50%}.loading-bubbles[data-v-10a220cc] .bubble-item:nth-child(2),.loading-circles[data-v-10a220cc] .circle-item:nth-child(2){-webkit-animation-delay:93ms;animation-delay:93ms}.loading-bubbles[data-v-10a220cc] .bubble-item:nth-child(3),.loading-circles[data-v-10a220cc] .circle-item:nth-child(3){-webkit-animation-delay:.186s;animation-delay:.186s}.loading-bubbles[data-v-10a220cc] .bubble-item:nth-child(4),.loading-circles[data-v-10a220cc] .circle-item:nth-child(4){-webkit-animation-delay:.279s;animation-delay:.279s}.loading-bubbles[data-v-10a220cc] .bubble-item:nth-child(5),.loading-circles[data-v-10a220cc] .circle-item:nth-child(5){-webkit-animation-delay:.372s;animation-delay:.372s}.loading-bubbles[data-v-10a220cc] .bubble-item:nth-child(6),.loading-circles[data-v-10a220cc] .circle-item:nth-child(6){-webkit-animation-delay:.465s;animation-delay:.465s}.loading-bubbles[data-v-10a220cc] .bubble-item:nth-child(7),.loading-circles[data-v-10a220cc] .circle-item:nth-child(7){-webkit-animation-delay:.558s;animation-delay:.558s}.loading-bubbles[data-v-10a220cc] .bubble-item:last-child,.loading-circles[data-v-10a220cc] .circle-item:last-child{-webkit-animation-delay:.651s;animation-delay:.651s}',""])},function(e,t,s){"use strict";var i={BUBBLES:{render:function(e){return e("span",{attrs:{class:"loading-bubbles"}},Array.apply(Array,Array(8)).map(function(){return e("span",{attrs:{class:"bubble-item"}})}))}},CIRCLES:{render:function(e){return e("span",{attrs:{class:"loading-circles"}},Array.apply(Array,Array(8)).map(function(){return e("span",{attrs:{class:"circle-item"}})}))}},DEFAULT:{render:function(e){return e("i",{attrs:{class:"loading-default"}})}},SPIRAL:{render:function(e){return e("i",{attrs:{class:"loading-spiral"}})}},WAVEDOTS:{render:function(e){return e("span",{attrs:{class:"loading-wave-dots"}},Array.apply(Array,Array(5)).map(function(){return e("span",{attrs:{class:"wave-item"}})}))}}};t.a={name:"spinner",computed:{spinnerView:function(){return i[(this.spinner||"").toUpperCase()]||i.DEFAULT}},props:{spinner:String}}},function(e,t,s){"use strict";var i={render:function(){var e=this,t=e.$createElement;return(e._self._c||t)(e.spinnerView,{tag:"component"})},staticRenderFns:[]};t.a=i},function(e,t,s){"use strict";var i={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"infinite-loading-container"},[s("div",{directives:[{name:"show",rawName:"v-show",value:e.isLoading,expression:"isLoading"}]},[e._t("spinner",[s("spinner",{attrs:{spinner:e.spinner}})])],2),e._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:e.isNoResults,expression:"isNoResults"}],staticClass:"infinite-status-prompt"},[e._t("no-results",[e._v("No results :(")])],2),e._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:e.isNoMore,expression:"isNoMore"}],staticClass:"infinite-status-prompt"},[e._t("no-more",[e._v("No more data :)")])],2)])},staticRenderFns:[]};t.a=i}])},77:function(e,s,i){"use strict";i.r(s);var a=i(2),n=i(67),o=i.n(n),r=i(16),l=i(68),u=i.n(l),d=i(40);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}a.default.use(d.a);var g={name:"userRow",props:["user","settings","groups","subAdminsGroups","quotaOptions","showConfig","languages","externalActions"],components:{PopoverMenu:r.PopoverMenu,Multiselect:r.Multiselect},directives:{ClickOutside:u.a},mounted:function(){},data:function(){return{rand:parseInt(1e3*Math.random()),openedMenu:!1,feedbackMessage:"",loading:{all:!1,displayName:!1,password:!1,mailAddress:!1,groups:!1,subadmins:!1,quota:!1,delete:!1,disable:!1,languages:!1}}},computed:{userActions:function(){var e=[{icon:"icon-delete",text:t("settings","Delete user"),action:this.deleteUser},{icon:this.user.enabled?"icon-close":"icon-add",text:this.user.enabled?t("settings","Disable user"):t("settings","Enable user"),action:this.enableDisableUser}];return null!==this.user.email&&""!==this.user.email&&e.push({icon:"icon-mail",text:t("settings","Resend welcome email"),action:this.sendWelcomeMail}),e.concat(this.externalActions)},userGroups:function(){var e=this,t=this.groups.filter(function(t){return e.user.groups.includes(t.id)});return t},userSubAdminsGroups:function(){var e=this,t=this.subAdminsGroups.filter(function(t){return e.user.subadmin.includes(t.id)});return t},availableGroups:function(){var e=this;return this.groups.map(function(t){var s=Object.assign({},t);return s.$isDisabled=!1===t.canAdd&&!e.user.groups.includes(t.id)||!1===t.canRemove&&e.user.groups.includes(t.id),s})},usedSpace:function(){return this.user.quota.used?t("settings","{size} used",{size:OC.Util.humanFileSize(this.user.quota.used)}):t("settings","{size} used",{size:OC.Util.humanFileSize(0)})},usedQuota:function(){var e=this.user.quota.quota;e>0?e=Math.min(100,Math.round(this.user.quota.used/e*100)):e=95*(1-1/(this.user.quota.used/(10*Math.pow(2,30))+1));return isNaN(e)?0:e},userQuota:function(){if(this.user.quota.quota>=0){var e=OC.Util.humanFileSize(this.user.quota.quota),t=this.quotaOptions.find(function(t){return t.id===e});return t||{id:e,label:e}}return"default"===this.user.quota.quota?this.quotaOptions[0]:this.quotaOptions[1]},minPasswordLength:function(){return this.$store.getters.getPasswordPolicyMinLength},userLanguage:function(){var e=this,t=this.languages[0].languages.concat(this.languages[1].languages).find(function(t){return t.code===e.user.language});return"object"!==c(t)&&""!==this.user.language?{code:this.user.language,name:this.user.language}:""!==this.user.language&&t}},methods:{toggleMenu:function(){this.openedMenu=!this.openedMenu},hideMenu:function(){this.openedMenu=!1},generateAvatar:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:32;return OC.generateUrl("/avatar/{user}/{size}?v={version}",{user:e,size:t,version:oc_userconfig.avatar.version})},formatGroupsTitle:function(e){return e.map(function(e){return e.name}).slice(2).join(", ")},deleteUser:function(){var e=this;this.loading.delete=!0,this.loading.all=!0;var t=this.user.id;return this.$store.dispatch("deleteUser",t).then(function(){e.loading.delete=!1,e.loading.all=!1})},enableDisableUser:function(){var e=this;this.loading.delete=!0,this.loading.all=!0;var t=this.user.id,s=!this.user.enabled;return this.$store.dispatch("enableDisableUser",{userid:t,enabled:s}).then(function(){e.loading.delete=!1,e.loading.all=!1})},updateDisplayName:function(){var e=this,t=this.$refs.displayName.value;this.loading.displayName=!0,this.$store.dispatch("setUserData",{userid:this.user.id,key:"displayname",value:t}).then(function(){e.loading.displayName=!1,e.$refs.displayName.value=t})},updatePassword:function(){var e=this,t=this.$refs.password.value;this.loading.password=!0,this.$store.dispatch("setUserData",{userid:this.user.id,key:"password",value:t}).then(function(){e.loading.password=!1,e.$refs.password.value=""})},updateEmail:function(){var e=this,t=this.$refs.mailAddress.value;this.loading.mailAddress=!0,this.$store.dispatch("setUserData",{userid:this.user.id,key:"email",value:t}).then(function(){e.loading.mailAddress=!1,e.$refs.mailAddress.value=t})},createGroup:function(e){var t=this;return this.loading={groups:!0,subadmins:!0},this.$store.dispatch("addGroup",e).then(function(){t.loading={groups:!1,subadmins:!1};var s=t.user.id;t.$store.dispatch("addUserGroup",{userid:s,gid:e})}).catch(function(){t.loading={groups:!1,subadmins:!1}}),this.$store.getters.getGroups[this.groups.length]},addUserGroup:function(e){var t=this;if(!1===e.canAdd)return!1;this.loading.groups=!0;var s=this.user.id,i=e.id;return this.$store.dispatch("addUserGroup",{userid:s,gid:i}).then(function(){return t.loading.groups=!1})},removeUserGroup:function(e){var t=this;if(!1===e.canRemove)return!1;this.loading.groups=!0;var s=this.user.id,i=e.id;return this.$store.dispatch("removeUserGroup",{userid:s,gid:i}).then(function(){t.loading.groups=!1,t.$route.params.selectedGroup===i&&t.$store.commit("deleteUser",s)}).catch(function(){t.loading.groups=!1})},addUserSubAdmin:function(e){var t=this;this.loading.subadmins=!0;var s=this.user.id,i=e.id;return this.$store.dispatch("addUserSubAdmin",{userid:s,gid:i}).then(function(){return t.loading.subadmins=!1})},removeUserSubAdmin:function(e){var t=this;this.loading.subadmins=!0;var s=this.user.id,i=e.id;return this.$store.dispatch("removeUserSubAdmin",{userid:s,gid:i}).then(function(){return t.loading.subadmins=!1})},setUserQuota:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"none";return this.loading.quota=!0,t=t.id?t.id:t,this.$store.dispatch("setUserData",{userid:this.user.id,key:"quota",value:t}).then(function(){return e.loading.quota=!1}),t},validateQuota:function(e){var t=OC.Util.computerFileSize(e);return null!==t&&t>=0&&this.setUserQuota(OC.Util.humanFileSize(OC.Util.computerFileSize(e)))},setUserLanguage:function(e){var t=this;return this.loading.languages=!0,this.$store.dispatch("setUserData",{userid:this.user.id,key:"language",value:e.code}).then(function(){return t.loading.languages=!1}),e},sendWelcomeMail:function(){var e=this;this.loading.all=!0,this.$store.dispatch("sendWelcomeMail",this.user.id).then(function(s){s&&(e.feedbackMessage=t("setting","Welcome mail sent!"),setTimeout(function(){e.feedbackMessage=""},2e3)),e.loading.all=!1})}}},p=i(5),h=Object(p.a)(g,function(){var e=this,t=e.$createElement,s=e._self._c||t;return 1===Object.keys(e.user).length?s("div",{staticClass:"row",attrs:{"data-id":e.user.id}},[s("div",{staticClass:"avatar",class:{"icon-loading-small":e.loading.delete||e.loading.disable}},[e.loading.delete||e.loading.disable?e._e():s("img",{attrs:{alt:"",width:"32",height:"32",src:e.generateAvatar(e.user.id,32),srcset:e.generateAvatar(e.user.id,64)+" 2x, "+e.generateAvatar(e.user.id,128)+" 4x"}})]),e._v(" "),s("div",{staticClass:"name"},[e._v(e._s(e.user.id))]),e._v(" "),s("div",{staticClass:"obfuscated"},[e._v(e._s(e.t("settings","You do not have permissions to see the details of this user")))])]):s("div",{staticClass:"row",class:{disabled:e.loading.delete||e.loading.disable},attrs:{"data-id":e.user.id}},[s("div",{staticClass:"avatar",class:{"icon-loading-small":e.loading.delete||e.loading.disable}},[e.loading.delete||e.loading.disable?e._e():s("img",{attrs:{alt:"",width:"32",height:"32",src:e.generateAvatar(e.user.id,32),srcset:e.generateAvatar(e.user.id,64)+" 2x, "+e.generateAvatar(e.user.id,128)+" 4x"}})]),e._v(" "),s("div",{staticClass:"name"},[e._v(e._s(e.user.id))]),e._v(" "),s("form",{staticClass:"displayName",class:{"icon-loading-small":e.loading.displayName},on:{submit:function(t){return t.preventDefault(),e.updateDisplayName(t)}}},[e.user.backendCapabilities.setDisplayName?[e.user.backendCapabilities.setDisplayName?s("input",{ref:"displayName",attrs:{id:"displayName"+e.user.id+e.rand,type:"text",disabled:e.loading.displayName||e.loading.all,autocomplete:"new-password",autocorrect:"off",autocapitalize:"off",spellcheck:"false"},domProps:{value:e.user.displayname}}):e._e(),e._v(" "),e.user.backendCapabilities.setDisplayName?s("input",{staticClass:"icon-confirm",attrs:{type:"submit",value:""}}):e._e()]:s("div",{directives:[{name:"tooltip",rawName:"v-tooltip.auto",value:e.t("settings","The backend does not support changing the display name"),expression:"t('settings', 'The backend does not support changing the display name')",modifiers:{auto:!0}}],staticClass:"name"},[e._v(e._s(e.user.displayname))])],2),e._v(" "),e.settings.canChangePassword&&e.user.backendCapabilities.setPassword?s("form",{staticClass:"password",class:{"icon-loading-small":e.loading.password},on:{submit:function(t){return t.preventDefault(),e.updatePassword(t)}}},[s("input",{ref:"password",attrs:{id:"password"+e.user.id+e.rand,type:"password",required:"",disabled:e.loading.password||e.loading.all,minlength:e.minPasswordLength,value:"",placeholder:e.t("settings","New password"),autocomplete:"new-password",autocorrect:"off",autocapitalize:"off",spellcheck:"false"}}),e._v(" "),s("input",{staticClass:"icon-confirm",attrs:{type:"submit",value:""}})]):s("div"),e._v(" "),s("form",{staticClass:"mailAddress",class:{"icon-loading-small":e.loading.mailAddress},on:{submit:function(t){return t.preventDefault(),e.updateEmail(t)}}},[s("input",{ref:"mailAddress",attrs:{id:"mailAddress"+e.user.id+e.rand,type:"email",disabled:e.loading.mailAddress||e.loading.all,autocomplete:"new-password",autocorrect:"off",autocapitalize:"off",spellcheck:"false"},domProps:{value:e.user.email}}),e._v(" "),s("input",{staticClass:"icon-confirm",attrs:{type:"submit",value:""}})]),e._v(" "),s("div",{staticClass:"groups",class:{"icon-loading-small":e.loading.groups}},[s("multiselect",{staticClass:"multiselect-vue",attrs:{value:e.userGroups,options:e.availableGroups,disabled:e.loading.groups||e.loading.all,"tag-placeholder":"create",placeholder:e.t("settings","Add user in group"),label:"name","track-by":"id",limit:2,multiple:!0,taggable:e.settings.isAdmin,closeOnSelect:!1,"tag-width":60},on:{tag:e.createGroup,select:e.addUserGroup,remove:e.removeUserGroup}},[s("span",{directives:[{name:"tooltip",rawName:"v-tooltip.auto",value:e.formatGroupsTitle(e.userGroups),expression:"formatGroupsTitle(userGroups)",modifiers:{auto:!0}}],staticClass:"multiselect__limit",attrs:{slot:"limit"},slot:"limit"},[e._v("+"+e._s(e.userGroups.length-2))]),e._v(" "),s("span",{attrs:{slot:"noResult"},slot:"noResult"},[e._v(e._s(e.t("settings","No results")))])])],1),e._v(" "),e.subAdminsGroups.length>0&&e.settings.isAdmin?s("div",{staticClass:"subadmins",class:{"icon-loading-small":e.loading.subadmins}},[s("multiselect",{staticClass:"multiselect-vue",attrs:{value:e.userSubAdminsGroups,options:e.subAdminsGroups,disabled:e.loading.subadmins||e.loading.all,placeholder:e.t("settings","Set user as admin for"),label:"name","track-by":"id",limit:2,multiple:!0,closeOnSelect:!1,"tag-width":60},on:{select:e.addUserSubAdmin,remove:e.removeUserSubAdmin}},[s("span",{directives:[{name:"tooltip",rawName:"v-tooltip.auto",value:e.formatGroupsTitle(e.userSubAdminsGroups),expression:"formatGroupsTitle(userSubAdminsGroups)",modifiers:{auto:!0}}],staticClass:"multiselect__limit",attrs:{slot:"limit"},slot:"limit"},[e._v("+"+e._s(e.userSubAdminsGroups.length-2))]),e._v(" "),s("span",{attrs:{slot:"noResult"},slot:"noResult"},[e._v(e._s(e.t("settings","No results")))])])],1):e._e(),e._v(" "),s("div",{directives:[{name:"tooltip",rawName:"v-tooltip.auto",value:e.usedSpace,expression:"usedSpace",modifiers:{auto:!0}}],staticClass:"quota",class:{"icon-loading-small":e.loading.quota}},[s("multiselect",{staticClass:"multiselect-vue",attrs:{value:e.userQuota,options:e.quotaOptions,disabled:e.loading.quota||e.loading.all,"tag-placeholder":"create",placeholder:e.t("settings","Select user quota"),label:"label","track-by":"id",allowEmpty:!1,taggable:!0},on:{tag:e.validateQuota,input:e.setUserQuota}}),e._v(" "),s("progress",{staticClass:"quota-user-progress",class:{warn:e.usedQuota>80},attrs:{max:"100"},domProps:{value:e.usedQuota}})],1),e._v(" "),e.showConfig.showLanguages?s("div",{staticClass:"languages",class:{"icon-loading-small":e.loading.languages}},[s("multiselect",{staticClass:"multiselect-vue",attrs:{value:e.userLanguage,options:e.languages,disabled:e.loading.languages||e.loading.all,placeholder:e.t("settings","No language set"),label:"name","track-by":"code",allowEmpty:!1,"group-values":"languages","group-label":"label"},on:{input:e.setUserLanguage}})],1):e._e(),e._v(" "),e.showConfig.showStoragePath?s("div",{staticClass:"storageLocation"},[e._v(e._s(e.user.storageLocation))]):e._e(),e._v(" "),e.showConfig.showUserBackend?s("div",{staticClass:"userBackend"},[e._v(e._s(e.user.backend))]):e._e(),e._v(" "),e.showConfig.showLastLogin?s("div",{directives:[{name:"tooltip",rawName:"v-tooltip.auto",value:e.user.lastLogin>0?e.OC.Util.formatDate(e.user.lastLogin):"",expression:"user.lastLogin>0 ? OC.Util.formatDate(user.lastLogin) : ''",modifiers:{auto:!0}}],staticClass:"lastLogin"},[e._v("\n\t\t"+e._s(e.user.lastLogin>0?e.OC.Util.relativeModifiedDate(e.user.lastLogin):e.t("settings","Never"))+"\n\t")]):e._e(),e._v(" "),s("div",{staticClass:"userActions"},[e.OC.currentUser===e.user.id||"admin"===e.user.id||e.loading.all?e._e():s("div",{staticClass:"toggleUserActions"},[s("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:e.hideMenu,expression:"hideMenu"}],staticClass:"icon-more",on:{click:e.toggleMenu}}),e._v(" "),s("div",{staticClass:"popovermenu",class:{open:e.openedMenu}},[s("popover-menu",{attrs:{menu:e.userActions}})],1)]),e._v(" "),s("div",{staticClass:"feedback",style:{opacity:""!==e.feedbackMessage?1:0}},[s("div",{staticClass:"icon-checkmark"}),e._v("\n\t\t\t"+e._s(e.feedbackMessage)+"\n\t\t")])])])},[],!1,null,null,null).exports,m=i(69),f=i.n(m),v={name:"userList",props:["users","showConfig","selectedGroup","externalActions"],components:{userRow:h,Multiselect:r.Multiselect,InfiniteLoading:f.a},data:function(){var e={id:"none",label:t("settings","Unlimited")},s={id:"default",label:t("settings","Default quota")};return{unlimitedQuota:e,defaultQuota:s,loading:{all:!1,groups:!1},scrolled:!1,searchQuery:"",newUser:{id:"",displayName:"",password:"",mailAddress:"",groups:[],subAdminsGroups:[],quota:s,language:{code:"en",name:t("settings","Default language")}}}},mounted:function(){this.settings.canChangePassword||OC.Notification.showTemporary(t("settings","Password change is disabled because the master key is disabled")),a.default.set(this.newUser.language,"code",this.settings.defaultLanguage),this.setNewUserDefaultGroup(this.selectedGroup),this.userSearch=new OCA.Search(this.search,this.resetSearch)},computed:{settings:function(){return this.$store.getters.getServerData},filteredUsers:function(){if("disabled"===this.selectedGroup){var e=this.users.filter(function(e){return!1===e.enabled});return 0===e.length&&this.$refs.infiniteLoading&&this.$refs.infiniteLoading.isComplete&&(this.$router.push({name:"users"}),this.$refs.infiniteLoading.stateChanger.reset()),e}return this.settings.isAdmin?this.users.filter(function(e){return!1!==e.enabled}):this.users.filter(function(e){return!1!==e.enabled&&e.id!==OC.getCurrentUser().uid})},groups:function(){return this.$store.getters.getGroups.filter(function(e){return"disabled"!==e.id}).sort(function(e,t){return e.name.localeCompare(t.name)})},canAddGroups:function(){return this.groups.map(function(e){return(e=Object.assign({},e)).$isDisabled=!1===e.canAdd,e})},subAdminsGroups:function(){return this.$store.getters.getSubadminGroups},quotaOptions:function(){var e=this.settings.quotaPreset.reduce(function(e,t){return e.concat({id:t,label:t})},[]);return e.unshift(this.unlimitedQuota),e.unshift(this.defaultQuota),e},minPasswordLength:function(){return this.$store.getters.getPasswordPolicyMinLength},usersOffset:function(){return this.$store.getters.getUsersOffset},usersLimit:function(){return this.$store.getters.getUsersLimit},usersCount:function(){return this.users.length},languages:function(){return Array({label:t("settings","Common languages"),languages:this.settings.languages.commonlanguages},{label:t("settings","All languages"),languages:this.settings.languages.languages})}},watch:{selectedGroup:function(e,t){this.$store.commit("resetUsers"),this.$refs.infiniteLoading.stateChanger.reset(),this.setNewUserDefaultGroup(e)},usersCount:function(e,t){0===e&&1===t?this.$refs.infiniteLoading.stateChanger.reset():1===e&&0===t&&this.$refs.infiniteLoading.stateChanger.loaded()}},methods:{onScroll:function(e){this.scrolled=e.target.scrollTo>0},validateQuota:function(e){var t=OC.Util.computerFileSize(e);return null!==t&&t>=0?(e=OC.Util.humanFileSize(OC.Util.computerFileSize(e)),this.newUser.quota={id:e,label:e}):this.newUser.quota=this.quotaOptions[0]},infiniteHandler:function(e){this.$store.dispatch("getUsers",{offset:this.usersOffset,limit:this.usersLimit,group:"disabled"!==this.selectedGroup?this.selectedGroup:"",search:this.searchQuery}).then(function(t){t?e.loaded():e.complete()})},search:function(e){this.searchQuery=e,this.$store.commit("resetUsers"),this.$refs.infiniteLoading.stateChanger.reset()},resetSearch:function(){this.search("")},resetForm:function(){Object.assign(this.newUser,this.$options.data.call(this).newUser),this.setNewUserDefaultGroup(this.selectedGroup),this.loading.all=!1},createUser:function(){var e=this;this.loading.all=!0,this.$store.dispatch("addUser",{userid:this.newUser.id,password:this.newUser.password,displayName:this.newUser.displayName,email:this.newUser.mailAddress,groups:this.newUser.groups.map(function(e){return e.id}),subadmin:this.newUser.subAdminsGroups.map(function(e){return e.id}),quota:this.newUser.quota.id,language:this.newUser.language.code}).then(function(){e.resetForm(),e.$refs.newusername.focus()}).catch(function(t){if(e.loading.all=!1,t.response&&t.response.data&&t.response.data.ocs&&t.response.data.ocs.meta){var s=t.response.data.ocs.meta.statuscode;102===s?e.$refs.newusername.focus():107===s&&e.$refs.newuserpassword.focus()}})},setNewUserDefaultGroup:function(e){if(e&&e.length>0){var t=this.groups.find(function(t){return t.id===e});if(t)return void(this.newUser.groups=[t])}this.newUser.groups=[]},createGroup:function(e){var t=this;return this.loading.groups=!0,this.$store.dispatch("addGroup",e).then(function(s){t.newUser.groups.push(t.groups.find(function(t){return t.id===e})),t.loading.groups=!1}).catch(function(){t.loading.groups=!1}),this.$store.getters.getGroups[this.groups.length]}}},b=Object(p.a)(v,function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"user-list-grid",attrs:{id:"app-content"},on:{"&scroll":function(t){return e.onScroll(t)}}},[s("div",{staticClass:"row",class:{sticky:e.scrolled&&!e.showConfig.showNewUserForm},attrs:{id:"grid-header"}},[s("div",{staticClass:"avatar",attrs:{id:"headerAvatar"}}),e._v(" "),s("div",{staticClass:"name",attrs:{id:"headerName"}},[e._v(e._s(e.t("settings","Username")))]),e._v(" "),s("div",{staticClass:"displayName",attrs:{id:"headerDisplayName"}},[e._v(e._s(e.t("settings","Display name")))]),e._v(" "),s("div",{staticClass:"password",attrs:{id:"headerPassword"}},[e._v(e._s(e.t("settings","Password")))]),e._v(" "),s("div",{staticClass:"mailAddress",attrs:{id:"headerAddress"}},[e._v(e._s(e.t("settings","Email")))]),e._v(" "),s("div",{staticClass:"groups",attrs:{id:"headerGroups"}},[e._v(e._s(e.t("settings","Groups")))]),e._v(" "),e.subAdminsGroups.length>0&&e.settings.isAdmin?s("div",{staticClass:"subadmins",attrs:{id:"headerSubAdmins"}},[e._v(e._s(e.t("settings","Group admin for")))]):e._e(),e._v(" "),s("div",{staticClass:"quota",attrs:{id:"headerQuota"}},[e._v(e._s(e.t("settings","Quota")))]),e._v(" "),e.showConfig.showLanguages?s("div",{staticClass:"languages",attrs:{id:"headerLanguages"}},[e._v(e._s(e.t("settings","Language")))]):e._e(),e._v(" "),e.showConfig.showStoragePath?s("div",{staticClass:"headerStorageLocation storageLocation"},[e._v(e._s(e.t("settings","Storage location")))]):e._e(),e._v(" "),e.showConfig.showUserBackend?s("div",{staticClass:"headerUserBackend userBackend"},[e._v(e._s(e.t("settings","User backend")))]):e._e(),e._v(" "),e.showConfig.showLastLogin?s("div",{staticClass:"headerLastLogin lastLogin"},[e._v(e._s(e.t("settings","Last login")))]):e._e(),e._v(" "),s("div",{staticClass:"userActions"})]),e._v(" "),s("form",{directives:[{name:"show",rawName:"v-show",value:e.showConfig.showNewUserForm,expression:"showConfig.showNewUserForm"}],staticClass:"row",class:{sticky:e.scrolled&&e.showConfig.showNewUserForm},attrs:{id:"new-user",disabled:e.loading.all},on:{submit:function(t){return t.preventDefault(),e.createUser(t)}}},[s("div",{class:e.loading.all?"icon-loading-small":"icon-add"}),e._v(" "),s("div",{staticClass:"name"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.newUser.id,expression:"newUser.id"}],ref:"newusername",attrs:{id:"newusername",type:"text",required:"",placeholder:e.t("settings","Username"),name:"username",autocomplete:"off",autocapitalize:"none",autocorrect:"off",pattern:"[a-zA-Z0-9 _\\.@\\-']+"},domProps:{value:e.newUser.id},on:{input:function(t){t.target.composing||e.$set(e.newUser,"id",t.target.value)}}})]),e._v(" "),s("div",{staticClass:"displayName"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.newUser.displayName,expression:"newUser.displayName"}],attrs:{id:"newdisplayname",type:"text",placeholder:e.t("settings","Display name"),name:"displayname",autocomplete:"off",autocapitalize:"none",autocorrect:"off"},domProps:{value:e.newUser.displayName},on:{input:function(t){t.target.composing||e.$set(e.newUser,"displayName",t.target.value)}}})]),e._v(" "),s("div",{staticClass:"password"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.newUser.password,expression:"newUser.password"}],ref:"newuserpassword",attrs:{id:"newuserpassword",type:"password",required:""===e.newUser.mailAddress,placeholder:e.t("settings","Password"),name:"password",autocomplete:"new-password",autocapitalize:"none",autocorrect:"off",minlength:e.minPasswordLength},domProps:{value:e.newUser.password},on:{input:function(t){t.target.composing||e.$set(e.newUser,"password",t.target.value)}}})]),e._v(" "),s("div",{staticClass:"mailAddress"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.newUser.mailAddress,expression:"newUser.mailAddress"}],attrs:{id:"newemail",type:"email",required:""===e.newUser.password,placeholder:e.t("settings","Email"),name:"email",autocomplete:"off",autocapitalize:"none",autocorrect:"off"},domProps:{value:e.newUser.mailAddress},on:{input:function(t){t.target.composing||e.$set(e.newUser,"mailAddress",t.target.value)}}})]),e._v(" "),s("div",{staticClass:"groups"},[e.settings.isAdmin?e._e():s("input",{class:{"icon-loading-small":e.loading.groups},attrs:{type:"text",tabindex:"-1",id:"newgroups",required:!e.settings.isAdmin},domProps:{value:e.newUser.groups}}),e._v(" "),s("multiselect",{staticClass:"multiselect-vue",attrs:{options:e.canAddGroups,disabled:e.loading.groups||e.loading.all,"tag-placeholder":"create",placeholder:e.t("settings","Add user in group"),label:"name","track-by":"id",multiple:!0,taggable:!0,"close-on-select":!1,"tag-width":60},on:{tag:e.createGroup},model:{value:e.newUser.groups,callback:function(t){e.$set(e.newUser,"groups",t)},expression:"newUser.groups"}},[s("span",{attrs:{slot:"noResult"},slot:"noResult"},[e._v(e._s(e.t("settings","No results")))])])],1),e._v(" "),e.subAdminsGroups.length>0&&e.settings.isAdmin?s("div",{staticClass:"subadmins"},[s("multiselect",{staticClass:"multiselect-vue",attrs:{options:e.subAdminsGroups,placeholder:e.t("settings","Set user as admin for"),label:"name","track-by":"id",multiple:!0,"close-on-select":!1,"tag-width":60},model:{value:e.newUser.subAdminsGroups,callback:function(t){e.$set(e.newUser,"subAdminsGroups",t)},expression:"newUser.subAdminsGroups"}},[s("span",{attrs:{slot:"noResult"},slot:"noResult"},[e._v(e._s(e.t("settings","No results")))])])],1):e._e(),e._v(" "),s("div",{staticClass:"quota"},[s("multiselect",{staticClass:"multiselect-vue",attrs:{options:e.quotaOptions,placeholder:e.t("settings","Select user quota"),label:"label","track-by":"id",allowEmpty:!1,taggable:!0},on:{tag:e.validateQuota},model:{value:e.newUser.quota,callback:function(t){e.$set(e.newUser,"quota",t)},expression:"newUser.quota"}})],1),e._v(" "),e.showConfig.showLanguages?s("div",{staticClass:"languages"},[s("multiselect",{staticClass:"multiselect-vue",attrs:{options:e.languages,placeholder:e.t("settings","Default language"),label:"name","track-by":"code",allowEmpty:!1,"group-values":"languages","group-label":"label"},model:{value:e.newUser.language,callback:function(t){e.$set(e.newUser,"language",t)},expression:"newUser.language"}})],1):e._e(),e._v(" "),e.showConfig.showStoragePath?s("div",{staticClass:"storageLocation"}):e._e(),e._v(" "),e.showConfig.showUserBackend?s("div",{staticClass:"userBackend"}):e._e(),e._v(" "),e.showConfig.showLastLogin?s("div",{staticClass:"lastLogin"}):e._e(),e._v(" "),s("div",{staticClass:"userActions"},[s("input",{staticClass:"button primary icon-checkmark-white has-tooltip",attrs:{type:"submit",id:"newsubmit",value:"",title:e.t("settings","Add a new user")}})])]),e._v(" "),e._l(e.filteredUsers,function(t,i){return s("user-row",{key:i,attrs:{user:t,settings:e.settings,showConfig:e.showConfig,groups:e.groups,subAdminsGroups:e.subAdminsGroups,quotaOptions:e.quotaOptions,languages:e.languages,externalActions:e.externalActions}})}),e._v(" "),s("infinite-loading",{ref:"infiniteLoading",on:{infinite:e.infiniteHandler}},[s("div",{attrs:{slot:"spinner"},slot:"spinner"},[s("div",{staticClass:"users-icon-loading icon-loading"})]),e._v(" "),s("div",{attrs:{slot:"no-more"},slot:"no-more"},[s("div",{staticClass:"users-list-end"})]),e._v(" "),s("div",{attrs:{slot:"no-results"},slot:"no-results"},[s("div",{attrs:{id:"emptycontent"}},[s("div",{staticClass:"icon-contacts-dark"}),e._v(" "),s("h2",[e._v(e._s(e.t("settings","No users in here")))])])])])],2)},[],!1,null,null,null).exports;i(0);function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}a.default.use(o.a);var y={name:"Users",props:["selectedGroup"],components:{AppContent:r.AppContent,AppNavigation:r.AppNavigation,AppNavigationItem:r.AppNavigationItem,AppNavigationNew:r.AppNavigationNew,AppNavigationSettings:r.AppNavigationSettings,AppSidebar:r.AppSidebar,Content:r.Content,UserList:b,Multiselect:r.Multiselect},beforeMount:function(){this.$store.commit("initGroups",{groups:this.$store.getters.getServerData.groups,orderBy:this.$store.getters.getServerData.sortGroups,userCount:this.$store.getters.getServerData.userCount}),this.$store.dispatch("getPasswordPolicyMinLength")},created:function(){Object.assign(OCA,{Settings:{UserList:{registerAction:this.registerAction}}})},data:function(){return{unlimitedQuota:{id:"none",label:t("settings","Unlimited")},selectedQuota:!1,externalActions:[],showAddGroupEntry:!1,loadingAddGroup:!1,showConfig:{showStoragePath:!1,showUserBackend:!1,showLastLogin:!1,showNewUserForm:!1,showLanguages:!1}}},methods:{toggleNewUserMenu:function(){this.showConfig.showNewUserForm=!this.showConfig.showNewUserForm,this.showConfig.showNewUserForm&&a.default.nextTick(function(){window.newusername.focus()})},getLocalstorage:function(e){var t=this.$localStorage.get(e);return this.showConfig[e]=null!==t?"true"===t:this.showConfig[e],this.showConfig[e]},setLocalStorage:function(e,t){return this.showConfig[e]=t,this.$localStorage.set(e,t),t},removeGroup:function(e){var s=this;OC.dialogs.confirm(t("settings","You are about to remove the group {group}. The users will NOT be deleted.",{group:e}),t("settings","Please confirm the group removal "),function(t){t&&s.$store.dispatch("removeGroup",e)})},setDefaultQuota:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"none";this.$store.dispatch("setAppConfig",{app:"files",key:"default_quota",value:t.id?t.id:t}).then(function(){"object"!==w(t)&&(t={id:t,label:t}),e.defaultQuota=t})},validateQuota:function(e){return null===OC.Util.computerFileSize(e)?this.setDefaultQuota("none"):this.setDefaultQuota(OC.Util.humanFileSize(OC.Util.computerFileSize(e)))},registerAction:function(e,t,s){return this.externalActions.push({icon:e,text:t,action:s}),this.externalActions},createGroup:function(e){var t=this,s=e.target[0].value;this.loadingAddGroup=!0,this.$store.dispatch("addGroup",s).then(function(){t.showAddGroupEntry=!1,t.loadingAddGroup=!1,t.$router.push({name:"group",params:{selectedGroup:s}})}).catch(function(){t.loadingAddGroup=!1})}},computed:{users:function(){return this.$store.getters.getUsers},usersOffset:function(){return this.$store.getters.getUsersOffset},usersLimit:function(){return this.$store.getters.getUsersLimit},showLanguages:{get:function(){return this.getLocalstorage("showLanguages")},set:function(e){this.setLocalStorage("showLanguages",e)}},showLastLogin:{get:function(){return this.getLocalstorage("showLastLogin")},set:function(e){this.setLocalStorage("showLastLogin",e)}},showUserBackend:{get:function(){return this.getLocalstorage("showUserBackend")},set:function(e){this.setLocalStorage("showUserBackend",e)}},showStoragePath:{get:function(){return this.getLocalstorage("showStoragePath")},set:function(e){this.setLocalStorage("showStoragePath",e)}},userCount:function(){return this.$store.getters.getUserCount},settings:function(){return this.$store.getters.getServerData},quotaOptions:function(){var e=this.settings.quotaPreset.reduce(function(e,t){return e.concat({id:t,label:t})},[]);return e.unshift(this.unlimitedQuota),e},defaultQuota:{get:function(){return!1!==this.selectedQuota?this.selectedQuota:this.settings.defaultQuota!==this.unlimitedQuota.id&&OC.Util.computerFileSize(this.settings.defaultQuota)>=0?{id:this.settings.defaultQuota,label:this.settings.defaultQuota}:this.unlimitedQuota},set:function(e){this.selectedQuota=e}},menu:function(){var e=this,s=this,i=this.$store.getters.getGroups,n=(i=(i=Array.isArray(i)?i:[]).map(function(i){var a={};return a.id=i.id.replace(" ","_"),a.key=a.id,a.utils={},a.router={name:"group",params:{selectedGroup:i.id}},a.text=i.name,a.title=i.name,(i.usercount-i.disabled>0||-1===i.usercount)&&(a.utils.counter=i.usercount-i.disabled),"admin"!==a.id&&"disabled"!==a.id&&e.settings.isAdmin&&(a.utils.actions=[{icon:"icon-delete",text:t("settings","Remove group"),action:function(){s.removeGroup(i.id)}}]),a})).find(function(e){return"disabled"!==e.id&&"admin"!==e.id});if(n=void 0===n?[]:n,(n=Array.isArray(n)?n:[n]).length>0){var o={caption:!0,text:t("settings","Groups")};i.unshift(o)}var r=i.find(function(e){return"admin"==e.id}),l=i.find(function(e){return"disabled"==e.id});i=i.filter(function(e){return-1===["admin","disabled"].indexOf(e.id)}),r&&r.text&&(r.text=t("settings","Admins"),r.icon="icon-user-admin",i.unshift(r)),l&&l.text&&(l.text=t("settings","Disabled users"),l.icon="icon-disabled-users",l.utils&&(l.utils.counter>0||-1===l.utils.counter)&&i.unshift(l));var u={id:"everyone",key:"everyone",icon:"icon-contacts-dark",router:{name:"users"},text:t("settings","Everyone")};this.userCount>0&&a.default.set(u,"utils",{counter:this.userCount}),i.unshift(u);var d={id:"addgroup",key:"addgroup",icon:"icon-add",text:t("settings","Add group"),classes:this.loadingAddGroup?"icon-loading-small":""};return this.showAddGroupEntry?(a.default.set(d,"edit",{text:t("settings","Add group"),action:this.createGroup,reset:function(){s.showAddGroupEntry=!1}}),d.classes="editing"):a.default.set(d,"action",function(){s.showAddGroupEntry=!0,a.default.nextTick(function(){window.addgroup.querySelector('form > input[type="text"]').focus()})}),i.unshift(d),i}}},_=Object(p.a)(y,function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("Content",{attrs:{"app-name":"settings","navigation-class":{"icon-loading":e.loadingAddGroup}}},[s("AppNavigation",[s("AppNavigationNew",{attrs:{"button-id":"new-user-button",text:e.t("settings","New user"),"button-class":"icon-add"},on:{click:e.toggleNewUserMenu}}),e._v(" "),s("ul",{attrs:{id:"usergrouplist"}},e._l(e.menu,function(e){return s("AppNavigationItem",{key:e.key,attrs:{item:e}})}),1),e._v(" "),s("AppNavigationSettings",[s("div",[s("p",[e._v(e._s(e.t("settings","Default quota:")))]),e._v(" "),s("Multiselect",{attrs:{value:e.defaultQuota,options:e.quotaOptions,"tag-placeholder":"create",placeholder:e.t("settings","Select default quota"),label:"label","track-by":"id",allowEmpty:!1,taggable:!0},on:{tag:e.validateQuota,input:e.setDefaultQuota}})],1),e._v(" "),s("div",[s("input",{directives:[{name:"model",rawName:"v-model",value:e.showLanguages,expression:"showLanguages"}],staticClass:"checkbox",attrs:{type:"checkbox",id:"showLanguages"},domProps:{checked:Array.isArray(e.showLanguages)?e._i(e.showLanguages,null)>-1:e.showLanguages},on:{change:function(t){var s=e.showLanguages,i=t.target,a=!!i.checked;if(Array.isArray(s)){var n=e._i(s,null);i.checked?n<0&&(e.showLanguages=s.concat([null])):n>-1&&(e.showLanguages=s.slice(0,n).concat(s.slice(n+1)))}else e.showLanguages=a}}}),e._v(" "),s("label",{attrs:{for:"showLanguages"}},[e._v(e._s(e.t("settings","Show Languages")))])]),e._v(" "),s("div",[s("input",{directives:[{name:"model",rawName:"v-model",value:e.showLastLogin,expression:"showLastLogin"}],staticClass:"checkbox",attrs:{type:"checkbox",id:"showLastLogin"},domProps:{checked:Array.isArray(e.showLastLogin)?e._i(e.showLastLogin,null)>-1:e.showLastLogin},on:{change:function(t){var s=e.showLastLogin,i=t.target,a=!!i.checked;if(Array.isArray(s)){var n=e._i(s,null);i.checked?n<0&&(e.showLastLogin=s.concat([null])):n>-1&&(e.showLastLogin=s.slice(0,n).concat(s.slice(n+1)))}else e.showLastLogin=a}}}),e._v(" "),s("label",{attrs:{for:"showLastLogin"}},[e._v(e._s(e.t("settings","Show last login")))])]),e._v(" "),s("div",[s("input",{directives:[{name:"model",rawName:"v-model",value:e.showUserBackend,expression:"showUserBackend"}],staticClass:"checkbox",attrs:{type:"checkbox",id:"showUserBackend"},domProps:{checked:Array.isArray(e.showUserBackend)?e._i(e.showUserBackend,null)>-1:e.showUserBackend},on:{change:function(t){var s=e.showUserBackend,i=t.target,a=!!i.checked;if(Array.isArray(s)){var n=e._i(s,null);i.checked?n<0&&(e.showUserBackend=s.concat([null])):n>-1&&(e.showUserBackend=s.slice(0,n).concat(s.slice(n+1)))}else e.showUserBackend=a}}}),e._v(" "),s("label",{attrs:{for:"showUserBackend"}},[e._v(e._s(e.t("settings","Show user backend")))])]),e._v(" "),s("div",[s("input",{directives:[{name:"model",rawName:"v-model",value:e.showStoragePath,expression:"showStoragePath"}],staticClass:"checkbox",attrs:{type:"checkbox",id:"showStoragePath"},domProps:{checked:Array.isArray(e.showStoragePath)?e._i(e.showStoragePath,null)>-1:e.showStoragePath},on:{change:function(t){var s=e.showStoragePath,i=t.target,a=!!i.checked;if(Array.isArray(s)){var n=e._i(s,null);i.checked?n<0&&(e.showStoragePath=s.concat([null])):n>-1&&(e.showStoragePath=s.slice(0,n).concat(s.slice(n+1)))}else e.showStoragePath=a}}}),e._v(" "),s("label",{attrs:{for:"showStoragePath"}},[e._v(e._s(e.t("settings","Show storage path")))])])])],1),e._v(" "),s("AppContent",[s("UserList",{attrs:{users:e.users,showConfig:e.showConfig,selectedGroup:e.selectedGroup,externalActions:e.externalActions},scopedSlots:e._u([{key:"content",fn:function(){},proxy:!0}])})],1)],1)},[],!1,null,null,null);s.default=_.exports}}]); //# sourceMappingURL=vue-6.js.map