Fix the lint errors: use the component's own locale in Home, format, and declare Image

This commit is contained in:
Starystars67
2026-10-08 21:42:23 +01:00
parent 46b0a26969
commit f45156a143
2 changed files with 5 additions and 6 deletions
+1
View File
@@ -34,6 +34,7 @@ export default [
alert: 'readonly',
prompt: 'readonly',
getComputedStyle: 'readonly',
Image: 'readonly',
// Node globals
process: 'readonly',
__dirname: 'readonly',
+2 -4
View File
@@ -16,7 +16,7 @@ import {
import { useI18n } from 'vue-i18n'
import landingLq from '@/assets/landing-lq.jpg'
import landingHq from '@/assets/landing_hq.png'
const { t } = useI18n()
const { t, locale } = useI18n()
const onlinePlayers = ref('...')
const onlineServers = ref('...')
@@ -43,7 +43,7 @@ onMounted(async () => {
const data = await response.text()
const lines = data.split('\n')
const values = lines.map(line => line.split(' '))
const values = lines.map((line) => line.split(' '))
if (values.length >= 3) {
onlinePlayers.value = values[0][1]
onlineServers.value = values[1][1]
@@ -123,7 +123,6 @@ const devFeatures = computed(() => [
description: t('message.home.devFeatures.lua.description'),
link:
'https://docs.beammp.com/' +
// eslint-disable-next-line no-undef
(locale.value == 'en' ? '' : locale.value + '/') +
'scripting/mod-reference/',
},
@@ -131,7 +130,6 @@ const devFeatures = computed(() => [
icon: BookOpen,
title: t('message.home.devFeatures.docs.title'),
description: t('message.home.devFeatures.docs.description'),
// eslint-disable-next-line no-undef
link: 'https://docs.beammp.com/' + (locale.value == 'en' ? '' : locale.value + '/'),
},
{