mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
fix the indent
This commit is contained in:
@@ -147,7 +147,7 @@ class StorageItem extends React.Component {
|
|||||||
e.target.style.backgroundColor = e.dataTransfer.getData('defaultColor')
|
e.target.style.backgroundColor = e.dataTransfer.getData('defaultColor')
|
||||||
const noteData = JSON.parse(e.dataTransfer.getData('note'))
|
const noteData = JSON.parse(e.dataTransfer.getData('note'))
|
||||||
const newNoteData = Object.assign({}, noteData, {storage: storage, folder: folder.key})
|
const newNoteData = Object.assign({}, noteData, {storage: storage, folder: folder.key})
|
||||||
if(folder.key === noteData.folder) return
|
if (folder.key === noteData.folder) return
|
||||||
dataApi
|
dataApi
|
||||||
.createNote(storage.key, newNoteData)
|
.createNote(storage.key, newNoteData)
|
||||||
.then((note) => {
|
.then((note) => {
|
||||||
@@ -155,27 +155,27 @@ class StorageItem extends React.Component {
|
|||||||
.deleteNote(noteData.storage, noteData.key)
|
.deleteNote(noteData.storage, noteData.key)
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
let dispatchHandler = () => {
|
let dispatchHandler = () => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: 'DELETE_NOTE',
|
type: 'DELETE_NOTE',
|
||||||
storageKey: data.storageKey,
|
storageKey: data.storageKey,
|
||||||
noteKey: data.noteKey
|
noteKey: data.noteKey
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
eventEmitter.once('list:moved', dispatchHandler)
|
eventEmitter.once('list:moved', dispatchHandler)
|
||||||
eventEmitter.emit('list:next')
|
eventEmitter.emit('list:next')
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.error(err)
|
console.error(err)
|
||||||
})
|
})
|
||||||
dispatch({
|
dispatch({
|
||||||
type: 'UPDATE_NOTE',
|
type: 'UPDATE_NOTE',
|
||||||
note: note
|
note: note
|
||||||
})
|
|
||||||
hashHistory.push({
|
|
||||||
pathname: location.pathname,
|
|
||||||
query: {key: note.storage + '-' + note.key}
|
|
||||||
})
|
})
|
||||||
|
hashHistory.push({
|
||||||
|
pathname: location.pathname,
|
||||||
|
query: {key: note.storage + '-' + note.key}
|
||||||
})
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
|
|||||||
Reference in New Issue
Block a user