Skip to content

Commit

Permalink
any key to close fullscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
nbonamy committed Nov 4, 2024
1 parent 5c2010c commit 4552d70
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/MessageList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,13 @@ onMounted(() => {
})
const onFullscreen = (imageUrl: string) => {
document.addEventListener('keydown', onCloseFullScreen)
fullScreenImageUrl.value = imageUrl
window.api.fullscreen(true)
}
const onCloseFullScreen = () => {
document.removeEventListener('keydown', onCloseFullScreen)
fullScreenImageUrl.value = null
window.api.fullscreen(false)
}
Expand Down

0 comments on commit 4552d70

Please sign in to comment.