Added note tags to main note edit display

This commit is contained in:
Max G 2020-03-09 03:11:05 +00:00
parent d3c0d6e2b9
commit 4c17efceea
2 changed files with 27 additions and 6 deletions

View File

@ -61,7 +61,6 @@
<!-- Toolbar on the bottom -->
<div class="tool-bar" @click.self="cardClicked">
<div class="icon-bar">
<!-- {{$helpers.timeAgo(note.updated)}} -->
@ -83,6 +82,10 @@
<i class="archive icon"></i>
</span> -->
<i class="teeny-button" data-tooltip="Tags" data-inverted v-on:click="toggleTags(true)">
<i class="tags icon"></i>
</i>
<i class="teeny-button" data-tooltip="Pin" data-inverted v-on:click="pinNote">
<i class="pin icon"></i>
</i>
@ -90,9 +93,6 @@
<delete-button class="teeny-button" :note-id="note.id" />
</span>
</div>
<div v-if="getThumbs.length > 0">
@ -103,9 +103,18 @@
</div>
<side-slide-menu v-if="showTagSlideMenu" v-on:close="toggleTags(false)">
<div class="ui basic segment">
<note-tag-edit :noteId="note.id" :key="'display-tags-for-note-'+note.id"/>
</div>
</side-slide-menu>
</div>
</template>
<script>
@ -117,6 +126,8 @@
props: [ 'onClick', 'data', 'currentlyOpen', 'textResults', 'attachmentResults', 'tagResults' ],
components: {
'delete-button': require('@/components/NoteDeleteButtonComponent.vue').default,
'note-tag-edit': require('@/components/NoteTagEdit.vue').default,
'side-slide-menu': require('@/components/SideSlideMenuComponent.vue').default,
},
methods:{
cardClicked(){
@ -149,6 +160,14 @@
.then(data => {
this.$bus.$emit('update_single_note', this.note.id)
})
},
toggleTags(state){
this.showTagSlideMenu = state
if(state == false){
this.$bus.$emit('update_single_note', this.note.id)
}
},
},
@ -160,6 +179,7 @@
noteIcon: null,
iconColor: null,
beenClicked: false,
showTagSlideMenu: false,
}
},
computed: {

View File

@ -213,6 +213,7 @@
this.$bus.$on('note_deleted', (noteId) => {
//Remove deleted note from set, its deleted
this.fetchUserTags()
Object.keys(this.noteSections).forEach( key => {
this.noteSections[key].forEach( (note, index) => {
if(note.id == noteId){