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

View File

@@ -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.18.0
Mango - Manga Server and Web Reader. Version 0.18.1
Usage:

View File

@@ -101,8 +101,9 @@ const readerComponent = () => {
*/
flipPage(isNext) {
const idx = parseInt(this.curItem.id);
const delta = isNext ? 1 : -1;
const newIdx = idx + delta;
const newIdx = idx + (isNext ? 1 : -1);
if (newIdx <= 0 || newIdx > this.items.length) return;
this.toPage(newIdx);
@@ -240,7 +241,7 @@ const readerComponent = () => {
*/
setupScroller() {
if (this.mode !== 'continuous') return;
$('#root img').each((idx, el) => {
$('img').each((idx, el) => {
$(el).on('inview', (event, inView) => {
if (inView) {
const current = $(event.currentTarget).attr('id');

View File

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

View File

@@ -8,7 +8,7 @@ require "option_parser"
require "clim"
require "tallboy"
MANGO_VERSION = "0.18.0"
MANGO_VERSION = "0.18.1"
# From http://www.network-science.de/ascii/
BANNER = %{

View File

@@ -111,7 +111,7 @@
<style>
img[data-src][src*='data:image'] { background: white; }
#root img { width: 100%; }
img { width: 100%; }
</style>
</html>