disable editor if note is deleting

This commit is contained in:
korelstar 2019-09-14 21:32:24 +02:00
parent e36e5a55f9
commit 5bd0a2e65c
3 changed files with 2 additions and 2 deletions

View File

@ -108,6 +108,7 @@ export default {
},
deleteNote(noteId) {
store.commit('setNoteAttribute', { noteId: noteId, attribute: 'deleting', value: true })
return axios
.delete(this.url('/notes/' + noteId))
.then(() => {

View File

@ -94,7 +94,6 @@ export default {
},
onDeleteNote() {
// TODO disable editor
this.loading.delete = true
NotesService.deleteNote(this.note.id)
.then(() => {

View File

@ -1,6 +1,6 @@
<template>
<AppContent :class="{ loading: loading || isManualSave, 'icon-error': !loading && (!note || note.error), 'sidebar-open': sidebarOpen }">
<div v-if="!loading && note && !note.error" id="note-container"
<div v-if="!loading && note && !note.error && !note.deleting" id="note-container"
class="note-container" :class="{ fullscreen: fullscreen }"
>
<div class="note-editor">