mirror of
https://github.com/BoostIo/Boostnote
synced 2026-01-06 21:49:19 +00:00
Several small fixes
This commit is contained in:
@@ -351,7 +351,7 @@ class NoteList extends React.Component {
|
||||
|
||||
handleDragStart (e, note) {
|
||||
const noteData = JSON.stringify(note)
|
||||
e.dataTransfer.setData("note", noteData)
|
||||
e.dataTransfer.setData('note', noteData)
|
||||
}
|
||||
|
||||
render () {
|
||||
|
||||
@@ -133,19 +133,19 @@ class StorageItem extends React.Component {
|
||||
}
|
||||
|
||||
handleDragEnter (e) {
|
||||
e.dataTransfer.setData("defaultColor", e.target.style.backgroundColor)
|
||||
e.target.style.backgroundColor = "rgba(129, 130, 131, 0.08)"
|
||||
e.dataTransfer.setData('defaultColor', e.target.style.backgroundColor)
|
||||
e.target.style.backgroundColor = 'rgba(129, 130, 131, 0.08)'
|
||||
}
|
||||
|
||||
handleDragLeave (e) {
|
||||
e.target.style.opacity = "1"
|
||||
e.target.style.backgroundColor = e.dataTransfer.getData("defaultColor")
|
||||
e.target.style.opacity = '1'
|
||||
e.target.style.backgroundColor = e.dataTransfer.getData('defaultColor')
|
||||
}
|
||||
|
||||
handleDrop (e, storage, folder, dispatch, location) {
|
||||
e.target.style.opacity = "1"
|
||||
e.target.style.backgroundColor = e.dataTransfer.getData("defaultColor")
|
||||
const noteData = JSON.parse(e.dataTransfer.getData("note"))
|
||||
e.target.style.opacity = '1'
|
||||
e.target.style.backgroundColor = e.dataTransfer.getData('defaultColor')
|
||||
const noteData = JSON.parse(e.dataTransfer.getData('note'))
|
||||
if (folder.key !== noteData.folder) {
|
||||
dataApi
|
||||
.createNote(storage.key, {
|
||||
|
||||
Reference in New Issue
Block a user