From fe8ff124e2e362e30ff5b126eb69790f0a5ed52e Mon Sep 17 00:00:00 2001 From: Arthur DANJOU Date: Sun, 20 Jul 2025 18:19:34 +0200 Subject: [PATCH] Update navigation link in AppHeader, enhance locale handling in Activity and Stats components, and set compatibility date in nuxt.config --- app/components/AppHeader.vue | 2 +- app/components/home/Activity.vue | 3 +-- app/components/home/Stats.vue | 7 +++---- nuxt.config.ts | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/app/components/AppHeader.vue b/app/components/AppHeader.vue index d10f8e0..691d9b2 100644 --- a/app/components/AppHeader.vue +++ b/app/components/AppHeader.vue @@ -51,7 +51,7 @@ const navs = [ es: 'currĂ­culum', }, icon: 'address-book-duotone', - href: 'https://files.arthurdanjou.fr/resume', + to: 'https://files.arthurdanjou.fr/s/resume', target: '_blank', }, ] diff --git a/app/components/home/Activity.vue b/app/components/home/Activity.vue index aa3b318..00757e9 100644 --- a/app/components/home/Activity.vue +++ b/app/components/home/Activity.vue @@ -3,7 +3,7 @@ import type { UseTimeAgoMessages } from '@vueuse/core' import type { Activity } from '~~/types' import { activityMessages, IDEs } from '~~/types' -const { t } = useI18n({ +const { locale, locales, t } = useI18n({ useScope: 'local', }) @@ -21,7 +21,6 @@ const codingActivity = computed(() => { : activities[0] }) -const { locale, locales } = useI18n() const currentLocale = computed(() => locales.value.find(l => l.code === locale.value)) const isActive = computed(() => { diff --git a/app/components/home/Stats.vue b/app/components/home/Stats.vue index 8b5d9c1..8d58aec 100644 --- a/app/components/home/Stats.vue +++ b/app/components/home/Stats.vue @@ -2,13 +2,12 @@ import type { Stats } from '~~/types' import { usePrecision } from '@vueuse/math' -const { locale, locales } = useI18n() +const { locale, locales, t } = useI18n({ + useScope: 'local', +}) const currentLocale = computed(() => locales.value.find(l => l.code === locale.value)) const { data: stats } = await useAsyncData('stats', () => $fetch('/api/stats')) -const { t } = useI18n({ - useScope: 'local', -}) const time = useTimeAgo(new Date(stats.value!.coding.data.range.start) ?? new Date()).value.split(' ')[0] const date = useDateFormat(new Date(stats.value!.coding.data.range.start ?? new Date()), 'DD MMMM YYYY', { locales: currentLocale.value?.code ?? 'en' }) diff --git a/nuxt.config.ts b/nuxt.config.ts index 31c566f..9995e0d 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -1,5 +1,5 @@ export default defineNuxtConfig({ - future: { compatibilityVersion: 4 }, + compatibilityDate: '2025-07-20', // Nuxt App app: {