nextcloud/apps/settings/js/vue-5.js

23 lines
51 KiB
JavaScript
Raw Normal View History

(window.webpackJsonpSettings=window.webpackJsonpSettings||[]).push([[5],{492:function(e,t,s){var i=s(584);"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);(0,s(172).default)("50a53998",i,!0,{})},493:function(e,t,s){var i=s(586);"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);(0,s(172).default)("ff8e8434",i,!0,{})},494:function(e,t,s){var i=s(589);"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);(0,s(172).default)("0ac9816e",i,!0,{})},495:function(e,t,s){var i=s(591);"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);(0,s(172).default)("f786222e",i,!0,{})},583:function(e,t,s){"use strict";var i=s(492);s.n(i).a},584:function(e,t,s){(t=s(171)(!1)).push([e.i,"\n.cellText[data-v-4e4f161e] {\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n",""]),e.exports=t},585:function(e,t,s){"use strict";var i=s(493);s.n(i).a},586:function(e,t,s){(t=s(171)(!1)).push([e.i,".row--menu-opened[data-v-f7a44eec]{z-index:1 !important}.row[data-v-f7a44eec] .multiselect__single{z-index:auto !important}\n",""]),e.exports=t},588:function(e,t,s){"use strict";var i=s(494);s.n(i).a},589:function(e,t,s){(t=s(171)(!1)).push([e.i,"\n.row[data-v-7a9ad4cb] .multiselect__single {\n\tz-index: auto !important;\n}\n",""]),e.exports=t},590:function(e,t,s){"use strict";var i=s(495);s.n(i).a},591:function(e,t,s){(t=s(171)(!1)).push([e.i,"#usergrouplist #addgroup[data-v-3f4df62a] .app-navigation-entry__utils{display:none}\n",""]),e.exports=t},603:function(e,s,i){"use strict";i.r(s);var n=i(530),a=i.n(n),r=i(498),o=i.n(r),u=i(499),l=i.n(u),d=i(531),c=i.n(d),g=i(500),p=i.n(g),h=i(501),m=i.n(h),f=i(532),v=i.n(f),w=i(533),b=i.n(w),_=i(30),y=i.n(_),C=i(502),A=i.n(C),U=i(354),k=i(534),L=i.n(k),x=i(11),S=i(503),G=i.n(S),M=i(504),N=i.n(M),O=i(98),$=i(162),P=i(535);function q(e){return(q="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æ <skjnldsv@protonmail.com>
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @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 <http://www.gnu.org/licenses/>.
*
*/var D={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"!==q(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})}}},B={name:"UserRowSimple",components:{PopoverMenu:$.PopoverMenu,ActionButton:$.ActionButton,Actions:$.Actions},directives:{ClickOutside:N.a},mixins:[D],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(P.getCurrentUser)().uid!==this.user.id&&"admin"!==this.user.id}},methods:{hideMenu:function(){this.$emit("hideMenu")},toggleEdit:function(){this.$emit("update:editing",!0)}}},Q=(i(583),i(41)),j=Object(Q.a)(B,(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("d
//# sourceMappingURL=vue-5.js.map?v=7088b3300fd7dbca730a