Updated to later version of vue cli to improve build process

* Updated some simples styles
* Added archive button to main notes
fixes #21
This commit is contained in:
Max G
2020-03-11 03:47:07 +00:00
parent 4c17efceea
commit f7fc937d26
15 changed files with 12003 additions and 74 deletions

View File

@@ -217,6 +217,21 @@ Note.setPinned = (userId, noteId, pinnedBoolean) => {
})
}
Note.setArchived = (userId, noteId, archivedBoolead) => {
return new Promise((resolve, reject) => {
const archived = archivedBoolead ? 1:0
//Update other note attributes
return db.promise()
.query('UPDATE note SET archived = ? WHERE id = ? AND user_id = ? LIMIT 1',
[archived, noteId, userId])
.then((rows, fields) => {
resolve(true)
})
})
}
//
// Delete a note and all its remaining parts
//