mirror of
https://github.com/nextcloud/server.git
synced 2026-05-19 08:25:56 -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"./preload-helper-D9xEqq8S.chunk.mjs";import{c as w}from"./index-DqG-5vGV.chunk.mjs";import{a as g}from"./index-C1xmmKTZ-XKFVqjxi.chunk.mjs";import{_ as S,l as c}from"./public-CvthP4YJ.chunk.mjs";import{t as h}from"./translation-DoG5ZELJ-8aobdbPK.chunk.mjs";import{c as I}from"./index-b06SCjVD.chunk.mjs";import{g as k,c as M}from"./index-Bp9-GhMo.chunk.mjs";import{N}from"./NcCheckboxRadioSwitch-D0gFwEVl-C7shEyvA.chunk.mjs";import{N as R}from"./ContentCopy-BThU2vZd.chunk.mjs";import"./util-Caafb9Jl.chunk.mjs";import"./NcDialog-nDc1gW50-BF3zId_C.chunk.mjs";import"./NcModal-kyWZ3UFC-DO8otox5.chunk.mjs";import"./ArrowRight-YxbwZNEK.chunk.mjs";import"./Web-7MW_v0ET.chunk.mjs";import"./TrashCanOutline-COIylzhj.chunk.mjs";import"./mdi-B3j1XNhV.chunk.mjs";import"./NcPasswordField-BOLzDHBJ-BKSfVdzU.chunk.mjs";import"./NcInputField-CPL-a_MM-BYLCq7JD.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
|