fix search
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Wed, 14 Aug 2019 18:06:38 +0000 (20:06 +0200)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Wed, 14 Aug 2019 18:06:38 +0000 (20:06 +0200)
music_assistant.code-workspace [new file with mode: 0644]
music_assistant/web/components/headermenu.vue.js
music_assistant/web/pages/search.vue.js

diff --git a/music_assistant.code-workspace b/music_assistant.code-workspace
new file mode 100644 (file)
index 0000000..362d7c2
--- /dev/null
@@ -0,0 +1,7 @@
+{
+       "folders": [
+               {
+                       "path": "."
+               }
+       ]
+}
\ No newline at end of file
index b65a5ce923367c03ca36d4e5d16f65741ff2afca..dff05921fca6f4a44d58252d98e9a15c10f93979 100755 (executable)
@@ -28,9 +28,6 @@ Vue.component("headermenu", {
                       {{ $globals.windowtitle }}
                   </v-card-title>
             <v-spacer></v-spacer>
-            <v-btn icon v-on:click="$globals.showsearchbox = true">
-                <v-icon>search</v-icon>
-              </v-btn>
         </v-layout>
     </v-toolbar>
     <v-toolbar flat fixed dense dark scroll-off-screen color="transparent" v-if="!$globals.windowtitle" > 
@@ -43,7 +40,7 @@ Vue.component("headermenu", {
             </v-btn>
             <v-spacer></v-spacer>
             <v-spacer></v-spacer>
-            <v-btn icon v-on:click="$globals.showsearchbox = true">
+            <v-btn icon v-on:click="$router.push({path: '/search'})">
                 <v-icon>search</v-icon>
               </v-btn>
         </v-layout>
index b1a8be2997142d5eb7168d87d8a3cdebee537569..996c01ef28babcd02155f7ba0aed6f84e2d50175 100755 (executable)
@@ -6,8 +6,8 @@ var Search = Vue.component('Search', {
         solo
         clearable
         :label="$t('type_to_search')"
-        prepend-inner-icon="search"
-        v-model="searchQuery">
+        append-icon="search"
+        v-model="searchQuery" v-on:keyup.enter="Search" @click:append="Search" style="margin-left:30px; margin-right:30px; margin-top:10px">
       </v-text-field>
 
       <v-tabs
@@ -90,7 +90,7 @@ var Search = Vue.component('Search', {
         </v-tabs>
 
       </section>`,
-  props: ['searchQuery'],
+  props: [],
   data() {
     return {
       selected: [2],
@@ -99,16 +99,14 @@ var Search = Vue.component('Search', {
       tracks: [],
       playlists: [],
       timeout: null,
+      active: 0,
+      searchQuery: ""
     }
   },
   created() {
     this.$globals.windowtitle = this.$t('search');
-    this.Search();
   },
   watch: {
-    searchQuery () {
-      this.Search();
-    }
   },
   methods: {
     toggle (index) {