nextcloud/dist/sharebymail-admin-settings.mjs
Julien Veyssier 9464eabad7
chore(assets): compile assets
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2026-02-23 15:30:43 +01:00

2 lines
2.6 KiB
JavaScript

import{i as p,g as u,o as b,w as i,h as l,j as m,t as d,k as f}from"./runtime-dom.esm-bundler-w0tDt7Gi.chunk.mjs";import{c as w}from"./index-2HC-5o-4.chunk.mjs";import{a as g}from"./index-C1xmmKTZ-zpf0CQaW.chunk.mjs";import{a as S,l as c}from"./index-Ma7sfat2.chunk.mjs";import{t as h}from"./translation-DoG5ZELJ-Bni_xMHF.chunk.mjs";import{c as I}from"./index-Ds96fp_Y.chunk.mjs";import{b as k}from"./createElementId-DhjFt1I9-B1fq6aa1.chunk.mjs";import{N as M}from"./NcCheckboxRadioSwitch-BMsPx74L-_RgKMJqI.chunk.mjs";import{N}from"./ContentCopy-CgZpiJBj.chunk.mjs";import{g as R}from"./index-Bndk0DrU.chunk.mjs";import"./index-sH3U_332.chunk.mjs";import"./index-1X7ElQaR.chunk.mjs";import"./NcModal-DHryP_87-BkYzWFXJ.chunk.mjs";import"./autolink-U5pBzLgI-2h5mm9kB.chunk.mjs";import"./Web-DzGiDslj.chunk.mjs";import"./mdi-YPhQfxXZ.chunk.mjs";import"./NcPasswordField-uaMO2pdt-PEl2ADM3.chunk.mjs";import"./NcInputField-o5OFv3z6-BKcArNCr.chunk.mjs";const T=R().detectLogLevel().setApp("sharebymail").build(),V={name:"AdminSettings",components:{NcCheckboxRadioSwitch:M,NcSettingsSection:N},setup(){return{t:h}},data(){return{sendPasswordMail:c("sharebymail","sendPasswordMail"),replyToInitiator:c("sharebymail","replyToInitiator")}},watch:{sendPasswordMail(e){this.update("sendpasswordmail",e)},replyToInitiator(e){this.update("replyToInitiator",e)}},methods:{async update(e,a){await I();const s=k("/apps/provisioning_api/api/v1/config/apps/{appId}/{key}",{appId:"sharebymail",key:e}),o=a?"yes":"no";try{const{data:t}=await w.post(s,{value:o});this.handleResponse({status:t.ocs?.meta?.status})}catch(t){this.handleResponse({errorMessage:h("sharebymail","Unable to update share by mail config"),error:t})}},async handleResponse({status:e,errorMessage:a,error:s}){e!=="ok"&&(g(a),T.error(a,{error:s}))}}};function v(e,a,s,o,t,x){const n=p("NcCheckboxRadioSwitch"),y=p("NcSettingsSection");return b(),u(y,{name:o.t("sharebymail","Share by mail"),description:o.t("sharebymail","Allows people to share a personalized link to a file or folder by putting in an email address.")},{default:i(()=>[l(n,{modelValue:t.sendPasswordMail,"onUpdate:modelValue":a[0]||(a[0]=r=>t.sendPasswordMail=r),type:"switch"},{default:i(()=>[m(d(o.t("sharebymail","Send password by mail")),1)]),_:1},8,["modelValue"]),l(n,{modelValue:t.replyToInitiator,"onUpdate:modelValue":a[1]||(a[1]=r=>t.replyToInitiator=r),type:"switch"},{default:i(()=>[m(d(o.t("sharebymail","Reply to initiator")),1)]),_:1},8,["modelValue"])]),_:1},8,["name","description"])}const P=S(V,[["render",v]]),_=f(P);_.mount("#vue-admin-sharebymail");
//# sourceMappingURL=sharebymail-admin-settings.mjs.map