Browse Source

Fix saving colors for notes;

modulation
Nero Ignis 3 years ago
parent
commit
287a335f21
  1. 6
      src/views/Notes.vue

6
src/views/Notes.vue

@ -16,7 +16,7 @@
<span v-for="color in noteColors" <span v-for="color in noteColors"
v-bind:key="color"> v-bind:key="color">
<span href="javascript:" <span href="javascript:"
@click="note.color = color;" @click="changeColor(note, color);"
class="color-change-button" class="color-change-button"
v-if="color !== note.color" v-if="color !== note.color"
:style="'background-color: ' + color"> :style="'background-color: ' + color">
@ -56,6 +56,10 @@ export default {
component.$store.commit('createNote', ''); component.$store.commit('createNote', '');
component.$store.commit('saveNotes'); component.$store.commit('saveNotes');
}) })
},
changeColor(note, color) {
note.color = color;
this.$store.commit('saveNotes');
} }
} }
} }

Loading…
Cancel
Save