Browse Source

feat(nc-gui): add payload body editor

pull/5349/head
Wing-Kam Wong 2 years ago
parent
commit
1bf1febef3
  1. 12
      packages/nc-gui/components/webhook/Editor.vue

12
packages/nc-gui/components/webhook/Editor.vue

@ -272,6 +272,9 @@ function setHook(newHook: HookType) {
payload: notification.payload,
},
})
if (hook.version === 'v1') {
urlTabKey.value = 'body'
}
}
async function onEventChange() {
@ -582,6 +585,15 @@ onMounted(async () => {
<a-col :span="24">
<a-tabs v-model:activeKey="urlTabKey" type="card" closeable="false" class="shadow-sm">
<a-tab-pane v-if="hook.version === 'v1'" key="body" tab="Body">
<LazyMonacoEditor
v-model="hook.notification.payload.body"
disable-deep-compare
:validate="false"
class="min-h-60 max-h-80"
/>
</a-tab-pane>
<a-tab-pane key="params" tab="Params" force-render>
<LazyApiClientParams v-model="hook.notification.payload.parameters" />
</a-tab-pane>

Loading…
Cancel
Save