Compare commits

...

3 Commits

Author SHA1 Message Date
Alex Ling 4645582f5d Bump version to v0.18.1 2021-01-11 05:29:28 +00:00
Alex Ling ac9c51dd33 Remove non-existing #root from css selectors (#142) 2021-01-11 05:28:44 +00:00
Alex Ling f51d27860a Validate input index before flipping page 2021-01-09 15:49:34 +00:00
5 changed files with 8 additions and 7 deletions
+1 -1
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.18.0 Mango - Manga Server and Web Reader. Version 0.18.1
Usage: Usage:
+4 -3
View File
@@ -101,8 +101,9 @@ const readerComponent = () => {
*/ */
flipPage(isNext) { flipPage(isNext) {
const idx = parseInt(this.curItem.id); const idx = parseInt(this.curItem.id);
const delta = isNext ? 1 : -1; const newIdx = idx + (isNext ? 1 : -1);
const newIdx = idx + delta;
if (newIdx <= 0 || newIdx > this.items.length) return;
this.toPage(newIdx); this.toPage(newIdx);
@@ -240,7 +241,7 @@ const readerComponent = () => {
*/ */
setupScroller() { setupScroller() {
if (this.mode !== 'continuous') return; if (this.mode !== 'continuous') return;
$('#root img').each((idx, el) => { $('img').each((idx, el) => {
$(el).on('inview', (event, inView) => { $(el).on('inview', (event, inView) => {
if (inView) { if (inView) {
const current = $(event.currentTarget).attr('id'); const current = $(event.currentTarget).attr('id');
+1 -1
View File
@@ -1,5 +1,5 @@
name: mango name: mango
version: 0.18.0 version: 0.18.1
authors: authors:
- Alex Ling <hkalexling@gmail.com> - Alex Ling <hkalexling@gmail.com>
+1 -1
View File
@@ -8,7 +8,7 @@ require "option_parser"
require "clim" require "clim"
require "tallboy" require "tallboy"
MANGO_VERSION = "0.18.0" MANGO_VERSION = "0.18.1"
# From http://www.network-science.de/ascii/ # From http://www.network-science.de/ascii/
BANNER = %{ BANNER = %{
+1 -1
View File
@@ -111,7 +111,7 @@
<style> <style>
img[data-src][src*='data:image'] { background: white; } img[data-src][src*='data:image'] { background: white; }
#root img { width: 100%; } img { width: 100%; }
</style> </style>
</html> </html>