You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nextcloud/apps/settings/js/vue-settings-users.js

25 lines
76 KiB
JavaScript

(window.webpackJsonpSettings=window.webpackJsonpSettings||[]).push([[8],{577:function(t,n,e){"use strict";var s=e(19),i=e.n(s),a=e(20),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}","",{version:3,sources:["webpack://./apps/settings/src/components/UserList/UserRowSimple.vue"],names:[],mappings:"AA6LC,UACC,eAAA,CACA,sBAAA,CACA,kBAAA,CAED,WACC,6CAAA,CACA,QAAA",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},578:function(t,n,e){"use strict";var s=e(19),i=e.n(s),a=e(20),r=e.n(a)()(i.a);r.push([t.i,".row--menu-opened[data-v-88389386]{z-index:1 !important}.row[data-v-88389386] .multiselect__single{z-index:auto !important}","",{version:3,sources:["webpack://./apps/settings/src/components/UserList/UserRow.vue"],names:[],mappings:"AA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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\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},579:function(t,n,e){"use strict";var s=e(19),i=e.n(s),a=e(20),r=e.n(a)()(i.a);r.push([t.i,"\n.modal-wrapper[data-v-b687bf70] {\n\tmargin: 2vh 0;\n\talign-items: flex-start;\n}\n.modal__content[data-v-b687bf70] {\n\tdisplay: flex;\n\tpadding: 20px;\n\tflex-direction: column;\n\talign-items: center;\n\ttext-align: center;\n\toverflow: auto;\n}\n.modal__item[data-v-b687bf70] {\n\tmargin-bottom: 16px;\n\twidth: 100%;\n}\n.modal__item[data-v-b687bf70]:not(:focus):not(:active) {\n\tborder-color: var(--color-border-dark);\n}\n.modal__item[data-v-b687bf70] .multiselect {\n\twidth: 100%;\n}\n.user-actions[data-v-b687bf70] {\n\tmargin-top: 20px;\n}\n.modal__content[data-v-b687bf70] .multiselect__single {\n\ttext-align: left;\n\tbox-sizing: border-box;\n}\n.modal__content[data-v-b687bf70] .multiselect__content-wrapper {\n\tbox-sizing: border-box;\n}\n.row[data-v-b687bf70] .multiselect__single {\n\tz-index: auto !important;\n}\n","",{version:3,sources:["webpack://./apps/settings/src/components/UserList.vue"],names:[],mappings:";AA8kBA;CACA,aAAA;CACA,uBAAA;AACA;AACA;CACA,
/**
* @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>
*
* @author Greta Doci <gretadoci@gmail.com>
* @author John Molakvoæ <skjnldsv@protonmail.com>
* @author Roeland Jago Douma <roeland@famdouma.nl>
*
* @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(U.generateUrl)("/avatar/{user}/{size}?v={version}",{user:t,size:n,version:oc_userconfig.avatar.version})}}},E={name:"UserRowSimple",components:{PopoverMenu:B.a,ActionButton:a.a,Actions:z.a},directives:{ClickOutside:P.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(j.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(18),W=s.n(T),Y=s(577),H={insert:"head",singleton:!1},J=(W()(Y.a,H),Y.a.locals,s(1)),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("img
//# sourceMappingURL=vue-settings-users.js.map?v=b4b33c4b0170b0fed68f