feat(webreader): escape closes dialogs

This commit is contained in:
Gauthier Roebroeck 2020-03-03 12:11:46 +08:00
parent 2eae83f561
commit 9e44571af5
2 changed files with 13 additions and 2 deletions

View file

@ -1,7 +1,9 @@
<template>
<v-dialog v-model="input" scrollable>
<v-dialog v-model="input" scrollable
@keydown.esc.stop=""
>
<v-card :max-height="$vuetify.breakpoint.height * .9" dark>
<v-card-title>
<v-card-title>
<v-pagination
v-model="page"
:total-visible="perPage"

View file

@ -163,6 +163,7 @@
:close-on-content-click="false"
transition="dialog-bottom-transition"
:width="$vuetify.breakpoint.width * ($vuetify.breakpoint.smAndUp ? 0.5 : 1)"
@keydown.esc.stop=""
>
<v-container fluid class="pa-0">
<v-toolbar dark color="primary">
@ -477,6 +478,14 @@ export default Vue.extend({
this.showThumbnailsExplorer = !this.showThumbnailsExplorer
break
case 'Escape':
if (this.showThumbnailsExplorer) {
this.showThumbnailsExplorer = false
break
}
if (this.menu) {
this.menu = false
break
}
this.closeBook()
break
}