mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-14 18:26:26 +00:00
Cmd+Sで保存
debug craetedAt
This commit is contained in:
@@ -47,7 +47,7 @@ class HomePage extends React.Component {
|
|||||||
if (e.keyCode === 27) {
|
if (e.keyCode === 27) {
|
||||||
detail.handleCancelButtonClick()
|
detail.handleCancelButtonClick()
|
||||||
}
|
}
|
||||||
if (e.keyCode === 13 && e.metaKey) {
|
if ((e.keyCode === 13 && e.metaKey) || (e.keyCode === 83 && e.metaKey)) {
|
||||||
detail.handleSaveButtonClick()
|
detail.handleSaveButtonClick()
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
|
|||||||
@@ -182,6 +182,7 @@ export default class ArticleDetail extends React.Component {
|
|||||||
|
|
||||||
delete newArticle.status
|
delete newArticle.status
|
||||||
newArticle.updatedAt = new Date()
|
newArticle.updatedAt = new Date()
|
||||||
|
if (newArticle.createdAt == null) newArticle.createdAt = new Date()
|
||||||
|
|
||||||
dispatch(updateArticle(newArticle))
|
dispatch(updateArticle(newArticle))
|
||||||
dispatch(switchMode(IDLE_MODE))
|
dispatch(switchMode(IDLE_MODE))
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ function folders (state = initialFolders, action) {
|
|||||||
newFolder.name = newFolder.name.trim().replace(/\s/, '_')
|
newFolder.name = newFolder.name.trim().replace(/\s/, '_')
|
||||||
Object.assign(newFolder, {
|
Object.assign(newFolder, {
|
||||||
key: keygen(),
|
key: keygen(),
|
||||||
createAt: new Date(),
|
createdAt: new Date(),
|
||||||
updatedAt: new Date(),
|
updatedAt: new Date(),
|
||||||
// random number (0-7)
|
// random number (0-7)
|
||||||
color: Math.round(Math.random() * 7)
|
color: Math.round(Math.random() * 7)
|
||||||
|
|||||||
Reference in New Issue
Block a user