From 2a13797828f6621eb3592a2f9a6b2a5abc7a9e73 Mon Sep 17 00:00:00 2001 From: MoonLyss Date: Fri, 6 Sep 2024 18:51:59 +0200 Subject: [PATCH] Fix path generator and tags --- package.json | 2 +- src/lib/components/PathGenerator.svelte | 43 ++++++++++++++----------- src/lib/components/Tags.svelte | 6 ++-- src/routes/path-generator/+page.svelte | 8 +++-- src/routes/tags/+page.svelte | 10 ++++-- 5 files changed, 42 insertions(+), 27 deletions(-) diff --git a/package.json b/package.json index eaba267..89047dc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@selenite/commons", - "version": "0.26.4", + "version": "0.26.5", "repository": "github:ShaitanLyss/selenite-commons", "license": "MIT", "keywords": [ diff --git a/src/lib/components/PathGenerator.svelte b/src/lib/components/PathGenerator.svelte index 6b07f3b..c7c7534 100644 --- a/src/lib/components/PathGenerator.svelte +++ b/src/lib/components/PathGenerator.svelte @@ -45,10 +45,10 @@ // let showAddPopup = $state(true); let creatingPart = $state(false); - function addCreatedPart() { + function addCreatedPart(b?: boolean) { if (trimmedCreatedPart.length > 0) path.push(trimmedCreatedPart); else if (focusedOption) path.push(focusedOption); - else if (optionsForCreatedPart[0]) path.push(optionsForCreatedPart[0]); + else if (b && optionsForCreatedPart[0]) path.push(optionsForCreatedPart[0]); createdPart = ''; focusedOption = ''; } @@ -74,7 +74,7 @@ type="button" class="btn btn-ghost gap-0 {!isFocused ? '' : 'outline outline-accent outline-1'}" class:outline-accent={isFocused} - class:outline-[0.5rem]={isFocused} + class:outline-[0.5]={isFocused} use:keyboardNavigation onpointerdown={async () => { path.push(part); @@ -95,10 +95,10 @@ {/if} -