diff --git a/index.html b/index.html index ee9e09e..4f1bc9c 100644 --- a/index.html +++ b/index.html @@ -4,11 +4,12 @@ + %sveltekit.head% - +
%sveltekit.body%
diff --git a/src/ui-components/Ability.svelte b/src/ui-components/Ability.svelte index 89c6334..fce7d49 100644 --- a/src/ui-components/Ability.svelte +++ b/src/ui-components/Ability.svelte @@ -2,14 +2,12 @@ import Key from "./Key.svelte"; type Props = { name: string; key: string; count: number }; const { name, count, key }: Props = $props(); -let isMacOS: boolean = $state(false); -$effect(() => { - isMacOS = navigator.userAgent.includes("Mac OS X"); -}); - - 0} /> - {name} - - {isFinite(count) ? count : "∞"} + + 0} /> + {name} + {#if isFinite(count)} + x + {count} + {/if} diff --git a/src/ui-components/Game.svelte b/src/ui-components/Game.svelte index f934fae..3b6c1b0 100644 --- a/src/ui-components/Game.svelte +++ b/src/ui-components/Game.svelte @@ -71,14 +71,15 @@ onDestroy(() => bindings.destroy()); bindings.reset()} />
- Stage: - {stageNum} + + Stage: + {stageNum} - to pause + to pause - Clipboard: + Clipboard:
{#if uiContext.inventory !== null} @@ -91,16 +92,16 @@ onDestroy(() => bindings.destroy()); /> {/if}
- - {uiContext.inventoryIsInfinite ? "∞" : "1"} + {#if !uiContext.inventoryIsInfinite} + x + 1 + {/if}
- Abilities: + Abilities: diff --git a/src/ui-components/Key.svelte b/src/ui-components/Key.svelte index 0688091..11636af 100644 --- a/src/ui-components/Key.svelte +++ b/src/ui-components/Key.svelte @@ -1,15 +1,27 @@ - - {key} + + + {(withCtrl ? (isMacOS ? "⌘+" : "Ctrl+") : "") + key} +