Large refactor on the front end

Created pages directory
Added night mode
This commit is contained in:
Max G
2019-07-30 19:10:31 +00:00
parent fcee24a61d
commit 7806a206b2
14 changed files with 98 additions and 79 deletions

View File

@@ -222,6 +222,7 @@ Notes.search = (userId, searchQuery, searchTags) => {
.replace(/<[^>]+>/g, '') //Rip out all HTML tags
//Generate Subtext
note.subtext = ''
if(note.text != '' && note.title != ''){
note.subtext = note.text
.replace(/&[#A-Za-z0-9]+;/g,' ') //Rip out all HTML entities
@@ -245,6 +246,9 @@ Notes.search = (userId, searchQuery, searchTags) => {
if(highlights && highlights[note.id] && highlights[note.id].notes_tags){
note['tag_highlights'] = highlights[note.id].notes_tags
}
//Clear out note.text before sending it to front end
delete note.text
})
//If no notes are returned, there are no tags, return empty