diff --git a/README.md b/README.md index 709d7457..d624a1dc 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ The official docker images are available on [Dockerhub](https://hub.docker.com/r ### CLI ``` - Mango - Manga Server and Web Reader. Version 0.15.1 + Mango - Manga Server and Web Reader. Version 0.16.0 Usage: diff --git a/public/js/reader.js b/public/js/reader.js index b51c4af4..6d44a06d 100644 --- a/public/js/reader.js +++ b/public/js/reader.js @@ -292,3 +292,19 @@ const flipPage = (isNext) => { replaceHistory(newIdx); saveProgress(newIdx); }; + +/** + * Handle the global keydown events + * + * @function keyHandler + * @param {event} event - The $event object + */ +const keyHandler = (event) => { + const mode = getProp('mode'); + if (mode === 'continuous') return; + + if (event.key === 'ArrowLeft' || event.key === 'k') + flipPage(false); + if (event.key === 'ArrowRight' || event.key === 'j') + flipPage(true); +}; diff --git a/shard.yml b/shard.yml index e82a0691..bca96d9c 100644 --- a/shard.yml +++ b/shard.yml @@ -1,5 +1,5 @@ name: mango -version: 0.15.1 +version: 0.16.0 authors: - Alex Ling diff --git a/src/library/entry.cr b/src/library/entry.cr index 796d983c..7a8cfaec 100644 --- a/src/library/entry.cr +++ b/src/library/entry.cr @@ -118,8 +118,8 @@ class Entry "width" => size.width, "height" => size.height, } - rescue - Logger.warn "Failed to read page #{i} of entry #{@id}" + rescue e + Logger.warn "Failed to read page #{i} of entry #{zip_path}. #{e}" sizes << {"width" => 1000_i32, "height" => 1000_i32} end end @@ -227,8 +227,7 @@ class Entry end Storage.default.save_thumbnail @id, img rescue e - Logger.warn "Failed to generate thumbnail for entry " \ - "#{@book.title}/#{@title}. #{e}" + Logger.warn "Failed to generate thumbnail for file #{@zip_path}. #{e}" end img diff --git a/src/mango.cr b/src/mango.cr index ae1edd4a..e2bd1193 100644 --- a/src/mango.cr +++ b/src/mango.cr @@ -7,7 +7,7 @@ require "option_parser" require "clim" require "./plugin/*" -MANGO_VERSION = "0.15.1" +MANGO_VERSION = "0.16.0" # From http://www.network-science.de/ascii/ BANNER = %{ diff --git a/src/storage.cr b/src/storage.cr index 592da0e3..33b751f4 100644 --- a/src/storage.cr +++ b/src/storage.cr @@ -293,7 +293,7 @@ class Storage Logger.info "#{trash_thumbnails_count} dangling thumbnails deleted" end end - Logger.debug "DB optimization finished" + Logger.info "DB optimization finished" end end diff --git a/src/views/reader.html.ecr b/src/views/reader.html.ecr index b1acde88..540fd0c8 100644 --- a/src/views/reader.html.ecr +++ b/src/views/reader.html.ecr @@ -17,6 +17,8 @@ flipAnimation: null }"> +
+