more trigger options
This commit is contained in:
1 parent
56baef2662
commit
964ff54dc1
9 files changed
+289
-3
No files matched your search
@@ -0,0 +1,24 @@
|
||||
import { OptionManager } from './OptionManager';
|
||||
import { AutomationTriggerWebhook } from 'types/automations/triggers';
|
||||
import InputText from 'components/Inputs/InputText';
|
||||
|
||||
|
||||
export const TriggerWebhook: OptionManager<AutomationTriggerWebhook> = {
|
||||
defaultState: () => ({
|
||||
$smType: 'trigger',
|
||||
"alias": "",
|
||||
"platform": 'webhook',
|
||||
"webhook_id": "",
|
||||
}),
|
||||
isReady: ({ alias }) => {
|
||||
return (alias !== '')
|
||||
},
|
||||
renderOptionList: (state, setState) => {
|
||||
return <>
|
||||
<InputText label="Webhook ID" value={state.webhook_id ?? ""} onChange={webhook_id => setState({
|
||||
...state,
|
||||
webhook_id
|
||||
})} />
|
||||
</>
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user