Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/notes.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/Sidebar.vue')
-rw-r--r--src/components/Sidebar.vue17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue
index 028e2db6..906b5b32 100644
--- a/src/components/Sidebar.vue
+++ b/src/components/Sidebar.vue
@@ -59,7 +59,8 @@ import {
Multiselect,
Tooltip,
} from '@nextcloud/vue'
-import NotesService from '../NotesService'
+
+import { categoryLabel, getCategories, setFavorite, setCategory, saveNoteManually } from '../NotesService'
import store from '../store'
export default {
@@ -77,7 +78,7 @@ export default {
filters: {
categoryOptionLabel: function(obj) {
const category = obj.isTag ? obj.label : obj
- return NotesService.categoryLabel(category)
+ return categoryLabel(category)
},
},
@@ -128,7 +129,7 @@ export default {
return t('notes', 'You can create subcategories by using “/” as delimiter between parent category and subcategory, e.g. “{parent}/{sub}”.', { parent: t('notes', 'Category'), sub: t('notes', 'Subcategory') })
},
categories() {
- return [ '', ...NotesService.getCategories(0, false) ]
+ return [ '', ...getCategories(0, false) ]
},
sidebarOpen() {
return store.state.sidebarOpen
@@ -152,10 +153,10 @@ export default {
onSetFavorite(favorite) {
this.loading.favorite = true
- NotesService.setFavorite(this.note.id, favorite)
+ setFavorite(this.note.id, favorite)
.catch(() => {
})
- .finally(() => {
+ .then(() => {
this.loading.favorite = false
})
},
@@ -165,17 +166,17 @@ export default {
if (category !== null && this.note.category !== category) {
this.loading.category = true
this.note.category = category
- NotesService.setCategory(this.note.id, category)
+ setCategory(this.note.id, category)
.catch(() => {
})
- .finally(() => {
+ .then(() => {
this.loading.category = false
})
}
},
onManualSave() {
- NotesService.saveNoteManually(this.note.id)
+ saveNoteManually(this.note.id)
},
},