1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

Cmd+Sで保存

debug craetedAt
This commit is contained in:
Rokt33r
2015-11-06 21:46:29 +09:00
parent 2736024cb7
commit 83a8f4b911
3 changed files with 3 additions and 2 deletions

View File

@@ -47,7 +47,7 @@ class HomePage extends React.Component {
if (e.keyCode === 27) {
detail.handleCancelButtonClick()
}
if (e.keyCode === 13 && e.metaKey) {
if ((e.keyCode === 13 && e.metaKey) || (e.keyCode === 83 && e.metaKey)) {
detail.handleSaveButtonClick()
}
break

View File

@@ -182,6 +182,7 @@ export default class ArticleDetail extends React.Component {
delete newArticle.status
newArticle.updatedAt = new Date()
if (newArticle.createdAt == null) newArticle.createdAt = new Date()
dispatch(updateArticle(newArticle))
dispatch(switchMode(IDLE_MODE))

View File

@@ -23,7 +23,7 @@ function folders (state = initialFolders, action) {
newFolder.name = newFolder.name.trim().replace(/\s/, '_')
Object.assign(newFolder, {
key: keygen(),
createAt: new Date(),
createdAt: new Date(),
updatedAt: new Date(),
// random number (0-7)
color: Math.round(Math.random() * 7)