* 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:
Max G
2020-05-15 23:12:09 +00:00
parent 67b218329b
commit e87e8513bc
20 changed files with 526 additions and 271 deletions

View File

@@ -34,7 +34,7 @@ router.post('/delete', function (req, res) {
})
router.post('/create', function (req, res) {
Notes.create(userId, req.body.title, req.body.text, masterKey)
Notes.create(req.io, userId, req.body.title, req.body.text, masterKey)
.then( id => res.send({id}) )
})

View File

@@ -2,12 +2,15 @@ var express = require('express')
var router = express.Router()
let QuickNote = require('@models/QuickNote');
let userId = null
let masterKey = null
// middleware that is specific to this router
router.use(function setUserId (req, res, next) {
if(userId = req.headers.userId){
userId = req.headers.userId
masterKey = req.headers.masterKey
}
next()
@@ -15,19 +18,19 @@ router.use(function setUserId (req, res, next) {
//Get quick note text
router.post('/get', function (req, res) {
QuickNote.get(userId)
QuickNote.get(userId, masterKey)
.then( data => res.send(data) )
})
//Push text to quick note
router.post('/update', function (req, res) {
QuickNote.update(userId, req.body.pushText)
QuickNote.update(req.io, userId, req.body.pushText, masterKey)
.then( data => res.send(data) )
})
//Change quick note to a new note
router.post('/change', function (req, res) {
QuickNote.change(userId, req.body.noteId)
//Push text to quick note
router.post('/new', function (req, res) {
QuickNote.newNote(userId)
.then( data => res.send(data) )
})