Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Apps search
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
  • Loading branch information
skjnldsv committed Jun 19, 2018
commit 259f70d640507d1134270dcb5b9a6c96d9f781b9
36 changes: 8 additions & 28 deletions settings/js/settings-vue.js

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions settings/js/settings-vue.js.map

Large diffs are not rendered by default.

21 changes: 11 additions & 10 deletions settings/src/views/Apps.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -63,8 +63,11 @@ export default {
appList,
},
methods: {
setSearch(search) {
this.search = search;
setSearch(query) {
this.searchQuery = query;
},
resetSearch() {
this.setSearch('');
}
},
beforeMount() {
Expand All @@ -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: {
Expand Down