mirror of
https://github.com/nextcloud/server.git
synced 2026-06-28 10:01:35 -04:00
2 lines
2.6 KiB
JavaScript
2 lines
2.6 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"./Web-ByHSuvRG.chunk.mjs";import{c as w}from"./index-D-iKxf2E.chunk.mjs";import{a as g}from"./index-DL1yHC1K-orb-zzee.chunk.mjs";import{_ as S,l as c}from"./public-C1mLBHT3.chunk.mjs";import{t as h}from"./translation-DoG5ZELJ-C5oC8Tcn.chunk.mjs";import{c as I}from"./index-BTFugZfg.chunk.mjs";import{g as k,c as M}from"./index-C6ey-Mhx.chunk.mjs";import{N}from"./NcCheckboxRadioSwitch-D8Dfv4iw-B_doZ1-m.chunk.mjs";import{N as R}from"./ContentCopy-DX69rUn6.chunk.mjs";import"./util-djQ-4xJ5.chunk.mjs";import"./index-BRuD4Qrz.chunk.mjs";import"./NcModal-DUWLRm_F-C0gD58QY.chunk.mjs";import"./logger-D3RVzcfQ-B261d025.chunk.mjs";import"./createElementId-DhjFt1I9-CZ2eH1SD.chunk.mjs";import"./TrashCanOutline-CW4_EEhq.chunk.mjs";import"./mdi-Ci0zJ0QG.chunk.mjs";import"./NcPasswordField-Be5_qcfm-DrwSQ-mu.chunk.mjs";import"./NcInputField-B1bGxYHt-DVZQKody.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(t){this.update("sendpasswordmail",t)},replyToInitiator(t){this.update("replyToInitiator",t)}},methods:{async update(t,a){await I();const s=M("/apps/provisioning_api/api/v1/config/apps/{appId}/{key}",{appId:"sharebymail",key:t}),o=a?"yes":"no";try{const{data:e}=await w.post(s,{value:o});this.handleResponse({status:e.ocs?.meta?.status})}catch(e){this.handleResponse({errorMessage:h("sharebymail","Unable to update share by mail config"),error:e})}},async handleResponse({status:t,errorMessage:a,error:s}){t!=="ok"&&(g(a),T.error(a,{error:s}))}}};function v(t,a,s,o,e,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:e.sendPasswordMail,"onUpdate:modelValue":a[0]||(a[0]=r=>e.sendPasswordMail=r),type:"switch"},{default:i(()=>[m(d(o.t("sharebymail","Send password by mail")),1)]),_:1},8,["modelValue"]),l(n,{modelValue:e.replyToInitiator,"onUpdate:modelValue":a[1]||(a[1]=r=>e.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
|