Files
nextcloud-server-mirror/dist/sharebymail-admin-settings.mjs
2026-10-05 10:10:14 +00:00

3 lines
2.5 KiB
JavaScript

import{r as p,o as u,c as b,w as i,k as l,j as m,t as d,e as f}from"./preload-helper-CseRDAJ7.chunk.mjs";import{c as w}from"./TrashCanOutline-DwcDrXRM.chunk.mjs";import{a as g}from"./index-Cc_UePRz.chunk.mjs";import{_ as S,l as c}from"./public-Cpb8_kIm.chunk.mjs";import{t as h}from"./fileSize-G68jp3EG.chunk.mjs";import{c as I}from"./index-CkjJ6CBQ.chunk.mjs";import{g as k,c as M}from"./formatRelative-CRa9J-kT.chunk.mjs";import{N}from"./NcCheckboxRadioSwitch-wO334SEx.chunk.mjs";import{N as R}from"./ContentCopy-CENjD2Uc.chunk.mjs";import"./index-C34MMVmr.chunk.mjs";import"./NcModal-71nQ0O0g.chunk.mjs";import"./ArrowRight-gS7jb_sQ.chunk.mjs";import"./createElementId-Dh4E-ofN.chunk.mjs";import"./PencilOutline-Cfr8gsXf.chunk.mjs";import"./NcNoteCard-RF8V1iI7.chunk.mjs";import"./NcPasswordField-BX7X04-n.chunk.mjs";import"./Web-B-Jofi4I.chunk.mjs";const T=k().detectLogLevel().setApp("sharebymail").build(),V={name:"AdminSettings",components:{NcCheckboxRadioSwitch:N,NcSettingsSection:R},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=M("/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 u(),b(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