nextcloud/dist/sharebymail-admin-settings.mjs
nextcloud-command 34330db471 chore(assets): Recompile assets
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2025-12-22 01:20:41 +00:00

2 lines
2.2 KiB
JavaScript

import{_ as u,r as l,c as b,o as w,w as i,a as d,b as p,t as m,g as f,d as c,l as h,e as g}from"./_plugin-vue_export-helper-CHk-KayZ.chunk.mjs";import{c as S}from"./index-CJnHA-ay.chunk.mjs";import{s as I}from"./index-JpgrUA2Z-GsgkY2h-.chunk.mjs";import{c as M}from"./index-Cz_4vBxx.chunk.mjs";import{N as k}from"./NcCheckboxRadioSwitch-BCSKF7Tk-B2wtlmg8.chunk.mjs";import{N}from"./ContentCopy-BK29Bnbg.chunk.mjs";import{g as R}from"./NcNoteCard-CVhtNL04-BVjiKsjs.chunk.mjs";import"./index-Be9gOeWa.chunk.mjs";import"./NcPasswordField-djttkA5Q-CYsmeZEg.chunk.mjs";import"./TrayArrowDown-BNRywMJ_.chunk.mjs";const T=R().detectLogLevel().setApp("sharebymail").build(),V={name:"AdminSettings",components:{NcCheckboxRadioSwitch:k,NcSettingsSection:N},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 M();const o=f("/apps/provisioning_api/api/v1/config/apps/{appId}/{key}",{appId:"sharebymail",key:e}),t=a?"yes":"no";try{const{data:s}=await S.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"&&(I(a),T.error(a,{error:o}))}}};function v(e,a,o,t,s,x){const n=l("NcCheckboxRadioSwitch"),y=l("NcSettingsSection");return w(),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(()=>[d(n,{modelValue:s.sendPasswordMail,"onUpdate:modelValue":a[0]||(a[0]=r=>s.sendPasswordMail=r),type:"switch"},{default:i(()=>[p(m(t.t("sharebymail","Send password by mail")),1)]),_:1},8,["modelValue"]),d(n,{modelValue:s.replyToInitiator,"onUpdate:modelValue":a[1]||(a[1]=r=>s.replyToInitiator=r),type:"switch"},{default:i(()=>[p(m(t.t("sharebymail","Reply to initiator")),1)]),_:1},8,["modelValue"])]),_:1},8,["name","description"])}const P=u(V,[["render",v]]),_=g(P);_.mount("#vue-admin-sharebymail");
//# sourceMappingURL=sharebymail-admin-settings.mjs.map