mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 12:33:03 +00:00
use @vueuse/useClickOutside to hide context menu
This commit is contained in:
committed by
Mungai Njoroge
parent
a496d68439
commit
4e0837a627
@@ -53,19 +53,11 @@ import LeftSidebar from "./components/LeftSidebar/index.vue";
|
||||
const queue = useQStore();
|
||||
const router = useRouter();
|
||||
const modal = useModalStore();
|
||||
const context_store = useContextStore();
|
||||
const settings = useSettingsStore();
|
||||
const app_dom = document.getElementById("app") as HTMLElement;
|
||||
|
||||
queue.readQueue();
|
||||
handleShortcuts(useQStore);
|
||||
|
||||
app_dom.addEventListener("click", (e) => {
|
||||
if (context_store.visible) {
|
||||
context_store.hideContextMenu();
|
||||
}
|
||||
});
|
||||
|
||||
router.afterEach(() => {
|
||||
(document.getElementById("acontent") as HTMLElement).scrollTo(0, 0);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user