3 lines
1.9 KiB
JavaScript
3 lines
1.9 KiB
JavaScript
import{_ as u,N as b,a as w,r as l,c as f,o as g,w as r,b as d,d as p,t as m,g as S,e as I,f as c,l as h,h as M}from"./TrashCanOutline-Das_T9Qh.chunk.mjs";import{g as k,s as R}from"./Plus-BBJJAKrt.chunk.mjs";import{c as T}from"./index-C7yOPZIm.chunk.mjs";const V=k().detectLogLevel().setApp("sharebymail").build(),v={name:"AdminSettings",components:{NcCheckboxRadioSwitch:w,NcSettingsSection:b},setup(){return{t:c}},data(){return{sendPasswordMail:h("sharebymail","sendPasswordMail"),replyToInitiator:h("sharebymail","replyToInitiator")}},watch:{sendPasswordMail(e){this.update("sendpasswordmail",e)},replyToInitiator(e){this.update("replyToInitiator",e)}},methods:{async update(e,a){await T();const o=S("/apps/provisioning_api/api/v1/config/apps/{appId}/{key}",{appId:"sharebymail",key:e}),t=a?"yes":"no";try{const{data:s}=await I.post(o,{value:t});this.handleResponse({status:s.ocs?.meta?.status})}catch(s){this.handleResponse({errorMessage:c("sharebymail","Unable to update share by mail config"),error:s})}},async handleResponse({status:e,errorMessage:a,error:o}){e!=="ok"&&(R(a),V.error(a,{error:o}))}}};function N(e,a,o,t,s,x){const n=l("NcCheckboxRadioSwitch"),y=l("NcSettingsSection");return g(),f(y,{name:t.t("sharebymail","Share by mail"),description:t.t("sharebymail","Allows people to share a personalized link to a file or folder by putting in an email address.")},{default:r(()=>[d(n,{modelValue:s.sendPasswordMail,"onUpdate:modelValue":a[0]||(a[0]=i=>s.sendPasswordMail=i),type:"switch"},{default:r(()=>[p(m(t.t("sharebymail","Send password by mail")),1)]),_:1},8,["modelValue"]),d(n,{modelValue:s.replyToInitiator,"onUpdate:modelValue":a[1]||(a[1]=i=>s.replyToInitiator=i),type:"switch"},{default:r(()=>[p(m(t.t("sharebymail","Reply to initiator")),1)]),_:1},8,["modelValue"])]),_:1},8,["name","description"])}const P=u(v,[["render",N]]),_=M(P);_.mount("#vue-admin-sharebymail");
|
|
//# sourceMappingURL=sharebymail-admin-settings.mjs.map
|