mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2025-03-14 12:10:18 +03:00
perf(Torrent Detail): Add escape exception if modals (#974)
This commit is contained in:
parent
287329ed32
commit
28aeb3e8f3
1 changed files with 2 additions and 2 deletions
|
@ -81,7 +81,7 @@ export default defineComponent({
|
|||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['getTorrent']),
|
||||
...mapGetters(['getTorrent', 'getModals']),
|
||||
torrent() {
|
||||
//@ts-expect-error: TS2339: Property 'getTorrent' does not exist on type 'CreateComponentPublicInstance...'.
|
||||
return this.getTorrent(this.hash)
|
||||
|
@ -103,7 +103,7 @@ export default defineComponent({
|
|||
this.$router.back()
|
||||
},
|
||||
handleKeyboardShortcut(e: KeyboardEvent) {
|
||||
if (e.key === 'Escape') {
|
||||
if (e.key === 'Escape' && this.getModals().length === 0) {
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue