mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 04:23:01 +00:00
move album header color methods to composables
This commit is contained in:
+1
-16
@@ -37,17 +37,13 @@ import Tabs from "@/components/RightSideBar/Tabs.vue";
|
||||
import useContextStore from "@/stores/context";
|
||||
import useQStore from "@/stores/queue";
|
||||
|
||||
import { isSameRoute } from "@/composables/perks";
|
||||
import useShortcuts from "@/composables/useKeyboard";
|
||||
|
||||
const context_store = useContextStore();
|
||||
const queue = useQStore();
|
||||
const app_dom = document.getElementById("app");
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
// function to add the
|
||||
|
||||
queue.readQueue();
|
||||
useShortcuts(useQStore);
|
||||
|
||||
@@ -57,18 +53,7 @@ app_dom.addEventListener("click", (e) => {
|
||||
}
|
||||
});
|
||||
|
||||
function removeHighlight(route: RouteLocationNormalized) {
|
||||
setTimeout(() => {
|
||||
router.push({ name: route.name, params: route.params });
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
router.afterEach((to, from) => {
|
||||
const h_hash = to.query.highlight as string;
|
||||
|
||||
if (h_hash) removeHighlight(to);
|
||||
if (isSameRoute(to, from)) return;
|
||||
|
||||
router.afterEach(() => {
|
||||
document.getElementById("acontent")?.scrollTo(0, 0);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user