Merge branch 'dev'

This commit is contained in:
Alex Ling 2020-11-24 05:31:06 +00:00
commit 2645e8cd05
7 changed files with 25 additions and 8 deletions

View File

@ -52,7 +52,7 @@ The official docker images are available on [Dockerhub](https://hub.docker.com/r
### CLI ### CLI
``` ```
Mango - Manga Server and Web Reader. Version 0.15.1 Mango - Manga Server and Web Reader. Version 0.16.0
Usage: Usage:

View File

@ -292,3 +292,19 @@ const flipPage = (isNext) => {
replaceHistory(newIdx); replaceHistory(newIdx);
saveProgress(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);
};

View File

@ -1,5 +1,5 @@
name: mango name: mango
version: 0.15.1 version: 0.16.0
authors: authors:
- Alex Ling <hkalexling@gmail.com> - Alex Ling <hkalexling@gmail.com>

View File

@ -118,8 +118,8 @@ class Entry
"width" => size.width, "width" => size.width,
"height" => size.height, "height" => size.height,
} }
rescue rescue e
Logger.warn "Failed to read page #{i} of entry #{@id}" Logger.warn "Failed to read page #{i} of entry #{zip_path}. #{e}"
sizes << {"width" => 1000_i32, "height" => 1000_i32} sizes << {"width" => 1000_i32, "height" => 1000_i32}
end end
end end
@ -227,8 +227,7 @@ class Entry
end end
Storage.default.save_thumbnail @id, img Storage.default.save_thumbnail @id, img
rescue e rescue e
Logger.warn "Failed to generate thumbnail for entry " \ Logger.warn "Failed to generate thumbnail for file #{@zip_path}. #{e}"
"#{@book.title}/#{@title}. #{e}"
end end
img img

View File

@ -7,7 +7,7 @@ require "option_parser"
require "clim" require "clim"
require "./plugin/*" require "./plugin/*"
MANGO_VERSION = "0.15.1" MANGO_VERSION = "0.16.0"
# From http://www.network-science.de/ascii/ # From http://www.network-science.de/ascii/
BANNER = %{ BANNER = %{

View File

@ -293,7 +293,7 @@ class Storage
Logger.info "#{trash_thumbnails_count} dangling thumbnails deleted" Logger.info "#{trash_thumbnails_count} dangling thumbnails deleted"
end end
end end
Logger.debug "DB optimization finished" Logger.info "DB optimization finished"
end end
end end

View File

@ -17,6 +17,8 @@
flipAnimation: null flipAnimation: null
}"> }">
<div @keydown.window.debounce="keyHandler($event)"></div>
<div class="uk-container uk-container-small"> <div class="uk-container uk-container-small">
<div id="alert"></div> <div id="alert"></div>
<div x-show="loading"> <div x-show="loading">