Skip to content

Commit 12ff227

Browse files
committed
style: fix code style issues
1 parent 0985fb7 commit 12ff227

File tree

5 files changed

+47
-19
lines changed

5 files changed

+47
-19
lines changed

components/UserNotActivatedBlank.vue

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
<template>
22
<div class="blank">
3-
<span>Your account isn't activated! View activation mail in your email</span>
4-
<v-btn depressed small color="teal darken-2" class="ml-10" @click="sendActivationMail">
3+
<span
4+
>Your account isn't activated! View activation mail in your email</span
5+
>
6+
<v-btn
7+
depressed
8+
small
9+
color="teal darken-2"
10+
class="ml-10"
11+
@click="sendActivationMail"
12+
>
513
Send activation mail AGAIN
614
</v-btn>
715
</div>
@@ -11,11 +19,11 @@
1119
export default {
1220
name: 'UserNotActivatedBlank',
1321
methods: {
14-
async sendActivationMail () {
22+
async sendActivationMail() {
1523
await this.$axios.post('users/activate/send')
1624
this.$store.commit('updateSnackbar', {
1725
state: true,
18-
message: "Activation mail sent successfully",
26+
message: 'Activation mail sent successfully',
1927
type: 'success',
2028
apiError: false
2129
})

components/notesLayout/Note.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ export default {
8585
}
8686
},
8787
addNote() {
88-
this.$store.commit('notes/addNote', { pageId: this.pageId, author: this.currentUser.userId })
88+
this.$store.commit('notes/addNote', {
89+
pageId: this.pageId,
90+
author: this.currentUser.userId
91+
})
8992
setTimeout(() => {
9093
this.$parent.$refs[
9194
this.currentNotes[this.currentNotes.length - 1]?.noteId
@@ -100,7 +103,7 @@ export default {
100103
updated: {
101104
content: this.updatedContent,
102105
styles: this.styles,
103-
position: this.position,
106+
position: this.position
104107
}
105108
})
106109
}

layouts/notes.vue

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
/>
3535
<v-divider class="mt-10"></v-divider>
3636
</div>
37-
37+
3838
<div class="mt-10">
3939
<div v-if="rootPages.length > 0">
4040
<page-item
@@ -84,8 +84,8 @@ export default {
8484
pageId() {
8585
return this.$route.params.pageID
8686
},
87-
favouritePages () {
88-
return this.rootPages.filter(page => page.favourite)
87+
favouritePages() {
88+
return this.rootPages.filter((page) => page.favourite)
8989
},
9090
...mapState('notes', [
9191
'removedNotes',
@@ -123,7 +123,11 @@ export default {
123123
)
124124
},
125125
methods: {
126-
...mapMutations('notes', ['clearChangedNotes', 'clearRemovedNotes', 'removeFromChangedNotes']),
126+
...mapMutations('notes', [
127+
'clearChangedNotes',
128+
'clearRemovedNotes',
129+
'removeFromChangedNotes'
130+
]),
127131
...mapActions('notes', ['clearNewNotes']),
128132
saveAll() {
129133
this.saveNewNotes()
@@ -175,14 +179,18 @@ export default {
175179
return
176180
}
177181
178-
let changedNotes = this.currentNotes.filter((note) => this.changedNotes.includes(note.noteId))
179-
const newNotesInChangedNotes = changedNotes.filter(note => note.newNote)
180-
if(newNotesInChangedNotes.length > 0) {
182+
let changedNotes = this.currentNotes.filter((note) =>
183+
this.changedNotes.includes(note.noteId)
184+
)
185+
const newNotesInChangedNotes = changedNotes.filter((note) => note.newNote)
186+
if (newNotesInChangedNotes.length > 0) {
181187
this.saveNewNotes()
182-
this.removeFromChangedNotes(...newNotesInChangedNotes.map(note => note.noteId))
183-
changedNotes = changedNotes.filter(note => !note.newNote)
188+
this.removeFromChangedNotes(
189+
...newNotesInChangedNotes.map((note) => note.noteId)
190+
)
191+
changedNotes = changedNotes.filter((note) => !note.newNote)
184192
}
185-
if(changedNotes.length <= 0) {
193+
if (changedNotes.length <= 0) {
186194
return
187195
}
188196

pages/_pageID.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@ export default {
7373
...mapActions('pages', ['setCurrentPage', 'editPage']),
7474
...mapActions('notes', ['getNotes']),
7575
addNote() {
76-
this.$store.commit('notes/addNote', { pageId: this.pageId, author: this.currentUser.userId })
76+
this.$store.commit('notes/addNote', {
77+
pageId: this.pageId,
78+
author: this.currentUser.userId
79+
})
7780
setTimeout(() => {
7881
this.$refs[
7982
this.currentNotes[this.currentNotes.length - 1]?.noteId

store/notes/mutations.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default {
2424
state.changedNotes = []
2525
},
2626
removeFromChangedNotes(state, ...notesIds) {
27-
notesIds.forEach(noteId => {
27+
notesIds.forEach((noteId) => {
2828
state.changedNotes.splice(state.changedNotes.indexOf(noteId), 1)
2929
})
3030
},
@@ -39,7 +39,13 @@ export default {
3939

4040
const foundNote = state.notes[page].find((note) => note.noteId === noteId)
4141
const foundNoteIndex = state.notes[page].indexOf(foundNote)
42-
state.notes[page][foundNoteIndex] = { ...foundNote, ...updated, page, noteId, author }
42+
state.notes[page][foundNoteIndex] = {
43+
...foundNote,
44+
...updated,
45+
page,
46+
noteId,
47+
author
48+
}
4349

4450
if (!state.changedNotes.includes(noteId)) {
4551
state.changedNotes.push(noteId)

0 commit comments

Comments
 (0)