From 2b4b0cdc7471d55e2dafaf059bd049fe59e2a43d Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sat, 11 Nov 2023 10:37:18 +0100 Subject: [PATCH] UX improvements --- frontend/src/lib/assets/app.css | 11 ---- frontend/src/lib/components/ArgInput.svelte | 31 ++++++--- .../lib/components/LightweightArgInput.svelte | 13 ++++ .../src/lib/components/SavedInputs.svelte | 10 +-- .../src/lib/components/ScriptBuilder.svelte | 1 - .../(logged)/flows/get/[...path]/+page.svelte | 44 +++++++------ .../scripts/get/[...hash]/+page.svelte | 63 ++++++++++--------- 7 files changed, 99 insertions(+), 74 deletions(-) diff --git a/frontend/src/lib/assets/app.css b/frontend/src/lib/assets/app.css index 6331726058..fc0fd9c788 100644 --- a/frontend/src/lib/assets/app.css +++ b/frontend/src/lib/assets/app.css @@ -10,17 +10,6 @@ @apply dark:border-gray-600; } - input::-webkit-outer-spin-button, - input::-webkit-inner-spin-button { - -webkit-appearance: none !important; - margin: 0; - } - - /* Firefox */ - input[type='number'] { - -moz-appearance: textfield !important; - } - @font-face { font-family: 'Inter'; src: url('/Inter-Variable.ttf'); diff --git a/frontend/src/lib/components/ArgInput.svelte b/frontend/src/lib/components/ArgInput.svelte index 56aaa6ace9..8cad901f44 100644 --- a/frontend/src/lib/components/ArgInput.svelte +++ b/frontend/src/lib/components/ArgInput.svelte @@ -425,13 +425,17 @@ /> {:else if inputCat == 'base64'} - fileChanged(x, (val) => (value = val))} - multiple={false} - /> +
+ fileChanged(x, (val) => (value = val))} + multiple={false} + /> + {#if value?.length} +
File length: {value.length} base64 chars
+ {/if} +
{:else if inputCat == 'resource-string'} + + diff --git a/frontend/src/lib/components/LightweightArgInput.svelte b/frontend/src/lib/components/LightweightArgInput.svelte index 6ff4cefcd1..0458c6cf40 100644 --- a/frontend/src/lib/components/LightweightArgInput.svelte +++ b/frontend/src/lib/components/LightweightArgInput.svelte @@ -362,3 +362,16 @@ {/if} + + diff --git a/frontend/src/lib/components/SavedInputs.svelte b/frontend/src/lib/components/SavedInputs.svelte index ea3f936ce6..666a98053c 100644 --- a/frontend/src/lib/components/SavedInputs.svelte +++ b/frontend/src/lib/components/SavedInputs.svelte @@ -145,7 +145,7 @@
- Saved Inputs Shared inputs are available to anyone with access to the script
- Previous runs + Previous runs
{#if previousInputs.length > 0} @@ -288,7 +288,7 @@ {i.created_by}
@@ -315,7 +315,7 @@
-
Preview
+
Preview