1
0
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:
Kazu Yokomizo
2017-11-06 15:49:04 +09:00
parent 705e64377b
commit 706b5d253f
2 changed files with 21 additions and 2 deletions

View File

@@ -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) {