fix(pwa+timezone)
Some checks failed
Deploy to Development / build-and-deploy (push) Has been cancelled
Deploy to Production / build-and-deploy (push) Successful in 1m32s

This commit is contained in:
EvanChal
2026-01-25 23:54:42 +01:00
parent e32b1ce04e
commit 02a54f5625
23 changed files with 579 additions and 85 deletions

View File

@@ -335,8 +335,7 @@ import { useToast } from 'vue-toastification'
import { useRouter } from 'vue-router'
import axios from '@/utils/axios'
import { getMediaUrl } from '@/utils/axios'
import { formatDistanceToNow, format } from 'date-fns'
import { fr } from 'date-fns/locale'
import { formatRelativeDateInFrenchTimezone, formatShortDateInFrenchTimezone } from '@/utils/dateUtils'
import {
Plus,
Image,
@@ -384,11 +383,11 @@ const uploadSuccess = ref([])
const isDragOver = ref(false)
function formatRelativeDate(date) {
return formatDistanceToNow(new Date(date), { addSuffix: true, locale: fr })
return formatRelativeDateInFrenchTimezone(date)
}
function formatDate(date) {
return format(new Date(date), 'dd/MM/yyyy', { locale: fr })
return formatShortDateInFrenchTimezone(date)
}
function formatFileSize(bytes) {