Skip to content

Commit 6e03368

Browse files
committed
fix: Address review comments
Signed-off-by: Julius Härtl <jus@bitgrid.net>
1 parent eb9f1f6 commit 6e03368

File tree

5 files changed

+15
-16
lines changed

5 files changed

+15
-16
lines changed

src/App.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ import PlusIcon from 'vue-material-design-icons/Plus.vue'
5858
import CogIcon from 'vue-material-design-icons/Cog.vue'
5959
6060
import AppSettings from './components/AppSettings.vue'
61-
import EditorHint from './components/Modal/EditorHint.vue'
6261
import CategoriesList from './components/CategoriesList.vue'
62+
import EditorHint from './components/Modal/EditorHint.vue'
6363
6464
import { config } from './config.js'
6565
import { fetchNotes, noteExists, createNote, undoDeleteNote } from './NotesService.js'
@@ -70,15 +70,15 @@ export default {
7070
7171
components: {
7272
AppSettings,
73+
CategoriesList,
74+
CogIcon,
7375
EditorHint,
7476
NcAppContent,
7577
NcAppNavigation,
7678
NcAppNavigationNew,
7779
NcAppNavigationItem,
7880
NcContent,
79-
CogIcon,
8081
PlusIcon,
81-
CategoriesList,
8282
},
8383
8484
data() {

src/components/CategoriesList.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Fragment>
33
<NcAppNavigationItem
44
:title="t('notes', 'All notes')"
5-
:class="{ active: null === selectedCategory }"
5+
:class="{ active: selectedCategory === null }"
66
@click.prevent.stop="onSelectCategory(null)"
77
>
88
<HistoryIcon slot="icon" :size="20" />

src/components/Note.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
2-
<NoteRich v-if="ready && rich" :note-id="noteId" />
3-
<NotePlain v-else-if="ready" :note-id="noteId" />
2+
<NoteRich v-if="isRichMode" :note-id="noteId" />
3+
<NotePlain v-else-if="isPlainMode" :note-id="noteId" />
44
</template>
55
<script>
66
import NoteRich from './NoteRich.vue'
@@ -23,11 +23,11 @@ export default {
2323
},
2424
2525
computed: {
26-
rich() {
26+
isRichMode() {
2727
return window.oc_appswebroots.text && store.state.app.settings.noteMode === 'rich'
2828
},
29-
ready() {
30-
return store.state.app.settings.noteMode !== null
29+
isPlainMode() {
30+
return store.state.app.settings.noteMode !== null && store.state.app.settings.noteMode !== 'rich'
3131
},
3232
},
3333
}

src/components/NoteItem.vue

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
<script>
4848
import { NcListItem, NcActionButton } from '@nextcloud/vue'
4949
import AlertOctagonIcon from 'vue-material-design-icons/AlertOctagon.vue'
50-
import StarIcon from 'vue-material-design-icons/Star.vue'
5150
import FileDocumentOutlineIcon from 'vue-material-design-icons/FileDocumentOutline.vue'
51+
import StarIcon from 'vue-material-design-icons/Star.vue'
5252
import SidebarIcon from 'vue-material-design-icons/PageLayoutSidebarRight.vue'
5353
import { categoryLabel, routeIsNewNote } from '../Util.js'
5454
import { showError } from '@nextcloud/dialogs'
@@ -59,12 +59,12 @@ export default {
5959
name: 'NoteItem',
6060
6161
components: {
62-
NcActionButton,
63-
NcListItem,
6462
AlertOctagonIcon,
65-
StarIcon,
6663
FileDocumentOutlineIcon,
64+
NcActionButton,
65+
NcListItem,
6766
SidebarIcon,
67+
StarIcon,
6868
},
6969
7070
props: {
@@ -115,7 +115,6 @@ export default {
115115
116116
methods: {
117117
onNoteSelected(noteId) {
118-
console.error('select note', noteId)
119118
this.$emit('note-selected', noteId)
120119
},
121120
onToggleFavorite() {

src/components/Sidebar.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ export default {
199199
this.newTitle = newTitle
200200
},
201201
202-
onRenameTitle(event) {
203-
if (event && this.title !== this.newTitle) {
202+
onRenameTitle() {
203+
if (this.title !== this.newTitle) {
204204
this.loading.title = true
205205
setTitle(this.note.id, this.newTitle)
206206
.catch(() => {

0 commit comments

Comments
 (0)