diff --git a/package.json b/package.json index 9c6d24da..7f70525a 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "gridjs": "^3.2.1", "localforage": "^1.9.0", "svelte-filepond": "^0.0.1", + "svelte-focus-trap": "^1.0.1", "svelte-i18n": "^3.3.0", "tailwindcss": "^2.0.2", "tinro": "^0.5.3", diff --git a/src/App.svelte b/src/App.svelte index 68a8f420..8c828204 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -1,5 +1,6 @@ {#if modal_open} -
+

@@ -97,11 +105,23 @@ for="trackname" class="block text-sm font-medium text-gray-700">{$_('track-name')} + {#if isTracknameValid} + + Track name must not be empty + + {/if}

m
+ {#if isTracklengthValid} + + Track length must be greater than 0 + + {/if}
s
+ {#if !trackMintimevalid} + + minimum lap time must be a positive number or 0 + + {/if}
@@ -139,6 +179,8 @@

- configure the tracks/ min-max lap times + configure the tracks & minimum lap times