Skip to content

Commit 3256342

Browse files
authored
feat: directly navigate to localized atproto website like https://atproto.com/ja` (#1136)
1 parent 64ca2c6 commit 3256342

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

app/components/Header/AuthModal.client.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ const handleInput = shallowRef('')
66
const route = useRoute()
77
const { user, logout } = useAtproto()
88
9+
// https://atproto.com supports 4 locales as of 2026-02-07
10+
const { locale } = useI18n()
11+
const currentLang = locale.value.split('-')[0] ?? 'en'
12+
const localeSubPath = ['ko', 'pt', 'ja'].includes(currentLang) ? currentLang : ''
13+
const atprotoLink = `https://atproto.com/${localeSubPath}`
14+
915
async function handleBlueskySignIn() {
1016
await authRedirect('https://bsky.social', { redirectTo: route.fullPath })
1117
}
@@ -76,7 +82,7 @@ async function handleLogin() {
7682
<span class="font-bold">npmx.dev</span>
7783
</template>
7884
<template #atproto>
79-
<a href="https://atproto.com" target="_blank" class="text-blue-400 hover:underline">
85+
<a :href="atprotoLink" target="_blank" class="text-blue-400 hover:underline">
8086
AT Protocol
8187
</a>
8288
</template>

0 commit comments

Comments
 (0)