mirror of
https://github.com/nextcloud/server.git
synced 2026-02-18 18:28:50 -05:00
2 lines
2.5 KiB
JavaScript
2 lines
2.5 KiB
JavaScript
import{f as p,c as u,o as b,w as i,e as l,g as m,t as d,h as f}from"./runtime-dom.esm-bundler-nUg13ekW.chunk.mjs";import{c as w}from"./index-ClUK5nWL.chunk.mjs";import{a as g}from"./index-C1xmmKTZ-B_lLl9Ld.chunk.mjs";import{a as S,l as c}from"./index-Ma7sfat2.chunk.mjs";import{t as h}from"./translation-DoG5ZELJ-2ffMJaM4.chunk.mjs";import{c as I}from"./index-b3AfNmc1.chunk.mjs";import{b as M}from"./createElementId-DhjFt1I9-CRJVCjcq.chunk.mjs";import{N as k}from"./NcCheckboxRadioSwitch-BMsPx74L-DIBi32kw.chunk.mjs";import{N}from"./ContentCopy-Cff3hXjy.chunk.mjs";import{g as R}from"./index-6_gsQFyp.chunk.mjs";import"./index-sH3U_332.chunk.mjs";import"./index-DeDXQtUD.chunk.mjs";import"./logger-D3RVzcfQ-B4GxPQ5t.chunk.mjs";import"./mdi-DK5BPbEO.chunk.mjs";import"./NcNoteCard-Cok_4Fld-BLQT242e.chunk.mjs";import"./NcPasswordField-uaMO2pdt-Bb_nZP1o.chunk.mjs";import"./NcInputField-o5OFv3z6-DGXgkff4.chunk.mjs";const T=R().detectLogLevel().setApp("sharebymail").build(),V={name:"AdminSettings",components:{NcCheckboxRadioSwitch:k,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=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 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
|