You can not 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-server/dist/settings-users-3239.js

2 lines
295 KiB

(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[2236,3239,7471],{5409:(e,n,a)=>{"use strict";a.r(n),a.d(n,{default:()=>ht});var i=a(85471),r=a(9165),o=a(53334),s=a(42530),l=a(52439),c=a(27345),d=a(60104),u=a(21376),p=a(85947),A=a(6695),g=a(35810),h=a(63814),m=a(65043),f=a(80236),v=a(14727),C=a(32073),b=a(3226),y=a(67607),_=a(15916),x=a(95668),w=a(36620);const E={name:"UserSettingsDialog",components:{NcAppSettingsDialog:f.N,NcAppSettingsSection:v.A,NcCheckboxRadioSwitch:C.A,NcNoteCard:b.A,NcSelect:y.default},props:{open:{type:Boolean,required:!0}},data:()=>({selectedQuota:!1,loadingSendMail:!1}),computed:{groupSorting:{get(){return this.$store.getters.getGroupSorting===_.q.GroupName?"name":"member-count"},set(t){this.$store.commit("setGroupSorting","name"===t?_.q.GroupName:_.q.UserCount)}},isGroupSortingEnforced(){return this.$store.getters.getServerData.forceSortGroupByName},isModalOpen:{get(){return this.open},set(t){this.$emit("update:open",t)}},showConfig(){return this.$store.getters.getShowConfig},settings(){return this.$store.getters.getServerData},showLanguages:{get(){return this.showConfig.showLanguages},set(t){this.setShowConfig("showLanguages",t)}},showFirstLogin:{get(){return this.showConfig.showFirstLogin},set(t){this.setShowConfig("showFirstLogin",t)}},showLastLogin:{get(){return this.showConfig.showLastLogin},set(t){this.setShowConfig("showLastLogin",t)}},showUserBackend:{get(){return this.showConfig.showUserBackend},set(t){this.setShowConfig("showUserBackend",t)}},showStoragePath:{get(){return this.showConfig.showStoragePath},set(t){this.setShowConfig("showStoragePath",t)}},quotaOptions(){const t=this.settings.quotaPreset.reduce((t,e)=>t.concat({id:e,label:e}),[]);return this.settings.allowUnlimitedQuota&&t.unshift(x.SA),t},defaultQuota:{get(){return!1!==this.selectedQuota?this.selectedQuota:this.settings.defaultQuota!==x.SA.id&&OC.Util.computerFileSize(this.settings.defaultQuota)>=0?{id:this.settings.defaultQuota,label:this.settings.defaultQuota}:x.SA},set(t){this.selectedQuota=t}},sendWelcomeMail:{get(){return this.settings.newUserSendEmail},async set(t){try{this.loadingSendMail=!0,this.$store.commit("setServerData",{...this.settings,newUserSendEmail:t}),await m.Ay.post((0,h.Jv)("/settings/users/preferences/newUser.sendEmail"),{value:t?"yes":"no"})}catch(t){w.A.error("Could not update newUser.sendEmail preference",{error:t})}finally{this.loadingSendMail=!1}}}},methods:{filterQuotas(t,e,n){const a=n.toLocaleLowerCase().replaceAll(/\s/g,"");return(e||"").toLocaleLowerCase().replaceAll(/\s/g,"").indexOf(a)>-1},setShowConfig(t,e){this.$store.commit("setShowConfig",{key:t,value:e})},validateQuota(t){"object"==typeof t&&(t=t?.id||t.label);const e=(0,g.lT)(t,!0);return null===e?x.SA:{id:t=(0,g.v7)(e),label:t}},setDefaultQuota(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"none";"none"===t&&(t=x.SA),this.$store.dispatch("setAppConfig",{app:"files",key:"default_quota",value:t.id?t.id:t}).then(()=>{"object"!=typeof t&&(t={id:t,label:t}),this.defaultQuota=t})}}};var k=a(85072),B=a.n(k),N=a(97825),S=a.n(N),D=a(77659),I=a.n(D),T=a(55056),L=a.n(T),P=a(10540),G=a.n(P),O=a(41113),F=a.n(O),U=a(6817),R={};R.styleTagTransform=F(),R.setAttributes=L(),R.insert=I().bind(null,"head"),R.domAPI=S(),R.insertStyleElement=G(),B()(U.A,R),U.A&&U.A.locals&&U.A.locals;var q=a(14486);const M=(0,q.A)(E,function(){var t=this,e=t._self._c;return e("NcAppSettingsDialog",{attrs:{open:t.isModalOpen,"show-navigation":!0,name:t.t("settings","Account management settings")},on:{"update:open":function(e){t.isModalOpen=e}}},[e("NcAppSettingsSection",{attrs:{id:"visibility-settings",name:t.t("settings","Visibility")}},[e("NcCheckboxRadioSwitch",{attrs:{type:"switch","data-test":"showLanguages",checked:t.showLanguages},on:{"update:checked":function(e){t.showLanguages=e}}},[t._v("\n\t\t\t"+t._s(t.t("settings","Show language"))+"\n\t\t")]),t._v(" "),e("NcCheckboxRadioSwitch",{attrs:{type:"switch","data-test":"showUserBackend",checked:t.showUserBackend},on:{"update:checked":function(e){t.showUserBackend=e}}},[t._v("\n
//# sourceMappingURL=settings-users-3239.js.map?v=2d54ece08a14ffbd5af1