mirror of
https://github.com/nextcloud/server.git
synced 2026-03-28 13:23:49 -04:00
2 lines
2.6 KiB
JavaScript
2 lines
2.6 KiB
JavaScript
import{s as p,o as u,g as b,w as i,h as l,v as m,t as d,x as f}from"./runtime-dom.esm-bundler-CKxgtjB6.chunk.mjs";import{c as w}from"./index-2a6kOrDy.chunk.mjs";import{a as g}from"./index-C1xmmKTZ-DF4bDPEh.chunk.mjs";import{a as S,l as c}from"./index-BgmsSgl5.chunk.mjs";import{t as h}from"./translation-DoG5ZELJ-XUrtIRvk.chunk.mjs";import{c as I}from"./index-BJDJuif3.chunk.mjs";import{b as M}from"./createElementId-DhjFt1I9-DdwCqgaq.chunk.mjs";import{N as k}from"./NcCheckboxRadioSwitch-D0gFwEVl-BbcIGLyw.chunk.mjs";import{N as v}from"./ContentCopy-ljx8CODs.chunk.mjs";import{g as N}from"./index-Bndk0DrU.chunk.mjs";import"./index-sH3U_332.chunk.mjs";import"./index-CrY7NZWO.chunk.mjs";import"./NcModal-kyWZ3UFC-CC38MZrD.chunk.mjs";import"./autolink-U5pBzLgI-D1NMH9bI.chunk.mjs";import"./Web-DS-WBH9c.chunk.mjs";import"./mdi--cNatcgF.chunk.mjs";import"./NcPasswordField-BOLzDHBJ-CKSnPt2n.chunk.mjs";import"./NcInputField-CPL-a_MM-R1bsVnGI.chunk.mjs";const R=N().detectLogLevel().setApp("sharebymail").build(),T={name:"AdminSettings",components:{NcCheckboxRadioSwitch:k,NcSettingsSection:v},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),R.error(a,{error:s}))}}};function V(e,a,s,o,t,_){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(T,[["render",V]]),x=f(P);x.mount("#vue-admin-sharebymail");
|
|
//# sourceMappingURL=sharebymail-admin-settings.mjs.map
|