From 005f05b73875eb034f097134766bb760fd636d00 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Fri, 16 Jun 2023 12:38:32 +0100 Subject: [PATCH] Fix responsive design elements --- src/lib/islands/quick-link-island.svelte | 2 +- src/lib/islands/quick-link-set-island.svelte | 16 ++++++++++++++-- src/lib/navigation/nav.svelte | 2 +- src/routes/more/versions/+page.svelte | 3 ++- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/lib/islands/quick-link-island.svelte b/src/lib/islands/quick-link-island.svelte index b4b4654..c539348 100644 --- a/src/lib/islands/quick-link-island.svelte +++ b/src/lib/islands/quick-link-island.svelte @@ -10,7 +10,7 @@ {#if $ql.length === 0} -

Go to settings to add your Quick Links

+

Go to settings to add your Quick Links

{/if}
{#each $ql as link} diff --git a/src/lib/islands/quick-link-set-island.svelte b/src/lib/islands/quick-link-set-island.svelte index 22cd2a2..3d4e282 100644 --- a/src/lib/islands/quick-link-set-island.svelte +++ b/src/lib/islands/quick-link-set-island.svelte @@ -11,7 +11,13 @@ console.log(qlData); } - function saveQl() { + let saveButton = "Save" + + async function timeout(ms) { + return new Promise(resolve => setTimeout(resolve, ms)); +} + + async function saveQl() { // Fetch the content of all text entries within the island then run ql.set([ARRAY OF INPUT CONTENT]) const inputs = document.getElementsByClassName('qlInput'); let inputLinks = [] @@ -23,13 +29,18 @@ } console.log(inputLinks) ql.set(inputLinks) + saveButton = "✔" + await timeout(3000); + saveButton = "Saved" } function clearQl() { ql.set([]); + saveButton = "Saved" } function addQlBox() { + saveButton = "Save" const updatedQl = [...$ql, ""]; $ql = updatedQl; ql.set(updatedQl); @@ -47,12 +58,13 @@

Click the + button to add links

{/if}
+

Quick links can be CRS Codes or Headcodes

{#each qlData as link} {/each}
- + diff --git a/src/lib/navigation/nav.svelte b/src/lib/navigation/nav.svelte index 91ebda1..b442c82 100644 --- a/src/lib/navigation/nav.svelte +++ b/src/lib/navigation/nav.svelte @@ -22,7 +22,7 @@