mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
Fix updated date at note list
This commit is contained in:
@@ -488,6 +488,25 @@ class NoteList extends React.Component {
|
||||
if (note.isTrashed !== true || location.pathname === '/trashed') return true
|
||||
})
|
||||
|
||||
moment.locale('en', {
|
||||
relativeTime: {
|
||||
future: 'in %s',
|
||||
past: '%s ago',
|
||||
s: '%ds',
|
||||
ss: '%ss',
|
||||
m: '1m',
|
||||
mm: '%dm',
|
||||
h: 'an hour',
|
||||
hh: '%dh',
|
||||
d: '1 d',
|
||||
dd: '%dd',
|
||||
M: 'a month',
|
||||
MM: '%dM',
|
||||
y: 'a year',
|
||||
yy: '%dY'
|
||||
}
|
||||
});
|
||||
|
||||
let noteList = notes
|
||||
.map(note => {
|
||||
if (note == null) {
|
||||
@@ -499,7 +518,7 @@ class NoteList extends React.Component {
|
||||
const dateDisplay = moment(
|
||||
config.sortBy === 'CREATED_AT'
|
||||
? note.createdAt : note.updatedAt
|
||||
).fromNow()
|
||||
).fromNow('D')
|
||||
const key = `${note.storage}-${note.key}`
|
||||
|
||||
if (isDefault) {
|
||||
|
||||
Reference in New Issue
Block a user