diff --git a/web-frontend/src/lib/common.js b/web-frontend/src/lib/common.js new file mode 100644 index 0000000..2694b7d --- /dev/null +++ b/web-frontend/src/lib/common.js @@ -0,0 +1,5 @@ +export const WasmStatus = { + NotLoaded: 0, + Loaded: 1, + Errored: 2 +}; diff --git a/web-frontend/src/routes/+page.svelte b/web-frontend/src/routes/+page.svelte index 15c7aad..8c87444 100644 --- a/web-frontend/src/routes/+page.svelte +++ b/web-frontend/src/routes/+page.svelte @@ -1,4 +1,5 @@ -

Welcome to SvelteKit

+

Encoding

-

Current cursor: {addr} => ({latlng.lat}, {latlng.lng})

+{#if wasmStatus == WasmStatus.Loaded || wasmStatus == WasmStatus.NotLoaded} +

Current cursor: {addr} => ({latlng.lat}, {latlng.lng})

-
-
-
+
+
+
+{:else if wasmStatus == WasmStatus.Errored} +
+
+ +
+
+

Error

+

Error: {wasmError}.

+
+
+{/if}