mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-09 03:18:18 +00:00
fix: chats from the last day of a month show under Previous 7 days on the first (#31973)
On the first day of a month, chats from the day before were listed under "Previous 7 days" in the sidebar instead of "Yesterday". The same happened on January 1st for chats from December 31st. Any chat from the previous calendar day is now listed under "Yesterday", whatever the month or year. Fixes #31964
This commit is contained in:
parent
806644fcba
commit
5079890442
1 changed files with 1 additions and 1 deletions
|
|
@ -1335,7 +1335,7 @@ export const getTimeRange = (timestamp) => {
|
|||
|
||||
if (nowYear === dateYear && nowMonth === dateMonth && nowDate === dateDate) {
|
||||
return 'Today';
|
||||
} else if (nowYear === dateYear && nowMonth === dateMonth && nowDate - dateDate === 1) {
|
||||
} else if (dayjs(date).isYesterday()) {
|
||||
return 'Yesterday';
|
||||
} else if (diffDays <= 7) {
|
||||
return 'Previous 7 days';
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue