mirror of
https://github.com/BeamMP/BeamMP-Website.git
synced 2026-11-28 08:43:58 +00:00
add link to accounts
This commit is contained in:
9 files changed
+27
-2
No files matched your search
@@ -11,12 +11,14 @@ import {
|
||||
import { cn } from '@/lib/utils'
|
||||
import ThemeToggle from '@/components/ThemeToggle.vue'
|
||||
import LanguageSelector from '@/components/LanguageSelector.vue'
|
||||
import { Menu, X } from 'lucide-vue-next'
|
||||
import { Menu, X, CircleUser } from 'lucide-vue-next'
|
||||
import { getLocalizedPath } from '@/utils/locale'
|
||||
|
||||
const mobileMenuOpen = ref(false)
|
||||
const route = useRoute()
|
||||
|
||||
const ACCOUNTS_URL = 'https://accounts.beammp.com'
|
||||
|
||||
function toggleMobileMenu() {
|
||||
mobileMenuOpen.value = !mobileMenuOpen.value
|
||||
}
|
||||
@@ -212,6 +214,13 @@ function localRoute(path) {
|
||||
</NavigationMenuItem>
|
||||
</NavigationMenuList>
|
||||
</NavigationMenu>
|
||||
<a
|
||||
:href="ACCOUNTS_URL"
|
||||
class="inline-flex items-center gap-2 shrink-0 whitespace-nowrap rounded-md bg-beammp-orange px-4 py-2 text-sm font-semibold text-white shadow-sm transition-colors hover:bg-beammp-orange/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-beammp-orange focus-visible:ring-offset-2 dark:focus-visible:ring-offset-neutral-900"
|
||||
>
|
||||
<CircleUser class="w-4 h-4" aria-hidden="true" />
|
||||
{{ $t('message.nav.account') }}
|
||||
</a>
|
||||
<div class="flex items-center gap-1 sm:gap-2 flex-shrink-0">
|
||||
<LanguageSelector />
|
||||
<ThemeToggle />
|
||||
@@ -311,6 +320,14 @@ function localRoute(path) {
|
||||
>
|
||||
{{ $t('message.nav.patreon') }}
|
||||
</a>
|
||||
<a
|
||||
:href="ACCOUNTS_URL"
|
||||
class="mt-2 flex items-center justify-center gap-2 px-4 py-3 rounded-md bg-beammp-orange font-semibold text-white hover:bg-beammp-orange/90 transition-colors"
|
||||
@click="closeMobileMenu"
|
||||
>
|
||||
<CircleUser class="w-5 h-5" aria-hidden="true" />
|
||||
{{ $t('message.nav.account') }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</Transition>
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
"store": "Merch-Shop",
|
||||
"github": "GitHub",
|
||||
"patreon": "Patreon",
|
||||
"account": "Anmelden",
|
||||
"language": "Sprache auswählen",
|
||||
"theme": {
|
||||
"light": "Helles Theme",
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
"store": "Merch Store",
|
||||
"github": "GitHub",
|
||||
"patreon": "Patreon",
|
||||
"account": "Sign In",
|
||||
"language": "Select Language",
|
||||
"theme": {
|
||||
"light": "Light Theme",
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
"store": "Tienda de merchandising",
|
||||
"github": "GitHub",
|
||||
"patreon": "Patreon",
|
||||
"account": "Iniciar sesión",
|
||||
"language": "Seleccionar idioma",
|
||||
"theme": {
|
||||
"light": "Tema claro",
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
"store": "Boutique de produits dérivés",
|
||||
"github": "GitHub",
|
||||
"patreon": "Patreon",
|
||||
"account": "Se connecter",
|
||||
"language": "Choisir la langue",
|
||||
"theme": {
|
||||
"light": "Thème clair",
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
"store": "Negozio di merchandising",
|
||||
"github": "GitHub",
|
||||
"patreon": "Patreon",
|
||||
"account": "Accedi",
|
||||
"language": "Seleziona lingua",
|
||||
"theme": {
|
||||
"light": "Tema chiaro",
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
"store": "Магазин мерча",
|
||||
"github": "GitHub",
|
||||
"patreon": "Patreon",
|
||||
"account": "Войти",
|
||||
"language": "Выбрать язык",
|
||||
"theme": {
|
||||
"light": "Светлая тема",
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
"store": "周边商店",
|
||||
"github": "GitHub",
|
||||
"patreon": "在 Patreon 上为我们捐献",
|
||||
"account": "登录",
|
||||
"language": "选择语言",
|
||||
"theme": {
|
||||
"light": "明亮主题",
|
||||
|
||||
+2
-1
@@ -237,7 +237,7 @@ describe('getting around', () => {
|
||||
}
|
||||
})
|
||||
|
||||
test('the navigation bar links out to the docs, the store, GitHub and Patreon', async () => {
|
||||
test('the navigation bar links out to the docs, the store, GitHub, Patreon and the accounts portal', async () => {
|
||||
stubFetch()
|
||||
wrapper = await openPage('/en')
|
||||
const hrefs = wrapper.findAll('nav a, header a').map((a) => a.attributes('href'))
|
||||
@@ -246,6 +246,7 @@ describe('getting around', () => {
|
||||
'https://store.beammp.com',
|
||||
'https://github.com/BeamMP/BeamMP',
|
||||
'https://www.patreon.com/BeamMP',
|
||||
'https://accounts.beammp.com',
|
||||
]) {
|
||||
expect(hrefs, url).toContain(url)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user