mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 20:43:04 +00:00
Use gunicorn instead of Werkzeug and 32 more very minor changes (#35)
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
import { defineStore } from "pinia";
|
||||
import perks from "../composables/perks";
|
||||
|
||||
const tablist = {
|
||||
home: "home",
|
||||
search: "search",
|
||||
queue: "queue",
|
||||
};
|
||||
|
||||
export default defineStore("tabs", {
|
||||
state: () => ({
|
||||
tabs: tablist,
|
||||
current: tablist.home,
|
||||
}),
|
||||
actions: {
|
||||
changeTab(tab: string) {
|
||||
if (tab === this.tabs.queue) {
|
||||
setTimeout(() => {
|
||||
perks.focusCurrent();
|
||||
}, 500);
|
||||
}
|
||||
this.current = tab;
|
||||
},
|
||||
switchToQueue() {
|
||||
this.changeTab(tablist.queue);
|
||||
},
|
||||
switchToSearch() {
|
||||
this.changeTab(tablist.search);
|
||||
},
|
||||
switchToHome() {
|
||||
this.changeTab(tablist.home);
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user