* Made splash page dark and updated description
* Cleaned up unused things * Updated squire which had a comment typo update...thats it * Background color picker has matching colors and styles to text color picker * Added new black theme * Moved search to main page, show it on mobile and added options to push things to notes from search with experimental tag searching * Added active note menu buttons based on cursor location in text * Added more instant updating if app is open in two locations for the same user Scratch Pad and home page update with new notes and new text in real time
This commit is contained in:
1 parent
67b218329b
commit
e87e8513bc
20 files changed
+526
-271
No files matched your search
+16
-8
@@ -176,16 +176,24 @@ Tag.suggest = (userId, noteId, tagText) => {
|
||||
tagText += '%'
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
db.promise()
|
||||
.query(`SELECT text FROM note_tag
|
||||
|
||||
let params = [userId, tagText]
|
||||
let query = `SELECT tag.id, text FROM note_tag
|
||||
JOIN tag ON note_tag.tag_id = tag.id
|
||||
WHERE note_tag.user_id = ?
|
||||
AND tag.text LIKE ?
|
||||
AND note_tag.tag_id NOT IN (
|
||||
SELECT note_tag.tag_id FROM note_tag WHERE note_tag.note_id = ?
|
||||
)
|
||||
GROUP BY text
|
||||
LIMIT 6`, [userId, tagText, noteId])
|
||||
AND tag.text LIKE ?`
|
||||
|
||||
if(noteId && noteId > 0){
|
||||
params.push(noteId)
|
||||
query += `AND note_tag.tag_id NOT IN
|
||||
(SELECT note_tag.tag_id FROM note_tag WHERE note_tag.note_id = ?)`
|
||||
}
|
||||
|
||||
query += ` GROUP BY text, id LIMIT 6`
|
||||
|
||||
|
||||
db.promise()
|
||||
.query(query, params)
|
||||
.then((rows, fields) => {
|
||||
resolve(rows[0]) //Return new ID
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user