diff --git a/tfweb/package.json b/tfweb/package.json index a05dbf3..79fb14c 100644 --- a/tfweb/package.json +++ b/tfweb/package.json @@ -31,6 +31,6 @@ "bootstrap": "^5.3.2", "bootswatch": "^5.3.2", "qrcode": "^1.5.3", - "svelte-i18n": "^3.6.0" + "sveltekit-i18n": "^2.4.2" } } diff --git a/tfweb/src/components/LoadingWrapper.svelte b/tfweb/src/components/LoadingWrapper.svelte index 965c1d9..9b51662 100644 --- a/tfweb/src/components/LoadingWrapper.svelte +++ b/tfweb/src/components/LoadingWrapper.svelte @@ -1,6 +1,6 @@ + + + {$t("common.title", {values: {title: $t("common.page.hosts")}})} + + + + + {$t("hosts.enroll.title", {values: {host: host.data.name}})} + {$t("hosts.enroll.explainer")} + {#if loading} + + {:else} + {$t("hosts.enroll.code", {values:{code: code.code, expires: code.lifetimeSeconds / 60}})} + {$t("hosts.enroll.done")} + + {/if} + {window.location.href = "/hosts"}} class="btn btn-outline-info">{$t("hosts.enroll.cancel")} + {#if hasFormErr} + {formErr} + {/if} + + diff --git a/tfweb/src/routes/hosts/add/+page.svelte b/tfweb/src/routes/hosts/add/+page.svelte index 400245c..a2e0d20 100644 --- a/tfweb/src/routes/hosts/add/+page.svelte +++ b/tfweb/src/routes/hosts/add/+page.svelte @@ -1,5 +1,5 @@
{$t("hosts.enroll.explainer")}
{$t("hosts.enroll.code", {values:{code: code.code, expires: code.lifetimeSeconds / 60}})}
{formErr}