diff --git a/client/index.html b/client/index.html index 5f04839..35f3698 100644 --- a/client/index.html +++ b/client/index.html @@ -8,7 +8,7 @@ - + Notes diff --git a/client/src/assets/semantic-helper.css b/client/src/assets/semantic-helper.css index dd1c8e1..1cb6442 100644 --- a/client/src/assets/semantic-helper.css +++ b/client/src/assets/semantic-helper.css @@ -55,6 +55,9 @@ body { background-color: var(--background_color); border-color: var(--border_color); } +.ui.icon.input > i.icon { + color: var(--text_color); +} div.ui.basic.green.label { background-color: var(--background_color) !important; } diff --git a/client/src/components/AttachmentDisplayCard.vue b/client/src/components/AttachmentDisplayCard.vue index eda4b48..c99563c 100644 --- a/client/src/components/AttachmentDisplayCard.vue +++ b/client/src/components/AttachmentDisplayCard.vue @@ -98,7 +98,12 @@
- + + +
Save
{{linkText}} @@ -139,6 +144,7 @@ unfolded:true, visible: true, + showSave: false, working: false, } @@ -199,6 +205,8 @@ }, saveIt(){ + this.showSave = false + //Don't save text if it didn'th change if(this.item.text == this.text){ return diff --git a/client/src/components/GlobalSiteMenu.vue b/client/src/components/GlobalSiteMenu.vue index 6028eea..88c1eaf 100644 --- a/client/src/components/GlobalSiteMenu.vue +++ b/client/src/components/GlobalSiteMenu.vue @@ -166,7 +166,7 @@ @@ -233,11 +233,13 @@ this.mobile = this.$store.getters.getIsUserOnMobile this.collapsed = this.$store.getters.getIsUserOnMobile - // {{ totals['totalNotes'] }} - if(this.mobile){ this.menuOpen = false } + + if(this.loggedIn){ + this.$store.dispatch('fetchAndUpdateUserTotals') + } }, computed: { diff --git a/client/src/components/NoteInputPanel.vue b/client/src/components/NoteInputPanel.vue index 6c73e11..de38085 100644 --- a/client/src/components/NoteInputPanel.vue +++ b/client/src/components/NoteInputPanel.vue @@ -582,8 +582,10 @@ // simple function that trys to evaluate javascript const shittyMath = (string) => { + //Remove all chars but math chars + const cleanString = String(string).replace(/[a-zA-Z\s]*/g,'') try { - return Function('"use strict"; return (' + string + ')')(); + return Function('"use strict"; return (' + cleanString + ')')(); } catch (error) { console.log('Math Error: ', string) return null @@ -596,8 +598,7 @@ const line = node.innerText.trim() // = sign exists and its the last character in the string - let equalLocation = line.indexOf('=') - if(equalLocation != -1 && (line.length-1) == equalLocation ){ + if(line.indexOf('=') != -1 && (line.length-1) == line.indexOf('=')){ //Pull out everything before the formula and try to evaluate it const formula = line.split('=').shift() @@ -607,6 +608,7 @@ if(!isNaN(output) && output != null){ //Since there is HTML in the line, splice in the number after the = sign + let equalLocation = node.innerHTML.indexOf('=') let newLine = node.innerHTML.slice(0, equalLocation+1).trim() newLine += ` ${output}` newLine += node.innerHTML.slice(equalLocation+1).trim() diff --git a/client/src/components/NoteTitleDisplayCard.vue b/client/src/components/NoteTitleDisplayCard.vue index 2a12f91..15520cd 100644 --- a/client/src/components/NoteTitleDisplayCard.vue +++ b/client/src/components/NoteTitleDisplayCard.vue @@ -66,9 +66,9 @@
-
+
- +
@@ -118,6 +118,30 @@ iconColor: null, } }, + computed: { + getThumbs(){ + if(!this.note.thumbs){ + return [] + } + + let notDisplaying = [] + + //Remove images displaying in text from the thumbnails + this.note.thumbs.forEach( path => { + + const titleLocation = String(this.note.title).indexOf(path) + const subtextLocation = String(this.note.subtext).indexOf(path) + + if(titleLocation != -1 || subtextLocation != -1){ + return + } + + notDisplaying.push(path) + }) + + return notDisplaying + } + }, beforeMount(){ this.note = this.data diff --git a/client/src/components/SimpleAttachmentNoteComponent.vue b/client/src/components/SimpleAttachmentNoteComponent.vue index 95d09f5..e4d9a21 100644 --- a/client/src/components/SimpleAttachmentNoteComponent.vue +++ b/client/src/components/SimpleAttachmentNoteComponent.vue @@ -87,7 +87,8 @@ }, mounted(){ - axios.post('/api/attachment/search', {'attachmentType':2}) + + axios.post('/api/attachment/search', {'attachmentType':'files', 'setSize':1000}) .then( ({data}) => { //Sort files into two categories diff --git a/client/src/pages/AttachmentsPage.vue b/client/src/pages/AttachmentsPage.vue index 9bee76d..ecd56c3 100644 --- a/client/src/pages/AttachmentsPage.vue +++ b/client/src/pages/AttachmentsPage.vue @@ -1,8 +1,8 @@