* Adjusted theme colors to add more contrast on white theme while making black more OLED friendly

* Links now get an underline on hover
* Cleaned up CSS variable names, added another theme color for more control
* Cleaned up unused CSS, removed scrollbars popping up, tons of other little UI tweaks
* Renamed shared notes to inbox
* Tweaked form display, seperated login and create accouts
* Put login/sign up form on home page
* Created more legitimate marketing for home page
* Tons up updates to note page and note input panel
* Better support for two users editing a note
* MUCH better diff handling, web sockets restore notes with unsaved diffs
* Moved all squire text modifier functions into a mixin class
* It now says saving when closing a note
* Lots of cleanup and better handiling of events on mount and destroy
* Scroll behavior modified to load notes when closer to bottom of page
* Pretty decent shared notes and sharable link support
* Updated help text
* Search now includes tag suggestions and attachment suggestions
* Cleaned up scratch pad a ton, allow for users to create new scratch pads
* Created a 404 Page and a Shared note page
* So many other small improvements. Oh my god, what is wrong with me, not doing commits!?
This commit is contained in:
Max G
2020-06-07 20:57:35 +00:00
parent 09cccf1983
commit d349fb8328
31 changed files with 1605 additions and 1095 deletions

View File

@@ -23,8 +23,13 @@ router.use(function setUserId (req, res, next) {
//
router.post('/get', function (req, res) {
Note.get(userId, req.body.noteId, masterKey)
.then( data => {
res.send(data)
.then( noteObject => {
delete noteObject.snippet_salt
delete noteObject.salt
delete noteObject.encrypted_share_password_key
res.send(noteObject)
})
})
@@ -91,8 +96,8 @@ router.post('/settrashed', function (req, res) {
//
// Share Note Actions
//
router.post('/getshareusers', function (req, res) {
ShareNote.getUsers(userId, req.body.rawTextId)
router.post('/getshareinfo', function (req, res) {
ShareNote.getShareInfo(userId, req.body.noteId, req.body.rawTextId)
.then(results => res.send(results))
})
@@ -100,7 +105,7 @@ router.post('/shareadduser', function (req, res) {
// ShareNote.addUser(userId, req.body.noteId, req.body.rawTextId, req.body.username, masterKey)
User.getByUserName(req.body.username)
.then( user => {
return ShareNote.migrateNoteToShared(userId, req.body.noteId, user.id, masterKey)
return ShareNote.addUserToSharedNote(userId, req.body.noteId, user.id, masterKey)
})
.then( ({success, shareUserId}) => {
@@ -110,10 +115,28 @@ router.post('/shareadduser', function (req, res) {
router.post('/shareremoveuser', function (req, res) {
// (userId, noteId, shareNoteUserId, shareUserId, masterKey)
ShareNote.removeUserFromShared(userId, req.body.noteId, req.body.shareUserNoteId, masterKey)
ShareNote.removeUserFromSharedNote(userId, req.body.noteId, req.body.shareUserNoteId, masterKey)
.then(results => res.send(results))
})
router.post('/enableshare', function (req, res) {
//Create Shared Encryption Key for Note
ShareNote.migrateToShared(userId, req.body.noteId, masterKey)
.then(results => res.send(true))
})
router.post('/getsharekey', function (req, res) {
//Get Shared Key for a note
ShareNote.decryptSharedKey(userId, req.body.noteId, masterKey)
.then(results => res.send(results))
})
router.post('/disableshare', function (req, res) {
//Removed shared encryption key from note
ShareNote.migrateToNormal(userId, req.body.noteId, masterKey)
.then(results => res.send(true))
})
//
// Testing Action