1 line
1.2 KiB
JavaScript
1 line
1.2 KiB
JavaScript
(()=>{"use strict";const e=window.wp.editor,t=window.wp.plugins,i=window.wp.components,n=window.wp.data,a=window.wp.coreData,r=window.wp.i18n,d=window.ReactJSXRuntime,p=activityPubEventBridge.reminderTypeGap;(0,t.registerPlugin)("event-bridge-for-activitypub-reminder",{render:()=>{const t=(0,n.useSelect)((e=>e("core/editor").getCurrentPostType()),[]),[_,b]=(0,a.useEntityProp)("postType",t,"meta"),u=_?.event_bridge_for_activitypub_reminder_time_gap?_?.event_bridge_for_activitypub_reminder_time_gap:p;return(0,d.jsx)(e.PluginDocumentSettingPanel,{name:"activitypub",title:(0,r.__)("Send reminder before event's start","activitypub"),children:(0,d.jsx)(i.SelectControl,{label:(0,r.__)("Time gap","activitypub"),value:u,options:[{label:(0,r.__)("Disabled","event-bridge-for-activitypub"),value:0},{label:(0,r.__)("6 hours","event-bridge-for-activitypub"),value:21600},{label:(0,r.__)("1 day","event-bridge-for-activitypub"),value:86400},{label:(0,r.__)("3 days","event-bridge-for-activitypub"),value:259200},{label:(0,r.__)("1 week","event-bridge-for-activitypub"),value:604800}],onChange:e=>{b({..._,event_bridge_for_activitypub_reminder_time_gap:e})},__nextHasNoMarginBottom:!0})})}})})(); |