mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
move global search input to a general location
- create a global search store - create a half-baked context menu store -
This commit is contained in:
+15
-2
@@ -1,5 +1,5 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { ref } from "vue";
|
||||
import perks from "../composables/perks";
|
||||
|
||||
const tablist = {
|
||||
home: "home",
|
||||
@@ -14,8 +14,21 @@ export default defineStore("tabs", {
|
||||
}),
|
||||
actions: {
|
||||
changeTab(tab) {
|
||||
if (tab === this.tabs.queue) {
|
||||
setTimeout(() => {
|
||||
perks.focusCurrent();
|
||||
}, 500);
|
||||
}
|
||||
this.current = tab;
|
||||
console.log(this.current);
|
||||
},
|
||||
switchToQueue() {
|
||||
this.changeTab(tablist.queue);
|
||||
},
|
||||
switchToSearch() {
|
||||
this.changeTab(tablist.search);
|
||||
},
|
||||
switchToHome() {
|
||||
this.changeTab(tablist.home);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user