mirror of
https://github.com/BeamMP/BeamMP-Website.git
synced 2026-11-28 08:43:58 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1488e3bbdb | ||
|
|
700932de82 |
No files matched your search
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "beammp-website",
|
"name": "beammp-website",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "2.5.7",
|
"version": "2.6.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@@ -11,12 +11,14 @@ import {
|
|||||||
import { cn } from '@/lib/utils'
|
import { cn } from '@/lib/utils'
|
||||||
import ThemeToggle from '@/components/ThemeToggle.vue'
|
import ThemeToggle from '@/components/ThemeToggle.vue'
|
||||||
import LanguageSelector from '@/components/LanguageSelector.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'
|
import { getLocalizedPath } from '@/utils/locale'
|
||||||
|
|
||||||
const mobileMenuOpen = ref(false)
|
const mobileMenuOpen = ref(false)
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
||||||
|
const ACCOUNTS_URL = 'https://accounts.beammp.com'
|
||||||
|
|
||||||
function toggleMobileMenu() {
|
function toggleMobileMenu() {
|
||||||
mobileMenuOpen.value = !mobileMenuOpen.value
|
mobileMenuOpen.value = !mobileMenuOpen.value
|
||||||
}
|
}
|
||||||
@@ -212,6 +214,13 @@ function localRoute(path) {
|
|||||||
</NavigationMenuItem>
|
</NavigationMenuItem>
|
||||||
</NavigationMenuList>
|
</NavigationMenuList>
|
||||||
</NavigationMenu>
|
</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">
|
<div class="flex items-center gap-1 sm:gap-2 flex-shrink-0">
|
||||||
<LanguageSelector />
|
<LanguageSelector />
|
||||||
<ThemeToggle />
|
<ThemeToggle />
|
||||||
@@ -311,6 +320,14 @@ function localRoute(path) {
|
|||||||
>
|
>
|
||||||
{{ $t('message.nav.patreon') }}
|
{{ $t('message.nav.patreon') }}
|
||||||
</a>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
</Transition>
|
</Transition>
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
"store": "Merch-Shop",
|
"store": "Merch-Shop",
|
||||||
"github": "GitHub",
|
"github": "GitHub",
|
||||||
"patreon": "Patreon",
|
"patreon": "Patreon",
|
||||||
|
"account": "Anmelden",
|
||||||
"language": "Sprache auswählen",
|
"language": "Sprache auswählen",
|
||||||
"theme": {
|
"theme": {
|
||||||
"light": "Helles Theme",
|
"light": "Helles Theme",
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
"store": "Merch Store",
|
"store": "Merch Store",
|
||||||
"github": "GitHub",
|
"github": "GitHub",
|
||||||
"patreon": "Patreon",
|
"patreon": "Patreon",
|
||||||
|
"account": "Sign In",
|
||||||
"language": "Select Language",
|
"language": "Select Language",
|
||||||
"theme": {
|
"theme": {
|
||||||
"light": "Light Theme",
|
"light": "Light Theme",
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
"store": "Tienda de merchandising",
|
"store": "Tienda de merchandising",
|
||||||
"github": "GitHub",
|
"github": "GitHub",
|
||||||
"patreon": "Patreon",
|
"patreon": "Patreon",
|
||||||
|
"account": "Iniciar sesión",
|
||||||
"language": "Seleccionar idioma",
|
"language": "Seleccionar idioma",
|
||||||
"theme": {
|
"theme": {
|
||||||
"light": "Tema claro",
|
"light": "Tema claro",
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
"store": "Boutique de produits dérivés",
|
"store": "Boutique de produits dérivés",
|
||||||
"github": "GitHub",
|
"github": "GitHub",
|
||||||
"patreon": "Patreon",
|
"patreon": "Patreon",
|
||||||
|
"account": "Se connecter",
|
||||||
"language": "Choisir la langue",
|
"language": "Choisir la langue",
|
||||||
"theme": {
|
"theme": {
|
||||||
"light": "Thème clair",
|
"light": "Thème clair",
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
"store": "Negozio di merchandising",
|
"store": "Negozio di merchandising",
|
||||||
"github": "GitHub",
|
"github": "GitHub",
|
||||||
"patreon": "Patreon",
|
"patreon": "Patreon",
|
||||||
|
"account": "Accedi",
|
||||||
"language": "Seleziona lingua",
|
"language": "Seleziona lingua",
|
||||||
"theme": {
|
"theme": {
|
||||||
"light": "Tema chiaro",
|
"light": "Tema chiaro",
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
"store": "Магазин мерча",
|
"store": "Магазин мерча",
|
||||||
"github": "GitHub",
|
"github": "GitHub",
|
||||||
"patreon": "Patreon",
|
"patreon": "Patreon",
|
||||||
|
"account": "Войти",
|
||||||
"language": "Выбрать язык",
|
"language": "Выбрать язык",
|
||||||
"theme": {
|
"theme": {
|
||||||
"light": "Светлая тема",
|
"light": "Светлая тема",
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
"store": "周边商店",
|
"store": "周边商店",
|
||||||
"github": "GitHub",
|
"github": "GitHub",
|
||||||
"patreon": "在 Patreon 上为我们捐献",
|
"patreon": "在 Patreon 上为我们捐献",
|
||||||
|
"account": "登录",
|
||||||
"language": "选择语言",
|
"language": "选择语言",
|
||||||
"theme": {
|
"theme": {
|
||||||
"light": "明亮主题",
|
"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()
|
stubFetch()
|
||||||
wrapper = await openPage('/en')
|
wrapper = await openPage('/en')
|
||||||
const hrefs = wrapper.findAll('nav a, header a').map((a) => a.attributes('href'))
|
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://store.beammp.com',
|
||||||
'https://github.com/BeamMP/BeamMP',
|
'https://github.com/BeamMP/BeamMP',
|
||||||
'https://www.patreon.com/BeamMP',
|
'https://www.patreon.com/BeamMP',
|
||||||
|
'https://accounts.beammp.com',
|
||||||
]) {
|
]) {
|
||||||
expect(hrefs, url).toContain(url)
|
expect(hrefs, url).toContain(url)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user