mirror of
https://github.com/nextcloud/server.git
synced 2026-05-20 09:12:51 -04:00
2 lines
2.3 KiB
JavaScript
2 lines
2.3 KiB
JavaScript
import{g as u,r as l,c as b,o as f,w as i,b as p,e as d,f as m,t as c,l as h,h as w}from"./mdi-B9XVyi7B.chunk.mjs";import{c as g}from"./index-BOuI_nzB.chunk.mjs";import{s as S}from"./index-JpgrUA2Z-ClfXhQGo.chunk.mjs";import{c as I}from"./index-Cw0X5oEx.chunk.mjs";import{_ as M,g as k}from"./_plugin-vue_export-helper-CDPKodk-.chunk.mjs";import{N}from"./NcCheckboxRadioSwitch-BCSKF7Tk-bH1fDMyQ.chunk.mjs";import{N as R}from"./ContentCopy-CFmC6HSf.chunk.mjs";import"./string_decoder-mL5xNZ9K.chunk.mjs";import"./NcNoteCard-CVhtNL04-BSciYEDO.chunk.mjs";import"./PencilOutline-BWbwYeLs.chunk.mjs";import"./NcPasswordField-djttkA5Q-BxuGevvX.chunk.mjs";import"./NcInputField-Bwsh2aHY-kbXSi5f0.chunk.mjs";const T=u().detectLogLevel().setApp("sharebymail").build(),V={name:"AdminSettings",components:{NcCheckboxRadioSwitch:N,NcSettingsSection:R},setup(){return{t:c}},data(){return{sendPasswordMail:h("sharebymail","sendPasswordMail"),replyToInitiator:h("sharebymail","replyToInitiator")}},watch:{sendPasswordMail(e){this.update("sendpasswordmail",e)},replyToInitiator(e){this.update("replyToInitiator",e)}},methods:{async update(e,a){await I();const o=k("/apps/provisioning_api/api/v1/config/apps/{appId}/{key}",{appId:"sharebymail",key:e}),t=a?"yes":"no";try{const{data:s}=await g.post(o,{value:t});this.handleResponse({status:s.ocs?.meta?.status})}catch(s){this.handleResponse({errorMessage:c("sharebymail","Unable to update share by mail config"),error:s})}},async handleResponse({status:e,errorMessage:a,error:o}){e!=="ok"&&(S(a),T.error(a,{error:o}))}}};function v(e,a,o,t,s,x){const n=l("NcCheckboxRadioSwitch"),y=l("NcSettingsSection");return f(),b(y,{name:t.t("sharebymail","Share by mail"),description:t.t("sharebymail","Allows people to share a personalized link to a file or folder by putting in an email address.")},{default:i(()=>[p(n,{modelValue:s.sendPasswordMail,"onUpdate:modelValue":a[0]||(a[0]=r=>s.sendPasswordMail=r),type:"switch"},{default:i(()=>[d(m(t.t("sharebymail","Send password by mail")),1)]),_:1},8,["modelValue"]),p(n,{modelValue:s.replyToInitiator,"onUpdate:modelValue":a[1]||(a[1]=r=>s.replyToInitiator=r),type:"switch"},{default:i(()=>[d(m(t.t("sharebymail","Reply to initiator")),1)]),_:1},8,["modelValue"])]),_:1},8,["name","description"])}const P=M(V,[["render",v]]),_=w(P);_.mount("#vue-admin-sharebymail");
|
|
//# sourceMappingURL=sharebymail-admin-settings.mjs.map
|