diff --git a/package.json b/package.json index 316823f060..ef8f9ed81a 100644 --- a/package.json +++ b/package.json @@ -96,10 +96,10 @@ "cozy-minilog": "3.3.1", "cozy-realtime": "4.6.0", "cozy-scripts": "^8.4.0", - "cozy-sharing": "^17.0.0", + "cozy-sharing": "^18.0.0", "cozy-stack-client": "^51.6.0", - "cozy-ui": "^114.0.1", - "cozy-viewer": "^10.0.0", + "cozy-ui": "^115.0.2", + "cozy-viewer": "^11.3.1", "date-fns": "2.30.0", "diacritics": "1.3.0", "filesize": "10.1.6", diff --git a/src/components/FileHistory/HistoryModal.jsx b/src/components/FileHistory/HistoryModal.jsx index b6d4bb937a..fdf6e4bbce 100644 --- a/src/components/FileHistory/HistoryModal.jsx +++ b/src/components/FileHistory/HistoryModal.jsx @@ -14,7 +14,7 @@ import { translate } from 'cozy-ui/transpiled/react/providers/I18n' import styles from './styles.styl' const formatDate = (date, f) => { - return f(date, 'DD MMMM - HH:mm') + return f(date, 'dd LLLL - HH:mm') } const HistoryModal = ({ diff --git a/src/components/FolderPicker/FolderPickerListItem.tsx b/src/components/FolderPicker/FolderPickerListItem.tsx index 1e5df6665c..f750622611 100644 --- a/src/components/FolderPicker/FolderPickerListItem.tsx +++ b/src/components/FolderPicker/FolderPickerListItem.tsx @@ -36,7 +36,10 @@ const FolderPickerListItem: FC = ({ onClick(file) } - const formattedUpdatedAt = f(file.updated_at, t('table.row_update_format')) + const formattedUpdatedAt = f( + new Date(file.updated_at), + t('table.row_update_format') + ) const formattedSize = file.size ? filesize(file.size, { base: 10 }) : undefined diff --git a/src/declarations.d.ts b/src/declarations.d.ts index 6fed4a308b..297f639709 100644 --- a/src/declarations.d.ts +++ b/src/declarations.d.ts @@ -25,7 +25,7 @@ declare module 'cozy-ui/transpiled/react' { declare module 'cozy-ui/transpiled/react/providers/I18n' { export const useI18n: () => { t: (key: string, options?: Record) => string - f: (date: string, format: string) => string + f: (date: Date | number, format: string) => string lang: string } } diff --git a/src/locales/de.json b/src/locales/de.json index 53de1fc6ed..3ee5b7776a 100644 --- a/src/locales/de.json +++ b/src/locales/de.json @@ -149,8 +149,8 @@ "head_size": "Größe", "head_status": "Teilen", "head_thumbnail_size": "Wechsele die Größe des Vorschaubildes", - "row_update_format": "DD.MM.YYYY", - "row_update_format_full": "DD.MM.YYYY", + "row_update_format": "dd.LL.yyyy", + "row_update_format_full": "dd.LL.yyyy", "row_read_only": "Freigeben (nur Lesen)", "row_read_write": "Freigeben (Lesen & Schreiben)", "row_size_symbols": { diff --git a/src/locales/en.json b/src/locales/en.json index f4782f9f9d..5c49ab3010 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -157,8 +157,8 @@ "head_size": "Size", "head_status": "Share", "head_thumbnail_size": "Switch thumbnail size", - "row_update_format": "MMM D, YYYY", - "row_update_format_full": "MMMM D, YYYY", + "row_update_format": "LLL d, yyyy", + "row_update_format_full": "LLLL d, yyyy", "row_read_only": "Share (Read only)", "row_read_write": "Share (Read & Write)", "row_size_symbols": { @@ -796,7 +796,7 @@ "label": "Open directory" }, "LastUpdate": { - "titleFormat": "MMMM DD, YYYY, HH:MM" + "titleFormat": "LLLL dd, yyyy, HH:MM" }, "PublicNoteRedirect": { "error": { diff --git a/src/locales/es.json b/src/locales/es.json index 98fb6d6ce0..b7dae07fb3 100644 --- a/src/locales/es.json +++ b/src/locales/es.json @@ -142,8 +142,8 @@ "head_size": "Tamaño", "head_status": "Compartir", "head_thumbnail_size": "Cambiar el tamaño de las miniaturas", - "row_update_format": "MMM D, AAAA", - "row_update_format_full": "MMM D, AAAA", + "row_update_format": "LLL d, yyyy", + "row_update_format_full": "LLL d, yyyy", "row_read_only": "Compartido (sólo en lectura)", "row_read_write": "Compartido (Lectura & Escritura)", "row_size_symbols": { diff --git a/src/locales/fr.json b/src/locales/fr.json index 80efbac8d9..59b5a9c861 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -157,8 +157,8 @@ "head_size": "Taille", "head_status": "Partage", "head_thumbnail_size": "Changer la taille des miniatures", - "row_update_format": "D MMM YYYY", - "row_update_format_full": "D MMMM YYYY", + "row_update_format": "d LLL yyyy", + "row_update_format_full": "d LLLL yyyy", "row_read_only": "Partagé (lecture seule)", "row_read_write": "Partagé (lecture & écriture)", "row_size_symbols": { @@ -797,7 +797,7 @@ "label": "Ouvrir le dossier" }, "LastUpdate": { - "titleFormat": "DD MMMM YYYY, HH:MM" + "titleFormat": "dd LLLL yyyy, HH:MM" }, "PublicNoteRedirect": { "error": { diff --git a/src/locales/it.json b/src/locales/it.json index fac4dbb98a..43edef1e1b 100644 --- a/src/locales/it.json +++ b/src/locales/it.json @@ -138,8 +138,8 @@ "head_name": "Nome", "head_update": "Ultimo aggiornamento", "head_size": "Dimensione", - "row_update_format": "MMM D, YYYY", - "row_update_format_full": "MMMM D, YYYY", + "row_update_format": "LLL d, yyyy", + "row_update_format_full": "LLLL d, yyyy", "row_read_only": "Condividi (Solo Lettura)", "row_read_write": "Condividi (Lettura e Scrittura)", "row_size_symbols": { diff --git a/src/locales/ja.json b/src/locales/ja.json index 0b593c0a6a..7262522243 100644 --- a/src/locales/ja.json +++ b/src/locales/ja.json @@ -134,8 +134,8 @@ "head_update": "最終更新", "head_size": "サイズ", "head_thumbnail_size": "サムネイルのサイズを切り替え", - "row_update_format": "yyyy/MM/dd", - "row_update_format_full": "YYYY/MM/DD", + "row_update_format": "yyyy/LL/dd", + "row_update_format_full": "yyyy/LL/dd", "row_read_only": "共有 (読み取り専用)", "row_read_write": "共有 (読み書き)", "row_size_symbols": { diff --git a/src/locales/nl_NL.json b/src/locales/nl_NL.json index 18dac23d76..e7124f6412 100644 --- a/src/locales/nl_NL.json +++ b/src/locales/nl_NL.json @@ -151,8 +151,8 @@ "head_size": "Grootte", "head_status": "Delen", "head_thumbnail_size": "Miniatuurgrootte aanpassen", - "row_update_format": "MMM D, YYYY", - "row_update_format_full": "MMMM D, YYYY", + "row_update_format": "LLL d, yyyy", + "row_update_format_full": "LLLL d, yyyy", "row_read_only": "Delen (alleen-lezen)", "row_read_write": "Delen (lezen en bewerken)", "row_size_symbols": { diff --git a/src/locales/ru.json b/src/locales/ru.json index 8b9fe4c047..310b5fc23f 100644 --- a/src/locales/ru.json +++ b/src/locales/ru.json @@ -110,8 +110,8 @@ "head_name": "Имя", "head_update": "Последнее обновление", "head_size": "Размер", - "row_update_format": "MMM D, YYYY", - "row_update_format_full": "MMMM D, YYYY", + "row_update_format": "LLL d, yyyy", + "row_update_format_full": "LLLL d, yyyy", "row_read_only": "Поделится (Чтение)", "row_read_write": "Поделится (Чтение и Запись)", "row_size_symbols": { diff --git a/yarn.lock b/yarn.lock index 65e8664856..8fc1a0a7b1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6645,10 +6645,10 @@ cozy-scripts@^8.4.0: webpack-dev-server "3.10.3" webpack-merge "4.2.2" -cozy-sharing@^17.0.0: - version "17.0.0" - resolved "https://registry.yarnpkg.com/cozy-sharing/-/cozy-sharing-17.0.0.tgz#7da5ec722aa37b9416da845092844e268fe144c0" - integrity sha512-rUDqZLE8BOzfW6QLrEL/7zdKeQbd9m3WdZ2nKXZHkK2ovrfUs7sa2lGtjm0gYn0RYPG0Cfpv237PnhcvHSQzXQ== +cozy-sharing@^18.0.0: + version "18.0.0" + resolved "https://registry.yarnpkg.com/cozy-sharing/-/cozy-sharing-18.0.0.tgz#1c5e14c41a283b67727f896ab3ff7fabc7a6dda4" + integrity sha512-cgoTwwr+FU5GbQexde1gyFYnHem0cyRneo89IdnO1XAbi2w7FkHN/99eDZv7Z+xuMOH05TEQR/Kb2bPJz1tt9w== dependencies: "@cozy/minilog" "^1.0.0" classnames "^2.2.6" @@ -6691,10 +6691,10 @@ cozy-tsconfig@1.2.0: resolved "https://registry.yarnpkg.com/cozy-tsconfig/-/cozy-tsconfig-1.2.0.tgz#17e61f960f139fae4d26cbac2254b9ab632b269e" integrity sha512-TRHnY9goF3FzVlUbP7BcHxuN2XAA4AmppT4fHHZmTKaSwYTByVR1Al+riFMDbce94kJZ1wzl9WNLWQuqzGZ6Cw== -cozy-ui@^114.0.1: - version "114.0.1" - resolved "https://registry.yarnpkg.com/cozy-ui/-/cozy-ui-114.0.1.tgz#c3321fbb3272868d50d32dae1792a5668d06bb7f" - integrity sha512-uq0SnZrUPMTya5NiRHxo9qVU/8s59RpO4M1S5w6oglChO+CZSavNi69FNi/bYaBtzrULEXyeXt1QDdRMgRP7gg== +cozy-ui@^115.0.2: + version "115.0.2" + resolved "https://registry.yarnpkg.com/cozy-ui/-/cozy-ui-115.0.2.tgz#8976de6e6141bd7255092f6e432ddacdb18d4689" + integrity sha512-U74ebvEQdQC1eNTfOEacHAM3yinNHVE3FfmvXyiIg2L0Yrjl2jk2LibdNVq5apHVqVKyJCe6El+tnVsX7x7rDg== dependencies: "@babel/runtime" "^7.3.4" "@material-ui/core" "4.12.3" @@ -6703,7 +6703,7 @@ cozy-ui@^114.0.1: chart.js "3.7.1" classnames "^2.2.5" cozy-interapp "^0.5.4" - date-fns "^1.28.5" + date-fns "2.30.0" filesize "8.0.7" hammerjs "^2.0.8" intersection-observer "0.11.0" @@ -6721,10 +6721,10 @@ cozy-ui@^114.0.1: react-swipeable-views "^0.13.3" rooks "^5.11.2" -cozy-viewer@^10.0.0: - version "10.0.0" - resolved "https://registry.yarnpkg.com/cozy-viewer/-/cozy-viewer-10.0.0.tgz#0dd7d18a6625034bd072698188454ac28289a573" - integrity sha512-8MhPi/OtdkjbpCEInld8awjo1yeinAEoFma1eJpVHoN6Fotj3hHouCdOj0+kqlp7mebUHBtTvUQFGZ0DmWaKSQ== +cozy-viewer@^11.3.1: + version "11.3.1" + resolved "https://registry.yarnpkg.com/cozy-viewer/-/cozy-viewer-11.3.1.tgz#4d0c6154d4d826ae957f86c2299116bcc30527ae" + integrity sha512-TUqqA23bpaQLvjiaWqIGsZzagpuNNckmWLuRdUdNJvJ1iboi+93dJVsDOpttkXjVWOyfq1EkUnDb9F7fGY8b3g== dependencies: classnames "^2.2.5" hammerjs "^2.0.8" @@ -7078,7 +7078,7 @@ date-fns@2.30.0, date-fns@^2.22.1: dependencies: "@babel/runtime" "^7.21.0" -date-fns@^1.28.5, date-fns@^1.30.1: +date-fns@^1.30.1: version "1.30.1" resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c" integrity sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==