summaryrefslogtreecommitdiffstats
path: root/apps/settings/src/views
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2020-09-11 12:18:10 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2020-09-14 16:05:37 +0200
commit58b19efd7492bd2edc112da9c3acdd0456385061 (patch)
tree90b0dda6ee30144ae3a31a89ac9006c41dcf9a76 /apps/settings/src/views
parentc1ff011990294bf5eb431a82550be64a3775574f (diff)
downloadnextcloud-server-58b19efd7492bd2edc112da9c3acdd0456385061.tar.gz
nextcloud-server-58b19efd7492bd2edc112da9c3acdd0456385061.zip
Add users and apps inner search and add HeaderMenu cancel
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/settings/src/views')
-rw-r--r--apps/settings/src/views/Apps.vue26
1 files changed, 16 insertions, 10 deletions
diff --git a/apps/settings/src/views/Apps.vue b/apps/settings/src/views/Apps.vue
index a95127b77d6..ca45276f589 100644
--- a/apps/settings/src/views/Apps.vue
+++ b/apps/settings/src/views/Apps.vue
@@ -141,6 +141,10 @@
</template>
<script>
+import { subscribe, unsubscribe } from '@nextcloud/event-bus'
+import Vue from 'vue'
+import VueLocalStorage from 'vue-localstorage'
+
import AppContent from '@nextcloud/vue/dist/Components/AppContent'
import AppNavigation from '@nextcloud/vue/dist/Components/AppNavigation'
import AppNavigationCounter from '@nextcloud/vue/dist/Components/AppNavigationCounter'
@@ -149,8 +153,6 @@ import AppNavigationSpacer from '@nextcloud/vue/dist/Components/AppNavigationSpa
import AppSidebar from '@nextcloud/vue/dist/Components/AppSidebar'
import AppSidebarTab from '@nextcloud/vue/dist/Components/AppSidebarTab'
import Content from '@nextcloud/vue/dist/Components/Content'
-import Vue from 'vue'
-import VueLocalStorage from 'vue-localstorage'
import AppList from '../components/AppList'
import AppDetails from '../components/AppDetails'
@@ -254,8 +256,8 @@ export default {
},
watch: {
- category(val, old) {
- this.setSearch('')
+ category() {
+ this.searchQuery = ''
},
app() {
@@ -276,20 +278,24 @@ export default {
this.$store.dispatch('getGroups', { offset: 0, limit: 5 })
this.$store.commit('setUpdateCount', this.$store.getters.getServerData.updateCount)
},
+
mounted() {
- /**
- * Register search
- */
- this.appSearch = new OCA.Search(this.setSearch, this.resetSearch)
+ subscribe('nextcloud:unified-search:search', this.setSearch)
+ subscribe('nextcloud:unified-search:reset', this.resetSearch)
+ },
+ beforeDestroy() {
+ unsubscribe('nextcloud:unified-search:search', this.setSearch)
+ unsubscribe('nextcloud:unified-search:reset', this.resetSearch)
},
methods: {
- setSearch(query) {
+ setSearch({ query }) {
this.searchQuery = query
},
resetSearch() {
- this.setSearch('')
+ this.searchQuery = ''
},
+
hideAppDetails() {
this.$router.push({
name: 'apps-category',