From 68f781ea6f5f53a3aafbc2c4b5dd71496254c68e Mon Sep 17 00:00:00 2001 From: wendrul <53628737+wendrul@users.noreply.github.com> Date: Wed, 20 Nov 2024 19:17:35 +0100 Subject: [PATCH] feat: svix integration (#3814) * Add create_webhook page * Make small fixes * Add token and change layout * Rename to create-webhook * Change query param to domain --- .../src/lib/components/ScriptPicker.svelte | 63 ++++---- .../svix/create-webhook/+page@(root).svelte | 149 ++++++++++++++++++ 2 files changed, 184 insertions(+), 28 deletions(-) create mode 100644 frontend/src/routes/(root)/(logged)/svix/create-webhook/+page@(root).svelte diff --git a/frontend/src/lib/components/ScriptPicker.svelte b/frontend/src/lib/components/ScriptPicker.svelte index f9c117bab3..b7437c96e8 100644 --- a/frontend/src/lib/components/ScriptPicker.svelte +++ b/frontend/src/lib/components/ScriptPicker.svelte @@ -27,6 +27,7 @@ export let kinds: Script['kind'][] = ['script'] export let disabled = false export let allowRefresh = false + export let allowEdit = true let items: { value: string; label: string }[] = [] let drawerViewer: Drawer @@ -127,14 +128,16 @@ {#if scriptPath !== undefined && scriptPath !== ''} {#if itemKind == 'flow'}
- + {#if allowEdit} + + {/if} + {#if allowEdit} + + {/if} + {#if allowEdit} + + {/if} + +
+ + +
+
+ 2 +
+

Create a token for this webhook

+ + If you generate a token, it will have a scope such that it can only be used to + trigger this {itemKind}. It is safe to share as it cannot be used to impersonate you. + Otherwise you may enter another token but beware that it will be shared with the external + application. + +
+
+
+
+ + +
+
+ + +
+
+
+ + +