From 8dab89f9524eeed1acd583041c4d9b3b29fb24f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Sun, 30 Jun 2024 17:10:23 +0200 Subject: [PATCH] fix(webui): show "add url" instead of "create object" in Selector with URLs --- webui/src/lib/components/utils/Selector.svelte | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/webui/src/lib/components/utils/Selector.svelte b/webui/src/lib/components/utils/Selector.svelte index fbb73d6..11f8f38 100644 --- a/webui/src/lib/components/utils/Selector.svelte +++ b/webui/src/lib/components/utils/Selector.svelte @@ -497,7 +497,13 @@ />{/if} {:else if option.t === 'NewAddress'}
{option.c}
-
{$i18n.t('Create object')}
+
+ {#if inputValue.startsWith('http')} + {$i18n.t('Add URL')} + {:else} + {$i18n.t('Create object')} + {/if} +
{:else if option.t === 'Attribute'} {#if option.labels?.length}