mirror of
https://github.com/gotson/komga.git
synced 2025-01-09 04:08:00 +08:00
feat(webreader): add fullscreen keyboard shortcut
This commit is contained in:
parent
3fb24cba26
commit
a72a3bab62
@ -17,6 +17,9 @@ export const shortcutsSettings = [
|
||||
new Shortcut('bookreader.shortcuts.cycle_scale',
|
||||
(ctx: any) => ctx.cycleScale()
|
||||
, 'c'),
|
||||
new Shortcut('bookreader.shortcuts.fullscreen',
|
||||
(ctx: any) => ctx.switchFullscreen()
|
||||
, 'f'),
|
||||
]
|
||||
|
||||
export const shortcutsMenus = [
|
||||
|
@ -128,6 +128,7 @@
|
||||
"cycle_scale": "Cycle scale",
|
||||
"cycle_side_padding": "Cycle side padding",
|
||||
"first_page": "First page",
|
||||
"fullscreen": "Enter/exit full screen",
|
||||
"last_page": "Last page",
|
||||
"left_to_right": "Left to Right",
|
||||
"menus": "Menus",
|
||||
|
@ -626,6 +626,9 @@ export default Vue.extend({
|
||||
enterFullscreen() {
|
||||
if (screenfull.isEnabled) screenfull.request(document.documentElement, {navigationUI: 'hide'})
|
||||
},
|
||||
switchFullscreen() {
|
||||
if (screenfull.isEnabled) screenfull.isFullscreen ? screenfull.exit() : this.enterFullscreen()
|
||||
},
|
||||
fullscreenChanged() {
|
||||
if (screenfull.isEnabled && screenfull.isFullscreen) this.fullscreenIcon = 'mdi-fullscreen-exit'
|
||||
else this.fullscreenIcon = 'mdi-fullscreen'
|
||||
|
Loading…
Reference in New Issue
Block a user