summaryrefslogtreecommitdiffstats
path: root/settings/src
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-06-19 23:27:46 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-06-19 23:55:44 +0200
commit259f70d640507d1134270dcb5b9a6c96d9f781b9 (patch)
treecf2d37fdd7359ee038eb2fcc243dfda180af0034 /settings/src
parent8f88c5acdd4985e89df13c182db0dee67da0fa21 (diff)
downloadnextcloud-server-259f70d640507d1134270dcb5b9a6c96d9f781b9.tar.gz
nextcloud-server-259f70d640507d1134270dcb5b9a6c96d9f781b9.zip
Apps search
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'settings/src')
-rw-r--r--settings/src/views/Apps.vue21
1 files changed, 11 insertions, 10 deletions
diff --git a/settings/src/views/Apps.vue b/settings/src/views/Apps.vue
index 79ab86f24d0..0f2983eadd6 100644
--- a/settings/src/views/Apps.vue
+++ b/settings/src/views/Apps.vue
@@ -24,7 +24,7 @@
<div id="app">
<app-navigation :menu="menu" />
<div id="app-content" class="app-settings-content" :class="{ 'with-app-sidebar': currentApp, 'icon-loading': loadingList }">
- <app-list :category="category" :app="currentApp" :search="search"></app-list>
+ <app-list :category="category" :app="currentApp" :search="searchQuery"></app-list>
<div id="app-sidebar" v-if="id && currentApp">
<app-details :category="category" :app="currentApp"></app-details>
</div>
@@ -63,8 +63,11 @@ export default {
appList,
},
methods: {
- setSearch(search) {
- this.search = search;
+ setSearch(query) {
+ this.searchQuery = query;
+ },
+ resetSearch() {
+ this.setSearch('');
}
},
beforeMount() {
@@ -74,16 +77,14 @@ export default {
this.$store.commit('setUpdateCount', this.$store.getters.getServerData.updateCount)
},
mounted() {
- // TODO: remove jQuery once we have a proper standardisation of the search
- $('#searchbox').show();
- let self = this;
- $('#searchbox').change(function(e) {
- self.setSearch($('#searchbox').val());
- });
+ /**
+ * Register search
+ */
+ this.appSearch = new OCA.Search(this.setSearch, this.resetSearch);
},
data() {
return {
- search: ''
+ searchQuery: ''
}
},
watch: {