aboutsummaryrefslogtreecommitdiffstats
path: root/code
diff options
context:
space:
mode:
authorivarlovlie <git@ivarlovlie.no>2022-11-29 02:42:49 +0100
committerivarlovlie <git@ivarlovlie.no>2022-11-29 02:42:49 +0100
commitd93735b58c3174d8ad79ef5cff7787b3ec825658 (patch)
tree9ca613fd322a1aee44e33e0e74af040a3720435a /code
parent465114c7b7cfd17d588cb1da7a191b2a8367e499 (diff)
downloadgreatoffice-d93735b58c3174d8ad79ef5cff7787b3ec825658.tar.xz
greatoffice-d93735b58c3174d8ad79ef5cff7787b3ec825658.zip
feat: Move LocaleSwitcher out of tabbing
Diffstat (limited to 'code')
-rw-r--r--code/app/src/lib/components/locale-switcher.svelte2
-rw-r--r--code/app/src/routes/(main)/(public)/+layout.svelte2
-rw-r--r--code/app/src/routes/(main)/(public)/sign-in/+page.svelte4
3 files changed, 6 insertions, 2 deletions
diff --git a/code/app/src/lib/components/locale-switcher.svelte b/code/app/src/lib/components/locale-switcher.svelte
index 19624a5..b0230f8 100644
--- a/code/app/src/lib/components/locale-switcher.svelte
+++ b/code/app/src/lib/components/locale-switcher.svelte
@@ -10,6 +10,7 @@
import Cookies from "js-cookie";
export let _pwKey: string | undefined = undefined;
+ export let tabindex: number | undefined = undefined;
async function switch_locale(newLocale: Locales) {
if (!newLocale || $locale === newLocale) return;
@@ -42,6 +43,7 @@
</script>
<select
+ {tabindex}
use:pwKey={_pwKey}
on:change={on_change}
class="mt-1 mr-1 block border-none py-2 pl-3 pr-10 text-base rounded-md right-0 absolute focus:outline-none focus:ring-teal-500 sm:text-sm"
diff --git a/code/app/src/routes/(main)/(public)/+layout.svelte b/code/app/src/routes/(main)/(public)/+layout.svelte
index 0f1940a..cbda776 100644
--- a/code/app/src/routes/(main)/(public)/+layout.svelte
+++ b/code/app/src/routes/(main)/(public)/+layout.svelte
@@ -3,7 +3,7 @@
import LL from "$lib/i18n/i18n-svelte";
</script>
-<LocaleSwitcher />
+<LocaleSwitcher tabindex={-1} />
<slot />
<footer class="grid sm:gap-5 grid-flow-row sm:justify-center px-2 sm:grid-flow-col">
<a href="https://greatoffice.life/privacy" class="link">
diff --git a/code/app/src/routes/(main)/(public)/sign-in/+page.svelte b/code/app/src/routes/(main)/(public)/sign-in/+page.svelte
index cf6da75..12801c5 100644
--- a/code/app/src/routes/(main)/(public)/sign-in/+page.svelte
+++ b/code/app/src/routes/(main)/(public)/sign-in/+page.svelte
@@ -99,7 +99,9 @@
</h2>
<p class="mt-2 text-sm text-gray-600">
{$LL.or().toLowerCase()}
- <a href="/sign-up" use:pwKey={signInPageTestKeys.signUpAnchor} class="link">{$LL.createANewAccount().toLowerCase()}</a>
+ <a href="/sign-up" use:pwKey={signInPageTestKeys.signUpAnchor} class="link">
+ {$LL.createANewAccount().toLowerCase()}
+ </a>
</p>
</div>
<div class="mt-8 sm:mx-auto sm:w-full sm:max-w-md">