Added paste button and touched up some styles
This commit is contained in:
1 parent
d94b8c90fc
commit
77cd95fdcb
7 files changed
+42
-9
No files matched your search
@@ -13,11 +13,14 @@ QuickNote.get = (userId, masterKey) => {
|
||||
SELECT note.id FROM note WHERE quick_note = 1 AND user_id = ? LIMIT 1`, [userId])
|
||||
.then((rows, fields) => {
|
||||
|
||||
//Quick Note is set, return note text
|
||||
//Quick Note is set, return note object
|
||||
if(rows[0][0] != undefined){
|
||||
|
||||
let noteId = rows[0][0].id
|
||||
return resolve({'noteId':noteId})
|
||||
const note = Note.get(userId, noteId, masterKey)
|
||||
.then(noteData => {
|
||||
return resolve(noteData)
|
||||
})
|
||||
|
||||
} else {
|
||||
//Or create a new note and get the id
|
||||
@@ -81,7 +84,7 @@ QuickNote.update = (userId, pushText, masterKey) => {
|
||||
.replace(/&[#A-Za-z0-9]+;/g,'') //Rip out all HTML entities
|
||||
.replace(/<[^>]+>/g, '') //Rip out all HTML tags
|
||||
|
||||
//Turn links into actual linx
|
||||
//Turn links into actual link
|
||||
clean = QuickNote.makeUrlLink(clean)
|
||||
|
||||
if(clean == ''){ clean = ' ' }
|
||||
@@ -114,7 +117,7 @@ QuickNote.update = (userId, pushText, masterKey) => {
|
||||
}
|
||||
})
|
||||
.then( saveResults => {
|
||||
return resolve(true)
|
||||
return resolve(saveResults)
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user