nextcloud/settings/js/vue-7.js

2 lines
36 KiB
JavaScript
Raw Normal View History

(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{71:function(e,s,a){"use strict";a.r(s);var i=a(17),n={props:["item"]},o=a(4),r={name:"popoverMenu",props:["menu"],components:{popoverItem:Object(o.a)(n,function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("li",[e.item.href?s("a",{attrs:{href:e.item.href?e.item.href:"#",target:e.item.target?e.item.target:"",rel:"noreferrer noopener"},on:{click:e.item.action}},[s("span",{class:e.item.icon}),e._v(" "),e.item.text?s("span",[e._v(e._s(e.item.text))]):e.item.longtext?s("p",[e._v(e._s(e.item.longtext))]):e._e()]):e.item.action?s("button",{on:{click:e.item.action}},[s("span",{class:e.item.icon}),e._v(" "),e.item.text?s("span",[e._v(e._s(e.item.text))]):e.item.longtext?s("p",[e._v(e._s(e.item.longtext))]):e._e()]):s("span",{staticClass:"menuitem"},[s("span",{class:e.item.icon}),e._v(" "),e.item.text?s("span",[e._v(e._s(e.item.text))]):e.item.longtext?s("p",[e._v(e._s(e.item.longtext))]):e._e()])])},[],!1,null,null,null).exports}},u=Object(o.a)(r,function(){var e=this.$createElement,t=this._self._c||e;return t("ul",this._l(this.menu,function(e,s){return t("popover-item",{key:s,attrs:{item:e}})}),1)},[],!1,null,null,null).exports,l=a(66),d=a.n(l),c=a(64),g=a.n(c),h=a(2),p=a(45);function m(e){return(m="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)}h.a.use(p.a);var f={name:"userRow",props:["user","settings","groups","subAdminsGroups","quotaOptions","showConfig","languages","externalActions"],components:{popoverMenu:u,Multiselect:g.a},directives:{ClickOutside:d.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"!==m(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/{u
//# sourceMappingURL=vue-7.js.map