nextcloud/apps/settings/js/vue-settings-users-7b0b6d42...

23 lines
74 KiB
JavaScript
Raw Normal View History

(window.webpackJsonpSettings=window.webpackJsonpSettings||[]).push([[7],{596:function(t,n,e){"use strict";var s=e(65),i=e.n(s),a=e(66),r=e.n(a)()(i.a);r.push([t.i,".cellText{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.icon-more{background-color:var(--color-main-background);border:0}\n","",{version:3,sources:["webpack://./apps/settings/src/components/UserList/UserRowSimple.vue"],names:[],mappings:"AA6LC,UACC,eAAgB,CAChB,sBAAuB,CACvB,kBAAmB,CACpB,WAEC,6CAA8C,CAC9C,QAAS",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t.cellText {\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\twhite-space: nowrap;\n}\n\t.icon-more {\n\t\tbackground-color: var(--color-main-background);\n\t\tborder: 0;\n\t}\n"],sourceRoot:""}]),n.a=r},597:function(t,n,e){"use strict";var s=e(65),i=e.n(s),a=e(66),r=e.n(a)()(i.a);r.push([t.i,".row--menu-opened[data-v-172121d3]{z-index:1 !important}.row[data-v-172121d3] .multiselect__single{z-index:auto !important}\n","",{version:3,sources:["webpack://./apps/settings/src/components/UserList/UserRow.vue"],names:[],mappings:"AA+qBA,mCACC,oBAA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n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// Force menu to be above other rows\n.row--menu-opened {\n\tz-index: 1 !important;\n}\n.row::v-deep .multiselect__single {\n\tz-index: auto !important;\n}\n"],sourceRoot:""}]),n.a=r},598:function(t,n,e){"use strict";var s=e(65),i=e.n(s),a=e(66),r=e.n(a)()(i.a);r.push([t.i,"\n.row[data-v-c4fdcc08] .multiselect__single {\n\tz-index: auto !important;\n}\n","",{version:3,sources:["webpack://./apps/settings/src/components/UserList.vue"],names:[],mappings:";AAilBA;CACA,wBAAA;AACA",sourcesContent:['\x3c!--\n - @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n
/**
* @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 I={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 t=this,n=this.groups.filter((function(n){return t.user.groups.includes(n.id)}));return n},userSubAdminsGroups:function(){var t=this,n=this.subAdminsGroups.filter((function(n){return t.user.subadmin.includes(n.id)}));return n},availableGroups:function(){var t=this;return this.groups.map((function(n){var e=Object.assign({},n);return e.$isDisabled=!1===n.canAdd&&!t.user.groups.includes(n.id)||!1===n.canRemove&&t.user.groups.includes(n.id),e}))},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 t=this.user.quota.quota;t>0?t=Math.min(100,Math.round(this.user.quota.used/t*100)):t=95*(1-1/(this.user.quota.used/(10*Math.pow(2,30))+1));return isNaN(t)?0:t},userQuota:function(){if(this.user.quota.quota>=0){var t=OC.Util.humanFileSize(this.user.quota.quota),n=this.quotaOptions.find((function(n){return n.id===t}));return n||{id:t,label:t}}return"default"===this.user.quota.quota?this.quotaOptions[0]:this.quotaOptions[1]},minPasswordLength:function(){return this.$store.getters.getPasswordPolicyMinLength},userLanguage:function(){var t=this,n=this.languages[0].languages.concat(this.languages[1].languages).find((function(n){return n.code===t.user.language}));return"object"!==F(n)&&""!==this.user.language?{code:this.user.language,name:this.user.language}:""!==this.user.language&&n},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(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:32;return Object(_.generateUrl)("/avatar/{user}/{size}?v={version}",{user:t,size:n,version:oc_userconfig.avatar.version})}}},E={name:"UserRowSimple",components:{PopoverMenu:j.a,ActionButton:a.a,Actions:M.a},directives:{ClickOutside:D.a},mixins:[I],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(t){return t.name})).join(", ")},userSubAdminsGroupsLabels:function(){return this.userSubAdminsGroups.map((function(t){return t.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(z.getCurrentUser)().uid!==this.user.id||this.settings.isAdmin},userQuota:function(){var n=this.user.quota.quota;return"default"===n&&"none"!==(n=this.settings.defaultQuota)&&(n=OC.Util.computerFileSize(n)),"none"===n||-3===n?t("settings","Unlimited"):n>=0?OC.Util.humanFileSize(n):OC.Util.humanFileSize(0)}},methods:{hideMenu:function(){this.$emit("hideMenu")},toggleEdit:function(){this.$emit("update:editing",!0)}}},T=s(64),W=s.n(T),Y=s(596),H={insert:"head",singleton:!1},J=(W()(Y.a,H),Y.a.locals,s(37)),V=Object(J.a)(E,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{staticClass:"row",class:{disabled:t.loading.delete||t.loading.disable},attrs:{"data-id":t.user.id}},[e("div",{staticClass:"avatar",class:{"icon-loading-small":t.loading.delete||t.loading.disable||t.loading.wipe}},[t.loading.delete||t.loading.disable||t.loading.wipe?t._e():e("im
//# sourceMappingURL=vue-settings-users-7b0b6d4251e4b5c2907e.js.map?v=1beea2e0645f6fbcd162