* Updated color picker interface

* Updated note status bar
* Added fast filters
* Added pinned and archived notes options
* Added loading indicators to notes and loading of notes
* updated tag edit area
* Updated how search results are displayed
* Fixed bug with opening and closing two notes one after another
* Added mobile detection to global store
* Added a lot of style tweaks and UX tweaks
This commit is contained in:
Max G committed 2019-09-10 18:10:11 +00:00
1 parent dd0205a3c1
commit 7b77bd37f3
14 files changed
+620 -131

No files matched your search

+11 -4
View File
@@ -85,6 +85,13 @@ Tag.add = (tagText) => {
Tag.get = (userId, noteId) => {
return new Promise((resolve, reject) => {
//Update last opened date of note
const now = Math.round((+new Date)/1000)
db.promise()
.query('UPDATE note SET opened = ? WHERE id = ? AND user_id = ? LIMIT 1', [now, noteId, userId])
.then((rows, fields) => {})
db.promise()
.query(`SELECT note_tag.id, tag.text FROM note_tag
JOIN tag ON (tag.id = note_tag.tag_id)
@@ -138,7 +145,7 @@ Tag.suggest = (userId, noteId, tagText) => {
SELECT note_tag.tag_id FROM note_tag WHERE note_tag.note_id = ?
)
GROUP BY text
LIMIT 6;`, [userId, tagText, noteId])
LIMIT 6`, [userId, tagText, noteId])
.then((rows, fields) => {
resolve(rows[0]) //Return new ID
})
@@ -146,7 +153,7 @@ Tag.suggest = (userId, noteId, tagText) => {
})
}
//Suggest note tags - don't suggest tags already on note
//Latest Tags - don't suggest tags already on note
Tag.latest = (userId, noteId) => {
return new Promise((resolve, reject) => {
@@ -160,9 +167,9 @@ Tag.latest = (userId, noteId) => {
)
GROUP BY tag.text, note.updated
ORDER BY note.updated DESC
LIMIT 6;`, [userId, noteId])
LIMIT 8;`, [userId, noteId])
.then((rows, fields) => {
resolve(rows[0]) //Return new ID
resolve(rows[0]) //Return found tags
})
.catch(console.log)
})