From 3f9b63309d14f5366a9a5ec3c14fdd2926aa1ad1 Mon Sep 17 00:00:00 2001 From: vgaNAR6ta Date: Sat, 4 Apr 2026 19:18:32 +0200 Subject: [PATCH] =?UTF-8?q?edit:=20tri=20des=20messages=20plus=20r=C3=A9ce?= =?UTF-8?q?nt=20en=20haut?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- v1-com-officielle/src/data/msgData.js | 1 + v1-com-officielle/src/dataExchange.js | 1 + v1-com-officielle/src/infoComponents/InboxContent.vue | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/v1-com-officielle/src/data/msgData.js b/v1-com-officielle/src/data/msgData.js index 145523e..cc11a69 100644 --- a/v1-com-officielle/src/data/msgData.js +++ b/v1-com-officielle/src/data/msgData.js @@ -38,6 +38,7 @@ export async function loadMsgData() { let entry = { title: textInfos.title, date: dateInfos.date, + dateInfo: pouet.created_at, content: textInfos.content, like: pouet.favourites_count, isLiked: false, diff --git a/v1-com-officielle/src/dataExchange.js b/v1-com-officielle/src/dataExchange.js index 5c41a27..da5fd74 100644 --- a/v1-com-officielle/src/dataExchange.js +++ b/v1-com-officielle/src/dataExchange.js @@ -4,6 +4,7 @@ export const dataStorage = reactive({ selectedMsg: { title: '', date: '', + dateInfo: '', content: '', like: 0, isLiked: false, diff --git a/v1-com-officielle/src/infoComponents/InboxContent.vue b/v1-com-officielle/src/infoComponents/InboxContent.vue index 7b2fb4b..2ed81fc 100644 --- a/v1-com-officielle/src/infoComponents/InboxContent.vue +++ b/v1-com-officielle/src/infoComponents/InboxContent.vue @@ -243,6 +243,9 @@ if (!this.msgList[j].wasRead) this.msgNumber += 1; } + }, + organizeItems(){ + this.msgList.sort((a,b) => b.dateInfo.localeCompare(a.dateInfo)); } }, data(){ @@ -262,6 +265,7 @@ }, async mounted(){ this.msgList = await loadMsgData(); + this.organizeItems(); //console.log(this.msgList); this.msgNumber = this.msgList.length console.log("Inbox content is loaded!");