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

@@ -0,0 +1,40 @@
<template>
<span>
<span class="clickable" @click="confirmDelete()" v-if="click == 0">
<i class="grey trash alternate icon"></i>
</span>
<span class="clickable" @click="actuallyDelete()" @mouseleave="reset" v-if="click == 1" data-tooltip="Click again to delete." data-position="left center">
<i class="red trash alternate icon"></i>
</span>
</span>
</template>
<script>
import axios from 'axios'
export default {
name: 'NoteTitleDisplayCard',
props: [ 'noteId', 'displayText' ],
data () {
return {
click: 0,
}
},
methods:{
confirmDelete(){
this.click++
},
actuallyDelete(){
axios.post('/api/notes/delete', {'noteId':this.noteId}).then(response => {
if(response.data == true){
this.$bus.$emit('note_deleted')
}
})
},
reset(){
this.click = 0
}
}
}
</script>