(window.webpackJsonpSettings=window.webpackJsonpSettings||[]).push([[7],{299:function(e,t,s){var i=s(377);"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);(0,s(110).default)("6818a5c5",i,!0,{})},376:function(e,t,s){"use strict";var i=s(299);s.n(i).a},377:function(e,t,s){(t=s(109)(!1)).push([e.i,"\n.cellText[data-v-81e9cdfa] {\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n",""]),e.exports=t},388:function(e,s,i){"use strict";i.r(s);var a=i(4),n=i(302),r=i.n(n),o=i(99),u=i(303),l=i.n(u),d=i(216),c=i(329);function g(e){return(g="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)} /** * @copyright Copyright (c) 2019 John Molakvoæ * * @author John Molakvoæ * * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . * */var p={props:{user:{type:Object,required:!0},settings:{type:Object,default:function(){return{}}},groups:{type:Array,default:function(){return[]}},subAdminsGroups:{type:Array,default:function(){return[]}},quotaOptions:{type:Array,default:function(){return[]}},showConfig:{type:Object,default:function(){return{}}},languages:{type:Array,required:!0},externalActions:{type:Array,default:function(){return[]}}},computed:{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"!==g(t)&&""!==this.user.language?{code:this.user.language,name:this.user.language}:""!==this.user.language&&t},userLastLoginTooltip:function(){return this.user.lastLogin>0?OC.Util.formatDate(this.user.lastLogin):""},userLastLogin:function(){return this.user.lastLogin>0?OC.Util.relativeModifiedDate(this.user.lastLogin):t("settings","Never")}},methods:{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})}}},h={name:"UserRowSimple",components:{PopoverMenu:o.PopoverMenu,ActionButton:o.ActionButton,Actions:o.Actions},directives:{ClickOutside:l.a},mixins:[p],props:{user:{type:Object,required:!0},loading:{type:Object,required:!0},showConfig:{type:Object,required:!0},userActions:{type:Array,required:!0},openedMenu:{type:Boolean,required:!0},feedbackMessage:{type:String,required:!0},subAdminsGroups:{type:Array,required:!0},settings:{type:Object,required:!0}},computed:{userGroupsLabels:function(){return this.userGroups.map((function(e){return e.name})).join(", ")},userSubAdminsGroupsLabels:function(){return this.userSubAdminsGroups.map((function(e){return e.name})).join(", ")},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)})},canEdit:function(){return Object(c.getCurrentUser)().uid!==this.user.id&&"admin"!==this.user.id}},methods:{hideMenu:function(){this.$emit("hideMenu")},toggleEdit:function(){this.$emit("update:editing",!0)}}},m=(i(376),i(22)),f=Object(m.a)(h,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return 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.wipe}},[e.loading.delete||e.loading.disable||e.loading.wipe?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("\n\t\t"+e._s(e.user.id)+"\n\t\t"),s("div",{staticClass:"displayName subtitle"},[s("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.user.displayname.length>20?e.user.displayname:"",expression:"user.displayname.length > 20 ? user.displayname : ''"}],staticClass:"cellText"},[e._v("\n\t\t\t\t"+e._s(e.user.displayname)+"\n\t\t\t")])])]),e._v(" "),s("div"),e._v(" "),s("div",{staticClass:"mailAddress"},[s("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:null!==e.user.email&&e.user.email.length>20?e.user.email:"",expression:"user.email !== null && user.email.length > 20 ? user.email : ''"}],staticClass:"cellText"},[e._v("\n\t\t\t"+e._s(e.user.email)+"\n\t\t")])]),e._v(" "),s("div",{staticClass:"groups"},[e._v("\n\t\t"+e._s(e.userGroupsLabels)+"\n\t")]),e._v(" "),e.subAdminsGroups.length>0&&e.settings.isAdmin?s("div",{staticClass:"subAdminsGroups"},[e._v("\n\t\t"+e._s(e.userSubAdminsGroupsLabels)+"\n\t")]):e._e(),e._v(" "),s("div",{directives:[{name:"tooltip",rawName:"v-tooltip.auto",value:e.usedSpace,expression:"usedSpace",modifiers:{auto:!0}}],staticClass:"quota"},[s("progress",{staticClass:"quota-user-progress",class:{warn:e.usedQuota>80},attrs:{max:"100"},domProps:{value:e.usedQuota}})]),e._v(" "),e.showConfig.showLanguages?s("div",{staticClass:"languages"},[e._v("\n\t\t"+e._s(e.userLanguage.name)+"\n\t")]):e._e(),e._v(" "),e.showConfig.showUserBackend||e.showConfig.showStoragePath?s("div",{staticClass:"userBackend"},[e.showConfig.showUserBackend?s("div",{staticClass:"userBackend"},[e._v("\n\t\t\t"+e._s(e.user.backend)+"\n\t\t")]):e._e(),e._v(" "),e.showConfig.showStoragePath?s("div",{staticClass:"storageLocation subtitle"},[e._v("\n\t\t\t"+e._s(e.user.storageLocation)+"\n\t\t")]):e._e()]):e._e(),e._v(" "),e.showConfig.showLastLogin?s("div",{directives:[{name:"tooltip",rawName:"v-tooltip.auto",value:e.userLastLoginTooltip,expression:"userLastLoginTooltip",modifiers:{auto:!0}}],staticClass:"lastLogin"},[e._v("\n\t\t"+e._s(e.userLastLogin)+"\n\t")]):e._e(),e._v(" "),s("div",{staticClass:"userActions"},[e.canEdit&&!e.loading.all?s("div",{staticClass:"toggleUserActions"},[s("Actions",[s("ActionButton",{attrs:{icon:"icon-rename"},on:{click:e.toggleEdit}},[e._v("\n\t\t\t\t\t"+e._s(e.t("settings","Edit User"))+"\n\t\t\t\t")])],1),e._v(" "),s("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:e.hideMenu,expression:"hideMenu"}],staticClass:"icon-more",on:{click:function(t){return e.$emit("toggleMenu")}}}),e._v(" "),s("div",{staticClass:"popovermenu",class:{open:e.openedMenu}},[s("PopoverMenu",{attrs:{menu:e.userActions}})],1)],1):e._e(),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,"81e9cdfa",null).exports;function v(e,t,s,i,a,n,r){try{var o=e[n](r),u=o.value}catch(e){return void s(e)}o.done?t(u):Promise.resolve(u).then(i,a)}function w(e){return function(){var t=this,s=arguments;return new Promise((function(i,a){var n=e.apply(t,s);function r(e){v(n,i,a,r,o,"next",e)}function o(e){v(n,i,a,r,o,"throw",e)}r(void 0)}))}}a.default.use(d.a);var b,y,_,C,A,U,k,L={name:"UserRow",components:{UserRowSimple:f,PopoverMenu:o.PopoverMenu,Actions:o.Actions,ActionButton:o.ActionButton,Multiselect:o.Multiselect},directives:{ClickOutside:l.a},mixins:[p],props:{user:{type:Object,required:!0},settings:{type:Object,default:function(){return{}}},groups:{type:Array,default:function(){return[]}},subAdminsGroups:{type:Array,default:function(){return[]}},quotaOptions:{type:Array,default:function(){return[]}},showConfig:{type:Object,default:function(){return{}}},languages:{type:Array,required:!0},externalActions:{type:Array,default:function(){return[]}}},data:function(){return{rand:parseInt(1e3*Math.random()),openedMenu:!1,feedbackMessage:"",editing:!1,loading:{all:!1,displayName:!1,password:!1,mailAddress:!1,groups:!1,subadmins:!1,quota:!1,delete:!1,disable:!1,languages:!1,wipe:!1}}},computed:{userActions:function(){var e=[{icon:"icon-delete",text:t("settings","Delete user"),action:this.deleteUser},{icon:"icon-delete",text:t("settings","Wipe all devices"),action:this.wipeUserDevices},{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)}},methods:{toggleMenu:function(){this.openedMenu=!this.openedMenu},hideMenu:function(){this.openedMenu=!1},wipeUserDevices:function(){var e=this,s=this.user.id;OC.dialogs.confirmDestructive(t("settings","In case of lost device or exiting the organization, this can remotely wipe the Nextcloud data from all devices associated with {userid}. Only works if the devices are connected to the internet.",{userid:s}),t("settings","Remote wipe of devices"),{type:OC.dialogs.YES_NO_BUTTONS,confirm:t("settings","Wipe {userid}'s devices",{userid:s}),confirmClasses:"error",cancel:t("settings","Cancel")},(function(t){t&&(e.loading.wipe=!0,e.loading.all=!0,e.$store.dispatch("wipeUserDevices",s).then((function(){e.loading.wipe=!1,e.loading.all=!1})))}),!0)},deleteUser:function(){var e=this,s=this.user.id;OC.dialogs.confirmDestructive(t("settings","Fully delete {userid}'s account including all their personal files, app data, etc.",{userid:s}),t("settings","Account deletion"),{type:OC.dialogs.YES_NO_BUTTONS,confirm:t("settings","Delete {userid}'s account",{userid:s}),confirmClasses:"error",cancel:t("settings","Cancel")},(function(t){if(t)return e.loading.delete=!0,e.loading.all=!0,e.$store.dispatch("deleteUser",s).then((function(){e.loading.delete=!1,e.loading.all=!1}))}),!0)},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:(k=w(regeneratorRuntime.mark((function e(t){var s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.loading={groups:!0,subadmins:!0},e.prev=1,e.next=4,this.$store.dispatch("addGroup",t);case 4:return s=this.user.id,e.next=7,this.$store.dispatch("addUserGroup",{userid:s,gid:t});case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(1),console.error(e.t0);case 12:return e.prev=12,this.loading={groups:!1,subadmins:!1},e.finish(12);case 15:return e.abrupt("return",this.$store.getters.getGroups[this.groups.length]);case 16:case"end":return e.stop()}}),e,this,[[1,9,12,15]])}))),function(e){return k.apply(this,arguments)}),addUserGroup:(U=w(regeneratorRuntime.mark((function e(t){var s,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!1!==t.canAdd){e.next=2;break}return e.abrupt("return",!1);case 2:return this.loading.groups=!0,s=this.user.id,i=t.id,e.prev=5,e.next=8,this.$store.dispatch("addUserGroup",{userid:s,gid:i});case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.error(e.t0);case 13:return e.prev=13,this.loading.groups=!1,e.finish(13);case 16:case"end":return e.stop()}}),e,this,[[5,10,13,16]])}))),function(e){return U.apply(this,arguments)}),removeUserGroup:(A=w(regeneratorRuntime.mark((function e(t){var s,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!1!==t.canRemove){e.next=2;break}return e.abrupt("return",!1);case 2:return this.loading.groups=!0,s=this.user.id,i=t.id,e.prev=5,e.next=8,this.$store.dispatch("removeUserGroup",{userid:s,gid:i});case 8:this.loading.groups=!1,this.$route.params.selectedGroup===i&&this.$store.commit("deleteUser",s),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(5),this.loading.groups=!1;case 15:case"end":return e.stop()}}),e,this,[[5,12]])}))),function(e){return A.apply(this,arguments)}),addUserSubAdmin:(C=w(regeneratorRuntime.mark((function e(t){var s,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.loading.subadmins=!0,s=this.user.id,i=t.id,e.prev=3,e.next=6,this.$store.dispatch("addUserSubAdmin",{userid:s,gid:i});case 6:this.loading.subadmins=!1,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(3),console.error(e.t0);case 12:case"end":return e.stop()}}),e,this,[[3,9]])}))),function(e){return C.apply(this,arguments)}),removeUserSubAdmin:(_=w(regeneratorRuntime.mark((function e(t){var s,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.loading.subadmins=!0,s=this.user.id,i=t.id,e.prev=3,e.next=6,this.$store.dispatch("removeUserSubAdmin",{userid:s,gid:i});case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(3),console.error(e.t0);case 11:return e.prev=11,this.loading.subadmins=!1,e.finish(11);case 14:case"end":return e.stop()}}),e,this,[[3,8,11,14]])}))),function(e){return _.apply(this,arguments)}),setUserQuota:(y=w(regeneratorRuntime.mark((function e(){var t,s=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:"none",this.loading.quota=!0,t=t.id?t.id:t,e.prev=3,e.next=6,this.$store.dispatch("setUserData",{userid:this.user.id,key:"quota",value:t});case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(3),console.error(e.t0);case 11:return e.prev=11,this.loading.quota=!1,e.finish(11);case 14:return e.abrupt("return",t);case 15:case"end":return e.stop()}}),e,this,[[3,8,11,14]])}))),function(){return y.apply(this,arguments)}),validateQuota:function(e){var t=OC.Util.computerFileSize(e);return null!==t&&t>=0&&this.setUserQuota(OC.Util.humanFileSize(OC.Util.computerFileSize(e)))},setUserLanguage:(b=w(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.loading.languages=!0,e.prev=1,e.next=4,this.$store.dispatch("setUserData",{userid:this.user.id,key:"language",value:t.code});case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),console.error(e.t0);case 9:return e.prev=9,this.loading.languages=!1,e.finish(9);case 12:return e.abrupt("return",t);case 13:case"end":return e.stop()}}),e,this,[[1,6,9,12]])}))),function(e){return b.apply(this,arguments)}),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}))}}},x=Object(m.a)(L,(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.wipe}},[e.loading.delete||e.loading.disable||e.loading.wipe?e._e():s("img",{attrs:{src:e.generateAvatar(e.user.id,32),srcset:e.generateAvatar(e.user.id,64)+" 2x, "+e.generateAvatar(e.user.id,128)+" 4x",alt:"",height:"32",width:"32"}})]),e._v(" "),s("div",{staticClass:"name"},[e._v("\n\t\t"+e._s(e.user.id)+"\n\t")]),e._v(" "),s("div",{staticClass:"obfuscated"},[e._v("\n\t\t"+e._s(e.t("settings","You do not have permissions to see the details of this user"))+"\n\t")])]):e.editing?s("div",{staticClass:"row row--editable",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.wipe}},[e.loading.delete||e.loading.disable||e.loading.wipe?e._e():s("img",{attrs:{src:e.generateAvatar(e.user.id,32),srcset:e.generateAvatar(e.user.id,64)+" 2x, "+e.generateAvatar(e.user.id,128)+" 4x",alt:"",height:"32",width:"32"}})]),e._v(" "),s("div",{staticClass:"displayName"},[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,disabled:e.loading.displayName||e.loading.all,autocapitalize:"off",autocomplete:"new-password",autocorrect:"off",spellcheck:"false",type:"text"},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"})],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,disabled:e.loading.password||e.loading.all,minlength:e.minPasswordLength,placeholder:e.t("settings","Add new password"),autocapitalize:"off",autocomplete:"new-password",autocorrect:"off",required:"",spellcheck:"false",type:"password",value:""}}),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,disabled:e.loading.mailAddress||e.loading.all,placeholder:e.t("settings","Add new email address"),autocapitalize:"off",autocomplete:"new-password",autocorrect:"off",spellcheck:"false",type:"email"},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:{"close-on-select":!1,disabled:e.loading.groups||e.loading.all,limit:2,multiple:!0,options:e.availableGroups,placeholder:e.t("settings","Add user in group"),"tag-width":60,taggable:e.settings.isAdmin,value:e.userGroups,label:"name","tag-placeholder":"create","track-by":"id"},on:{remove:e.removeUserGroup,select:e.addUserGroup,tag:e.createGroup}},[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:{"close-on-select":!1,disabled:e.loading.subadmins||e.loading.all,limit:2,multiple:!0,options:e.subAdminsGroups,placeholder:e.t("settings","Set user as admin for"),"tag-width":60,value:e.userSubAdminsGroups,label:"name","track-by":"id"},on:{remove:e.removeUserSubAdmin,select:e.addUserSubAdmin}},[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:{"allow-empty":!1,disabled:e.loading.quota||e.loading.all,options:e.quotaOptions,placeholder:e.t("settings","Select user quota"),taggable:!0,value:e.userQuota,label:"label","tag-placeholder":"create","track-by":"id"},on:{input:e.setUserQuota,tag:e.validateQuota}})],1),e._v(" "),e.showConfig.showLanguages?s("div",{staticClass:"languages",class:{"icon-loading-small":e.loading.languages}},[s("Multiselect",{staticClass:"multiselect-vue",attrs:{"allow-empty":!1,disabled:e.loading.languages||e.loading.all,options:e.languages,placeholder:e.t("settings","No language set"),value:e.userLanguage,"group-label":"label","group-values":"languages",label:"name","track-by":"code"},on:{input:e.setUserLanguage}})],1):e._e(),e._v(" "),e.showConfig.showStoragePath||e.showConfig.showUserBackend?s("div",{staticClass:"storageLocation"}):e._e(),e._v(" "),e.showConfig.showLastLogin?s("div"):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("Actions",[s("ActionButton",{attrs:{icon:"icon-checkmark"},on:{click:function(t){e.editing=!1}}},[e._v("\n\t\t\t\t\t"+e._s(e.t("settings","Done"))+"\n\t\t\t\t")])],1),e._v(" "),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("PopoverMenu",{attrs:{menu:e.userActions}})],1)],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")])])]):s("UserRowSimple",{attrs:{editing:e.editing,"feedback-message":e.feedbackMessage,groups:e.groups,languages:e.languages,loading:e.loading,"opened-menu":e.openedMenu,settings:e.settings,"show-config":e.showConfig,"sub-admins-groups":e.subAdminsGroups,"user-actions":e.userActions,user:e.user},on:{"update:editing":function(t){e.editing=t},hideMenu:e.hideMenu,toggleMenu:e.toggleMenu}})}),[],!1,null,null,null).exports,S=i(378),G=i.n(S),N={id:"none",label:t("settings","Unlimited")},$={id:"default",label:t("settings","Default quota")},O={id:"",displayName:"",password:"",mailAddress:"",groups:[],subAdminsGroups:[],quota:$,language:{code:"en",name:t("settings","Default language")}},q={name:"UserList",components:{userRow:x,Multiselect:o.Multiselect,InfiniteLoading:G.a},props:{users:{type:Array,default:function(){return[]}},showConfig:{type:Object,required:!0},selectedGroup:{type:String,default:null},externalActions:{type:Array,default:function(){return[]}}},data:function(){return{unlimitedQuota:N,defaultQuota:$,loading:{all:!1,groups:!1},scrolled:!1,searchQuery:"",newUser:Object.assign({},O)}},computed:{settings:function(){return this.$store.getters.getServerData},filteredUsers:function(){return"disabled"===this.selectedGroup?this.users.filter((function(e){return!1===e.enabled})):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[{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.redirectIfDisabled(),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()}},mounted:function(){this.settings.canChangePassword||OC.Notification.showTemporary(t("settings","Password change is disabled because the master key is disabled")),this.resetForm(),this.userSearch=new OCA.Search(this.search,this.resetSearch),this.redirectIfDisabled()},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.newUser.quota=this.quotaOptions[0],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(){this.newUser=Object.assign({},O),this.settings.defaultLanguage&&a.default.set(this.newUser.language,"code",this.settings.defaultLanguage),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]},redirectIfDisabled:function(){var e=this.$store.getters.getGroups;"disabled"===this.selectedGroup&&e.findIndex((function(e){return"disabled"===e.id&&0===e.usercount}))>-1&&(this.$router.push({name:"users"}),this.$refs.infiniteLoading.stateChanger.reset())}}},M=Object(m.a)(q,(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("\n\t\t\t"+e._s(e.t("settings","Username"))+"\n\n\t\t\t"),s("div",{staticClass:"subtitle"},[e._v("\n\t\t\t\t"+e._s(e.t("settings","Display name"))+"\n\t\t\t")])]),e._v(" "),s("div",{staticClass:"password",attrs:{id:"headerPassword"}},[e._v("\n\t\t\t"+e._s(e.t("settings","Password"))+"\n\t\t")]),e._v(" "),s("div",{staticClass:"mailAddress",attrs:{id:"headerAddress"}},[e._v("\n\t\t\t"+e._s(e.t("settings","Email"))+"\n\t\t")]),e._v(" "),s("div",{staticClass:"groups",attrs:{id:"headerGroups"}},[e._v("\n\t\t\t"+e._s(e.t("settings","Groups"))+"\n\t\t")]),e._v(" "),e.subAdminsGroups.length>0&&e.settings.isAdmin?s("div",{staticClass:"subadmins",attrs:{id:"headerSubAdmins"}},[e._v("\n\t\t\t"+e._s(e.t("settings","Group admin for"))+"\n\t\t")]):e._e(),e._v(" "),s("div",{staticClass:"quota",attrs:{id:"headerQuota"}},[e._v("\n\t\t\t"+e._s(e.t("settings","Quota"))+"\n\t\t")]),e._v(" "),e.showConfig.showLanguages?s("div",{staticClass:"languages",attrs:{id:"headerLanguages"}},[e._v("\n\t\t\t"+e._s(e.t("settings","Language"))+"\n\t\t")]):e._e(),e._v(" "),e.showConfig.showUserBackend||e.showConfig.showStoragePath?s("div",{staticClass:"headerUserBackend userBackend"},[e.showConfig.showUserBackend?s("div",{staticClass:"userBackend"},[e._v("\n\t\t\t\t"+e._s(e.t("settings","User backend"))+"\n\t\t\t")]):e._e(),e._v(" "),e.showConfig.showStoragePath?s("div",{staticClass:"subtitle storageLocation"},[e._v("\n\t\t\t\t"+e._s(e.t("settings","Storage location"))+"\n\t\t\t")]):e._e()]):e._e(),e._v(" "),e.showConfig.showLastLogin?s("div",{staticClass:"headerLastLogin lastLogin"},[e._v("\n\t\t\t"+e._s(e.t("settings","Last login"))+"\n\t\t")]):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",disabled:e.settings.newUserGenerateUserID,placeholder:e.settings.newUserGenerateUserID?e.t("settings","Will be autogenerated"):e.t("settings","Username"),autocapitalize:"none",autocomplete:"off",autocorrect:"off",name:"username",pattern:"[a-zA-Z0-9 _\\.@\\-']+",required:"",type:"text"},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",placeholder:e.t("settings","Display name"),autocapitalize:"none",autocomplete:"off",autocorrect:"off",name:"displayname",type:"text"},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",minlength:e.minPasswordLength,placeholder:e.t("settings","Password"),required:""===e.newUser.mailAddress,autocapitalize:"none",autocomplete:"new-password",autocorrect:"off",name:"password",type:"password"},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",placeholder:e.t("settings","Email"),required:""===e.newUser.password||e.settings.newUserRequireEmail,autocapitalize:"none",autocomplete:"off",autocorrect:"off",name:"email",type:"email"},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:{id:"newgroups",required:!e.settings.isAdmin,tabindex:"-1",type:"text"},domProps:{value:e.newUser.groups}}),e._v(" "),s("Multiselect",{staticClass:"multiselect-vue",attrs:{"close-on-select":!1,disabled:e.loading.groups||e.loading.all,multiple:!0,options:e.canAddGroups,placeholder:e.t("settings","Add user in group"),"tag-width":60,taggable:!0,label:"name","tag-placeholder":"create","track-by":"id"},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:{"close-on-select":!1,multiple:!0,options:e.subAdminsGroups,placeholder:e.t("settings","Set user as admin for"),"tag-width":60,label:"name","track-by":"id"},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:{"allow-empty":!1,options:e.quotaOptions,placeholder:e.t("settings","Select user quota"),taggable:!0,label:"label","track-by":"id"},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:{"allow-empty":!1,options:e.languages,placeholder:e.t("settings","Default language"),"group-label":"label","group-values":"languages",label:"name","track-by":"code"},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:{id:"newsubmit",title:e.t("settings","Add a new user"),type:"submit",value:""}})])]),e._v(" "),e._l(e.filteredUsers,(function(t,i){return s("user-row",{key:i,attrs:{"external-actions":e.externalActions,groups:e.groups,languages:e.languages,"quota-options":e.quotaOptions,settings:e.settings,"show-config":e.showConfig,"sub-admins-groups":e.subAdminsGroups,user:t}})})),e._v(" "),s("InfiniteLoading",{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;function P(e){return(P="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(r.a);var D={name:"Users",components:{AppContent:o.AppContent,AppNavigation:o.AppNavigation,AppNavigationItem:o.AppNavigationItem,AppNavigationNew:o.AppNavigationNew,AppNavigationSettings:o.AppNavigationSettings,Content:o.Content,UserList:M,Multiselect:o.Multiselect},props:{selectedGroup:{type:String,default:null}},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}}},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 r={caption:!0,text:t("settings","Groups")};i.unshift(r)}var o=i.find((function(e){return"admin"===e.id})),u=i.find((function(e){return"disabled"===e.id}));i=i.filter((function(e){return-1===["admin","disabled"].indexOf(e.id)})),o&&o.text&&(o.text=t("settings","Admins"),o.icon="icon-user-admin",i.unshift(o)),u&&u.text&&(u.text=t("settings","Disabled users"),u.icon="icon-disabled-users",u.utils&&(u.utils.counter>0||-1===u.utils.counter)&&(i.unshift(u),-1===u.utils.counter&&delete u.utils.counter));var l={id:"everyone",key:"everyone",icon:"icon-contacts-dark",router:{name:"users"},text:t("settings","Everyone")};this.userCount>0&&a.default.set(l,"utils",{counter:this.userCount}),i.unshift(l);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}},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}}})},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"!==P(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}))}}},Q=Object(m.a)(D,(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","allow-empty":!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:{id:"showLanguages",type:"checkbox"},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:{id:"showLastLogin",type:"checkbox"},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:{id:"showUserBackend",type:"checkbox"},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:{id:"showStoragePath",type:"checkbox"},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,"show-config":e.showConfig,"selected-group":e.selectedGroup,"external-actions":e.externalActions},scopedSlots:e._u([{key:"content",fn:function(){},proxy:!0}])})],1)],1)}),[],!1,null,null,null);s.default=Q.exports}}]); //# sourceMappingURL=vue-7.js.map?v=6c529f685f21e5cc01f4