12 |
- /*! third party licenses: dist/vendor.LICENSE.txt */
- import{G as l,ai as p,b_ as n,b$ as m,bR as h,aV as c,bS as y}from"./core-common.mjs";import"./chunks/index-PaKKd09k.mjs";import{z as u}from"./chunks/_plugin-vue2_normalizer-VrK6B12S-BQkexw0P.mjs";import{x as b}from"./chunks/index-CDMqmWCu.mjs";/* empty css */import{n as w}from"./chunks/icons-TElqpmA8.mjs";const f={name:"AdminSettings",components:{NcCheckboxRadioSwitch:l,NcSettingsSection:p},data(){return{sendPasswordMail:n("sharebymail","sendPasswordMail"),replyToInitiator:n("sharebymail","replyToInitiator")}},methods:{async update(a,s){var i,r;await b();const e=m("/apps/provisioning_api/api/v1/config/apps/{appId}/{key}",{appId:"sharebymail",key:a}),d=s?"yes":"no";try{const{data:o}=await h.post(e,{value:d});this.handleResponse({status:(r=(i=o.ocs)==null?void 0:i.meta)==null?void 0:r.status})}catch(o){this.handleResponse({errorMessage:t("sharebymail","Unable to update share by mail config"),error:o})}},async handleResponse({status:a,errorMessage:s,error:e}){a!=="ok"&&(u(s),console.error(s,e))}}};var k=function(){var a=this,s=a._self._c;return s("NcSettingsSection",{attrs:{name:a.t("sharebymail","Share by mail"),description:a.t("sharebymail","Allows people to share a personalized link to a file or folder by putting in an email address.")}},[s("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:a.sendPasswordMail},on:{"update:checked":[function(e){a.sendPasswordMail=e},function(e){return a.update("sendpasswordmail",a.sendPasswordMail)}]}},[a._v(" "+a._s(a.t("sharebymail","Send password by mail"))+" ")]),s("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:a.replyToInitiator},on:{"update:checked":[function(e){a.replyToInitiator=e},function(e){return a.update("replyToInitiator",a.replyToInitiator)}]}},[a._v(" "+a._s(a.t("sharebymail","Reply to initiator"))+" ")])],1)},S=[],g=w(f,k,S,!1,null,null);const v=g.exports;c.mixin({methods:{t:y}});const _=c.extend(v);new _().$mount("#vue-admin-sharebymail");
|