mirror of
https://github.com/nextcloud/server.git
synced 2026-06-26 00:55:54 -04: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-cd4tMQOC.chunk.mjs";import{c as w}from"./index-CPwHjAPR.chunk.mjs";import{a as g}from"./index-C1xmmKTZ-BfviRmbX.chunk.mjs";import{a as S,l as c}from"./index-BgmsSgl5.chunk.mjs";import{t as h}from"./translation-DoG5ZELJ-DFt3Gk_P.chunk.mjs";import{c as I}from"./index-CXHO4UEV.chunk.mjs";import{b as M}from"./createElementId-DhjFt1I9-yLNeGKRZ.chunk.mjs";import{N as k}from"./NcCheckboxRadioSwitch-D0gFwEVl-CQqKxPRl.chunk.mjs";import{N}from"./ContentCopy-DqUCQg_O.chunk.mjs";import{g as R}from"./index-DqIuD5e7.chunk.mjs";import"./index-sH3U_332.chunk.mjs";import"./index-Bos-XXa5.chunk.mjs";import"./logger-D3RVzcfQ-BiFhTTAc.chunk.mjs";import"./mdi-e8YUrhPH.chunk.mjs";import"./NcNoteCard-CWiO3Dse-UE7osDtD.chunk.mjs";import"./NcPasswordField-BOLzDHBJ-CjV6dvT3.chunk.mjs";import"./TrashCanOutline-COyEKQVc.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
|