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.
25 lines
578 B
25 lines
578 B
1 year ago
|
<script lang="ts" setup>
|
||
|
const isOpen = ref(false)
|
||
|
|
||
|
const editOrAdd = ref(false)
|
||
|
const currentHook = ref<Record<string, any>>()
|
||
|
|
||
|
async function editHook(hook: Record<string, any>) {
|
||
|
editOrAdd.value = true
|
||
|
currentHook.value = hook
|
||
|
}
|
||
|
|
||
|
async function addHook() {
|
||
|
editOrAdd.value = true
|
||
|
currentHook.value = undefined
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<template>
|
||
|
<GeneralModal v-model:visible="isOpen">
|
||
|
<LazyWebhookEditor v-if="editOrAdd" :hook="currentHook" @back-to-list="editOrAdd = false" />
|
||
|
|
||
|
<LazyWebhookList v-else @edit="editHook" @add="addHook" />
|
||
|
</GeneralModal>
|
||
|
</template>
|