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 @@ -
Current cursor: {addr} => ({latlng.lat}, {latlng.lng})
+{#if wasmStatus == WasmStatus.Loaded || wasmStatus == WasmStatus.NotLoaded} +Current cursor: {addr} => ({latlng.lat}, {latlng.lng})
-Error
+Error: {wasmError}.
+