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.
74 lines
1.8 KiB
74 lines
1.8 KiB
3 years ago
|
<template>
|
||
|
<nc-slider v-model="webhookSlider">
|
||
2 years ago
|
<div style="min-height: calc(100vh - 32px)" class="d-flex flex-column">
|
||
|
<v-card v-if="webhookSlider" width="100%" min-height="350px" class="pa-4 elevation-0">
|
||
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" />
|
||
|
</v-card>
|
||
|
<v-spacer />
|
||
|
<v-btn
|
||
|
v-t="['e:hiring']"
|
||
|
color="primary"
|
||
|
outlined
|
||
|
class="caption my-2 mx-auto"
|
||
|
href="https://angel.co/company/nocodb"
|
||
|
target="_blank"
|
||
|
>
|
||
|
🚀 We are Hiring! 🚀
|
||
|
</v-btn>
|
||
|
</div>
|
||
3 years ago
|
</nc-slider>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
2 years ago
|
import WebhookList from '~/components/project/tableTabs/webhook/WebhookList';
|
||
|
import WebhookEditor from '~/components/project/tableTabs/webhook/WebhookEditor';
|
||
|
import NcSlider from '~/components/global/NcSlider';
|
||
3 years ago
|
export default {
|
||
|
name: 'WebhookSlider',
|
||
|
components: { NcSlider, 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: {
|
||
|
webhookSlider: {
|
||
|
get() {
|
||
2 years ago
|
return this.value;
|
||
3 years ago
|
},
|
||
|
set(v) {
|
||
2 years ago
|
this.$emit('input', v);
|
||
|
},
|
||
|
},
|
||
3 years ago
|
},
|
||
|
mounted() {
|
||
2 years ago
|
(document.querySelector('[data-app]') || this.$root.$el).append(this.$el);
|
||
3 years ago
|
},
|
||
|
|
||
|
destroyed() {
|
||
2 years ago
|
this.$el.parentNode && this.$el.parentNode.removeChild(this.$el);
|
||
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>
|
||
|
|
||
|
<style scoped lang="scss">
|
||
2 years ago
|
::v-deep {
|
||
|
.nc-content {
|
||
|
max-width: 700px !important;
|
||
|
}
|
||
3 years ago
|
}
|
||
|
</style>
|