|
|
@ -8,24 +8,29 @@ const emit = defineEmits(['update:modelValue']) |
|
|
|
|
|
|
|
|
|
|
|
const editOrAdd = ref(false) |
|
|
|
const editOrAdd = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const webhookEditorRef = ref() |
|
|
|
|
|
|
|
|
|
|
|
const dialogShow = computed({ |
|
|
|
const dialogShow = computed({ |
|
|
|
get() { |
|
|
|
get() { |
|
|
|
return modelValue |
|
|
|
return modelValue |
|
|
|
}, |
|
|
|
}, |
|
|
|
set(v) { |
|
|
|
set(v: boolean) { |
|
|
|
emit('update:modelValue', v) |
|
|
|
emit('update:modelValue', v) |
|
|
|
}, |
|
|
|
}, |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
function editHook(hook: Record<string, any>) { |
|
|
|
async function editHook(hook: Record<string, any>) { |
|
|
|
editOrAdd.value = true |
|
|
|
editOrAdd.value = true |
|
|
|
// TODO: update editor ref hook |
|
|
|
nextTick(async () => { |
|
|
|
|
|
|
|
webhookEditorRef.value.hook = { ...hook } |
|
|
|
|
|
|
|
await webhookEditorRef.value.onEventChange() |
|
|
|
|
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<a-drawer v-model:visible="dialogShow" :closable="false" placement="right" width="700px" @keydown.esc="dialogShow = false"> |
|
|
|
<a-drawer v-model:visible="dialogShow" :closable="false" placement="right" width="700px" @keydown.esc="dialogShow = false"> |
|
|
|
<WebhookEditor v-if="editOrAdd" @back-to-list="editOrAdd = false" /> |
|
|
|
<WebhookEditor v-if="editOrAdd" ref="webhookEditorRef" @back-to-list="editOrAdd = false" /> |
|
|
|
<WebhookList v-else @edit="editHook" @add="editOrAdd = true" /> |
|
|
|
<WebhookList v-else @edit="editHook" @add="editOrAdd = true" /> |
|
|
|
<div class="self-center flex flex-column flex-wrap gap-4 items-center mt-4 md:mx-8 md:justify-between justify-center"> |
|
|
|
<div class="self-center flex flex-column flex-wrap gap-4 items-center mt-4 md:mx-8 md:justify-between justify-center"> |
|
|
|
<a-button v-t="['e:hiring']" href="https://angel.co/company/nocodb" target="_blank" size="large"> |
|
|
|
<a-button v-t="['e:hiring']" href="https://angel.co/company/nocodb" target="_blank" size="large"> |
|
|
|