nextcloud-server/dist/dav-settings-admin-caldav.mjs

3 lines
4.4 KiB
JavaScript

import{l as i,_ as f,N as g,a as b,r as p,c as R,o as E,w as r,h as n,b as c,d as u,t as l,e as C,i as S,f as m,g as V}from"./NcSettingsSection-DFav6ob5-DwBgvX10.chunk.mjs";const h=i("dav","userSyncCalendarsDocUrl","#"),k={name:"CalDavSettings",components:{NcCheckboxRadioSwitch:b,NcSettingsSection:g},setup(){return{t:m}},data(){return{userSyncCalendarsDocUrl:h,sendInvitations:i("dav","sendInvitations"),generateBirthdayCalendar:i("dav","generateBirthdayCalendar"),sendEventReminders:i("dav","sendEventReminders"),sendEventRemindersToSharedUsers:i("dav","sendEventRemindersToSharedUsers"),sendEventRemindersPush:i("dav","sendEventRemindersPush")}},computed:{hint(){return m("dav","Also install the {calendarappstoreopen}Calendar app{linkclose}, or {calendardocopen}connect your desktop & mobile for syncing ↗{linkclose}.").replace("{calendarappstoreopen}",'<a target="_blank" href="../apps/office/calendar">').replace("{calendardocopen}",`<a target="_blank" href="${h}" rel="noreferrer noopener">`).replace(/\{linkclose\}/g,"</a>")},sendInvitationsHelpText(){return m("dav","Please make sure to properly set up {emailopen}the email server{linkclose}.").replace("{emailopen}",'<a href="../admin#mail_general_settings">').replace("{linkclose}","</a>")},sendEventRemindersHelpText(){return m("dav","Please make sure to properly set up {emailopen}the email server{linkclose}.").replace("{emailopen}",'<a href="../admin#mail_general_settings">').replace("{linkclose}","</a>")}},watch:{generateBirthdayCalendar(d){const e=d?"/apps/dav/enableBirthdayCalendar":"/apps/dav/disableBirthdayCalendar";C.post(S(e))},sendInvitations(d){OCP.AppConfig.setValue("dav","sendInvitations",d?"yes":"no")},sendEventReminders(d){OCP.AppConfig.setValue("dav","sendEventReminders",d?"yes":"no")},sendEventRemindersToSharedUsers(d){OCP.AppConfig.setValue("dav","sendEventRemindersToSharedUsers",d?"yes":"no")},sendEventRemindersPush(d){OCP.AppConfig.setValue("dav","sendEventRemindersPush",d?"yes":"no")}}},T=["innerHTML"],w=["innerHTML"],_=["innerHTML"],U={class:"indented"},P={class:"indented"};function H(d,e,x,s,a,v){const o=p("NcCheckboxRadioSwitch"),y=p("NcSettingsSection");return E(),R(y,{name:s.t("dav","Calendar server"),"doc-url":a.userSyncCalendarsDocUrl},{default:r(()=>[n("p",{class:"settings-hint",innerHTML:v.hint},null,8,T),n("p",null,[c(o,{id:"caldavSendInvitations",modelValue:a.sendInvitations,"onUpdate:modelValue":e[0]||(e[0]=t=>a.sendInvitations=t),type:"switch"},{default:r(()=>[u(l(s.t("dav","Send invitations to attendees")),1)]),_:1},8,["modelValue"]),n("em",{innerHTML:v.sendInvitationsHelpText},null,8,w)]),n("p",null,[c(o,{id:"caldavGenerateBirthdayCalendar",modelValue:a.generateBirthdayCalendar,"onUpdate:modelValue":e[1]||(e[1]=t=>a.generateBirthdayCalendar=t),type:"switch",class:"checkbox"},{default:r(()=>[u(l(s.t("dav","Automatically generate a birthday calendar")),1)]),_:1},8,["modelValue"]),n("em",null,l(s.t("dav","Birthday calendars will be generated by a background job.")),1),e[5]||(e[5]=n("br",null,null,-1)),n("em",null,l(s.t("dav","Hence they will not be available immediately after enabling but will show up after some time.")),1)]),n("p",null,[c(o,{id:"caldavSendEventReminders",modelValue:a.sendEventReminders,"onUpdate:modelValue":e[2]||(e[2]=t=>a.sendEventReminders=t),type:"switch"},{default:r(()=>[u(l(s.t("dav","Send notifications for events")),1)]),_:1},8,["modelValue"]),n("em",{innerHTML:v.sendEventRemindersHelpText},null,8,_),e[6]||(e[6]=n("br",null,null,-1)),n("em",null,l(s.t("dav","Notifications are sent via background jobs, so these must occur often enough.")),1)]),n("p",U,[c(o,{id:"caldavSendEventRemindersToSharedGroupMembers",modelValue:a.sendEventRemindersToSharedUsers,"onUpdate:modelValue":e[3]||(e[3]=t=>a.sendEventRemindersToSharedUsers=t),type:"switch",disabled:!a.sendEventReminders},{default:r(()=>[u(l(s.t("dav","Send reminder notifications to calendar sharees as well")),1)]),_:1},8,["modelValue","disabled"]),n("em",null,l(s.t("dav","Reminders are always sent to organizers and attendees.")),1)]),n("p",P,[c(o,{id:"caldavSendEventRemindersPush",modelValue:a.sendEventRemindersPush,"onUpdate:modelValue":e[4]||(e[4]=t=>a.sendEventRemindersPush=t),type:"switch",disabled:!a.sendEventReminders},{default:r(()=>[u(l(s.t("dav","Enable notifications for events via push")),1)]),_:1},8,["modelValue","disabled"])])]),_:1},8,["name","doc-url"])}const I=f(k,[["render",H],["__scopeId","data-v-84465bd0"]]),B=V(I);B.mount("#settings-admin-caldav");
//# sourceMappingURL=dav-settings-admin-caldav.mjs.map