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:
geoffrey45
2022-03-12 08:56:38 +03:00
parent 39fba364d3
commit 658e7cdbb7
21 changed files with 538 additions and 245 deletions
+15 -2
View File
@@ -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);
},
},
});