Skip to content
This repository was archived by the owner on Mar 23, 2025. It is now read-only.

Commit 2645e8c

Browse files
committed
Merge branch 'dev'
2 parents e602a35 + b2dc44a commit 2645e8c

File tree

7 files changed

+25
-8
lines changed

7 files changed

+25
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ The official docker images are available on [Dockerhub](https://hub.docker.com/r
5252
### CLI
5353

5454
```
55-
Mango - Manga Server and Web Reader. Version 0.15.1
55+
Mango - Manga Server and Web Reader. Version 0.16.0
5656
5757
Usage:
5858

public/js/reader.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,3 +292,19 @@ const flipPage = (isNext) => {
292292
replaceHistory(newIdx);
293293
saveProgress(newIdx);
294294
};
295+
296+
/**
297+
* Handle the global keydown events
298+
*
299+
* @function keyHandler
300+
* @param {event} event - The $event object
301+
*/
302+
const keyHandler = (event) => {
303+
const mode = getProp('mode');
304+
if (mode === 'continuous') return;
305+
306+
if (event.key === 'ArrowLeft' || event.key === 'k')
307+
flipPage(false);
308+
if (event.key === 'ArrowRight' || event.key === 'j')
309+
flipPage(true);
310+
};

shard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: mango
2-
version: 0.15.1
2+
version: 0.16.0
33

44
authors:
55
- Alex Ling <hkalexling@gmail.com>

src/library/entry.cr

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ class Entry
118118
"width" => size.width,
119119
"height" => size.height,
120120
}
121-
rescue
122-
Logger.warn "Failed to read page #{i} of entry #{@id}"
121+
rescue e
122+
Logger.warn "Failed to read page #{i} of entry #{zip_path}. #{e}"
123123
sizes << {"width" => 1000_i32, "height" => 1000_i32}
124124
end
125125
end
@@ -227,8 +227,7 @@ class Entry
227227
end
228228
Storage.default.save_thumbnail @id, img
229229
rescue e
230-
Logger.warn "Failed to generate thumbnail for entry " \
231-
"#{@book.title}/#{@title}. #{e}"
230+
Logger.warn "Failed to generate thumbnail for file #{@zip_path}. #{e}"
232231
end
233232

234233
img

src/mango.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ require "option_parser"
77
require "clim"
88
require "./plugin/*"
99

10-
MANGO_VERSION = "0.15.1"
10+
MANGO_VERSION = "0.16.0"
1111

1212
# From http://www.network-science.de/ascii/
1313
BANNER = %{

src/storage.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ class Storage
293293
Logger.info "#{trash_thumbnails_count} dangling thumbnails deleted"
294294
end
295295
end
296-
Logger.debug "DB optimization finished"
296+
Logger.info "DB optimization finished"
297297
end
298298
end
299299

src/views/reader.html.ecr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
flipAnimation: null
1818
}">
1919

20+
<div @keydown.window.debounce="keyHandler($event)"></div>
21+
2022
<div class="uk-container uk-container-small">
2123
<div id="alert"></div>
2224
<div x-show="loading">

0 commit comments

Comments
 (0)