From 9da99243bdf844fcb9ef2bf6f1f7f725a99714b6 Mon Sep 17 00:00:00 2001 From: korelstar Date: Thu, 27 Aug 2020 08:06:09 +0200 Subject: [PATCH 1/2] remove old search (not compatible to NC20) --- src/App.vue | 24 --------------- src/components/NavigationList.vue | 50 ------------------------------- 2 files changed, 74 deletions(-) diff --git a/src/App.vue b/src/App.vue index ed7253a18..f69421727 100644 --- a/src/App.vue +++ b/src/App.vue @@ -13,7 +13,6 @@ @@ -45,7 +44,6 @@ import { Content, } from '@nextcloud/vue' import { showSuccess } from '@nextcloud/dialogs' -import { emit } from '@nextcloud/event-bus' import '@nextcloud/dialogs/styles/toast.scss' import { config } from './config' @@ -70,7 +68,6 @@ export default { return { filter: { category: null, - search: '', }, loading: { notes: true, @@ -89,20 +86,12 @@ export default { }, filteredNotes() { - const search = this.filter.search.toLowerCase() - const notes = this.notes.filter(note => { if (this.filter.category !== null && this.filter.category !== note.category && !note.category.startsWith(this.filter.category + '/')) { return false } - const searchFields = ['title', 'category'] - if (search !== '') { - return searchFields.some( - searchField => note[searchField].toLowerCase().indexOf(search) !== -1 - ) - } return true }) @@ -128,9 +117,6 @@ export default { created() { store.commit('setDocumentTitle', document.title) - if (typeof OCA.Search === 'function') { - this.search = new OCA.Search(this.onSearch, this.onResetSearch) - } window.addEventListener('beforeunload', this.onClose) this.loadNotes() }, @@ -205,16 +191,6 @@ export default { } }, - onSearch(query) { - this.filter.search = query - - emit('toggle-navigation', { open: true }) - }, - - onResetSearch() { - this.filter.search = '' - }, - onNewNote() { if (this.loading.create) { return diff --git a/src/components/NavigationList.vue b/src/components/NavigationList.vue index b72d36097..9f0ba6789 100644 --- a/src/components/NavigationList.vue +++ b/src/components/NavigationList.vue @@ -7,24 +7,6 @@ @category-selected="$emit('category-selected', $event)" /> - - - - -
  • - -
  • -