mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.3 KiB
47 lines
1.3 KiB
2 years ago
|
<script setup lang="ts">
|
||
|
interface Props {
|
||
|
modelValue: boolean
|
||
|
}
|
||
|
|
||
2 years ago
|
const props = defineProps<Props>()
|
||
|
|
||
|
const emits = defineEmits(['update:modelValue'])
|
||
2 years ago
|
|
||
|
const editOrAdd = ref(false)
|
||
|
|
||
2 years ago
|
const webhookEditorRef = ref()
|
||
|
|
||
2 years ago
|
const vModel = useVModel(props, 'modelValue', emits)
|
||
2 years ago
|
|
||
2 years ago
|
async function editHook(hook: Record<string, any>) {
|
||
2 years ago
|
editOrAdd.value = true
|
||
2 years ago
|
nextTick(async () => {
|
||
2 years ago
|
webhookEditorRef.value.setHook(hook)
|
||
2 years ago
|
await webhookEditorRef.value.onEventChange()
|
||
|
})
|
||
2 years ago
|
}
|
||
2 years ago
|
</script>
|
||
|
|
||
|
<template>
|
||
2 years ago
|
<a-drawer
|
||
|
v-model:visible="vModel"
|
||
|
:closable="false"
|
||
|
placement="right"
|
||
|
width="700px"
|
||
2 years ago
|
:body-style="{ background: 'rgba(67, 81, 232, 0.05)', padding: '0px 0px', overflow: 'hidden' }"
|
||
2 years ago
|
@keydown.esc="vModel = false"
|
||
|
>
|
||
2 years ago
|
<a-layout class="">
|
||
|
<a-layout-content class="px-10 py-5 scrollbar-thin-primary">
|
||
|
<WebhookEditor v-if="editOrAdd" ref="webhookEditorRef" @back-to-list="editOrAdd = false" />
|
||
|
<WebhookList v-else @edit="editHook" @add="editOrAdd = true" />
|
||
|
</a-layout-content>
|
||
|
<a-layout-footer class="!bg-white flex">
|
||
|
<a-button v-t="['e:hiring']" class="mx-auto mb-4" href="https://angel.co/company/nocodb" target="_blank" size="large">
|
||
2 years ago
|
🚀 {{ $t('labels.weAreHiring') }}! 🚀
|
||
2 years ago
|
</a-button>
|
||
|
</a-layout-footer>
|
||
|
</a-layout>
|
||
2 years ago
|
</a-drawer>
|
||
|
</template>
|