Skip to content

Commit

Permalink
close left menu when loading the gallery
Browse files Browse the repository at this point in the history
  • Loading branch information
ildyria committed Dec 3, 2024
1 parent 72ecd9a commit 4ea3c75
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions resources/js/views/gallery-panels/Albums.vue
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,13 @@ onKeyStroke("k", () => !shouldIgnoreKeystroke() && user.value?.id === null && (i
const { onPaste, dragEnd, dropUpload } = useMouseEvents(rootRights, is_upload_visible, list_upload_files);
window.addEventListener("paste", onPaste);
window.addEventListener("dragover", dragEnd);
window.addEventListener("drop", dropUpload);
onMounted(() => {
window.addEventListener("paste", onPaste);
window.addEventListener("dragover", dragEnd);
window.addEventListener("drop", dropUpload);
togglableStore.left_menu_open = false;
});
router.afterEach(() => {
window.removeEventListener("paste", onPaste);
window.removeEventListener("dragover", dragEnd);
Expand Down

0 comments on commit 4ea3c75

Please sign in to comment.