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.1 KiB
47 lines
1.1 KiB
3 years ago
|
<template>
|
||
|
<v-dialog v-model="webhookModal" width="min(700px,90%)" overlay-opacity=".9">
|
||
2 years ago
|
<v-card v-if="webhookModal" width="100%" min-height="350px" class="pa-4">
|
||
3 years ago
|
<webhook-editor v-if="editOrAdd" ref="editor" :meta="meta" @backToList="editOrAdd = false" />
|
||
|
<webhook-list v-else :meta="meta" @edit="editHook" @add="editOrAdd = true" />
|
||
3 years ago
|
</v-card>
|
||
|
</v-dialog>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
2 years ago
|
import WebhookList from '~/components/project/tableTabs/webhook/WebhookList';
|
||
|
import WebhookEditor from '~/components/project/tableTabs/webhook/WebhookEditor';
|
||
3 years ago
|
export default {
|
||
|
name: 'WebhookModal',
|
||
|
components: { WebhookEditor, WebhookList },
|
||
|
props: {
|
||
|
meta: Object,
|
||
2 years ago
|
value: Boolean,
|
||
3 years ago
|
},
|
||
|
data: () => ({
|
||
|
editOrAdd: false,
|
||
2 years ago
|
activePage: 'role',
|
||
3 years ago
|
}),
|
||
|
computed: {
|
||
|
webhookModal: {
|
||
|
get() {
|
||
2 years ago
|
return this.value;
|
||
3 years ago
|
},
|
||
|
set(v) {
|
||
2 years ago
|
this.$emit('input', v);
|
||
|
},
|
||
|
},
|
||
3 years ago
|
},
|
||
|
methods: {
|
||
|
editHook(hook) {
|
||
2 years ago
|
this.editOrAdd = true;
|
||
3 years ago
|
this.$nextTick(() => {
|
||
2 years ago
|
this.$refs.editor.hook = { ...hook };
|
||
|
this.$refs.editor.onEventChange();
|
||
|
});
|
||
|
},
|
||
|
},
|
||
|
};
|
||
3 years ago
|
</script>
|
||
|
|
||
2 years ago
|
<style scoped lang="scss"></style>
|