From 42c8eec5cf2bfefb939d519b16dd6556513b11a4 Mon Sep 17 00:00:00 2001 From: Guilhem Date: Tue, 31 Dec 2024 16:51:28 +0100 Subject: [PATCH] clean code --- .../lib/components/SavedInputsPicker.svelte | 322 ++++++------------ .../lib/components/SavedInputsPickerV2.svelte | 206 ----------- .../src/lib/components/ScriptEditor.svelte | 1 - .../components/flows/content/FlowInput.svelte | 4 +- .../components/triggers/CaptureButton.svelte | 4 +- .../components/triggers/CaptureTable.svelte | 17 +- 6 files changed, 114 insertions(+), 440 deletions(-) delete mode 100644 frontend/src/lib/components/SavedInputsPickerV2.svelte diff --git a/frontend/src/lib/components/SavedInputsPicker.svelte b/frontend/src/lib/components/SavedInputsPicker.svelte index 8f6df925dcd66..e0a470b7c11af 100644 --- a/frontend/src/lib/components/SavedInputsPicker.svelte +++ b/frontend/src/lib/components/SavedInputsPicker.svelte @@ -1,35 +1,24 @@ -
- - -
-
- Saved Inputs testShared inputs are available to anyone with access to the script - {#if canSaveInputs} - + + + {:else} + + {i.name} + {/if} -
- -
- {#if savedInputs === undefined} - - {:else if savedInputs?.length > 0} - {#each savedInputs as i} - - -
- {:else} - By {i.created_by} - {/if} -
- - {/each} + + + +
{:else} -
No saved Inputs
+ By {i.created_by} {/if} - - - - -
-
-
- -
-
- {#if typeof previewArgs == 'string' && previewArgs == 'WINDMILL_TOO_BIG'} -
- Payload too big to preview but can still be loaded
- {:else if Object.keys(previewArgs || {}).length > 0} -
- -
- {:else} -
- Select an Input to preview scripts arguments -
- {/if} -
-
-
- + + {/each} + {:else} +
No saved Inputs
+ {/if} diff --git a/frontend/src/lib/components/SavedInputsPickerV2.svelte b/frontend/src/lib/components/SavedInputsPickerV2.svelte deleted file mode 100644 index e0a470b7c11af..0000000000000 --- a/frontend/src/lib/components/SavedInputsPickerV2.svelte +++ /dev/null @@ -1,206 +0,0 @@ - - -
- {#if savedInputs === undefined} - - {:else if savedInputs?.length > 0} - {#each savedInputs as i} - - -
- {:else} - By {i.created_by} - {/if} - - - {/each} - {:else} -
No saved Inputs
- {/if} - diff --git a/frontend/src/lib/components/ScriptEditor.svelte b/frontend/src/lib/components/ScriptEditor.svelte index 07ab772ff912e..262380e7f1abf 100644 --- a/frontend/src/lib/components/ScriptEditor.svelte +++ b/frontend/src/lib/components/ScriptEditor.svelte @@ -473,7 +473,6 @@
Shared inputs are available to anyone with access to the script - { payloadData = e.detail diff --git a/frontend/src/lib/components/triggers/CaptureButton.svelte b/frontend/src/lib/components/triggers/CaptureButton.svelte index d0afe115c6186..3c582a8115c74 100644 --- a/frontend/src/lib/components/triggers/CaptureButton.svelte +++ b/frontend/src/lib/components/triggers/CaptureButton.svelte @@ -1,7 +1,7 @@