mirror of
https://github.com/ArthurDanjou/artsite.git
synced 2026-01-30 07:28:38 +01:00
Update navigation link in AppHeader, enhance locale handling in Activity and Stats components, and set compatibility date in nuxt.config
This commit is contained in:
@@ -51,7 +51,7 @@ const navs = [
|
|||||||
es: 'currículum',
|
es: 'currículum',
|
||||||
},
|
},
|
||||||
icon: 'address-book-duotone',
|
icon: 'address-book-duotone',
|
||||||
href: 'https://files.arthurdanjou.fr/resume',
|
to: 'https://files.arthurdanjou.fr/s/resume',
|
||||||
target: '_blank',
|
target: '_blank',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import type { UseTimeAgoMessages } from '@vueuse/core'
|
|||||||
import type { Activity } from '~~/types'
|
import type { Activity } from '~~/types'
|
||||||
import { activityMessages, IDEs } from '~~/types'
|
import { activityMessages, IDEs } from '~~/types'
|
||||||
|
|
||||||
const { t } = useI18n({
|
const { locale, locales, t } = useI18n({
|
||||||
useScope: 'local',
|
useScope: 'local',
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -21,7 +21,6 @@ const codingActivity = computed(() => {
|
|||||||
: activities[0]
|
: activities[0]
|
||||||
})
|
})
|
||||||
|
|
||||||
const { locale, locales } = useI18n()
|
|
||||||
const currentLocale = computed(() => locales.value.find(l => l.code === locale.value))
|
const currentLocale = computed(() => locales.value.find(l => l.code === locale.value))
|
||||||
|
|
||||||
const isActive = computed(() => {
|
const isActive = computed(() => {
|
||||||
|
|||||||
@@ -2,13 +2,12 @@
|
|||||||
import type { Stats } from '~~/types'
|
import type { Stats } from '~~/types'
|
||||||
import { usePrecision } from '@vueuse/math'
|
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 currentLocale = computed(() => locales.value.find(l => l.code === locale.value))
|
||||||
|
|
||||||
const { data: stats } = await useAsyncData<Stats>('stats', () => $fetch('/api/stats'))
|
const { data: stats } = await useAsyncData<Stats>('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 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' })
|
const date = useDateFormat(new Date(stats.value!.coding.data.range.start ?? new Date()), 'DD MMMM YYYY', { locales: currentLocale.value?.code ?? 'en' })
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
export default defineNuxtConfig({
|
export default defineNuxtConfig({
|
||||||
future: { compatibilityVersion: 4 },
|
compatibilityDate: '2025-07-20',
|
||||||
|
|
||||||
// Nuxt App
|
// Nuxt App
|
||||||
app: {
|
app: {
|
||||||
|
|||||||
Reference in New Issue
Block a user