Compare commits

...

4 Commits

Author SHA1 Message Date
Alex Ling e602a35b0c Merge branch 'dev' 2020-11-02 16:32:08 +00:00
Alex Ling 7792d3426e Bump version to v0.15.1 2020-11-01 09:22:05 +00:00
Alex Ling b59c8f85ad Fix scroller issues in continuous reader (#121) 2020-10-31 04:29:46 +00:00
Alex Ling 18834ac28e Set thumbnail size and mimetype 2020-10-29 04:06:44 +00:00
5 changed files with 14 additions and 9 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.15.0 Mango - Manga Server and Web Reader. Version 0.15.1
Usage: Usage:
+6 -6
View File
@@ -5,12 +5,6 @@ let longPages = false;
$(() => { $(() => {
getPages(); getPages();
const storedMode = localStorage.getItem('mode') || 'continuous';
setProp('mode', storedMode);
updateMode(storedMode, page);
$('#mode-select').val(storedMode);
$('#page-select').change(() => { $('#page-select').change(() => {
const p = parseInt($('#page-select').val()); const p = parseInt($('#page-select').val());
toPage(p); toPage(p);
@@ -117,6 +111,12 @@ const getPages = () => {
setProp('items', items); setProp('items', items);
setProp('loading', false); setProp('loading', false);
const storedMode = localStorage.getItem('mode') || 'continuous';
setProp('mode', storedMode);
updateMode(storedMode, page);
$('#mode-select').val(storedMode);
}) })
.catch(e => { .catch(e => {
const errMsg = `Failed to get the page dimensions. ${e}`; const errMsg = `Failed to get the page dimensions. ${e}`;
+1 -1
View File
@@ -1,5 +1,5 @@
name: mango name: mango
version: 0.15.0 version: 0.15.1
authors: authors:
- Alex Ling <hkalexling@gmail.com> - Alex Ling <hkalexling@gmail.com>
+5
View File
@@ -220,6 +220,11 @@ class Entry
thumbnail = ImageSize.resize img.data, height: 300 thumbnail = ImageSize.resize img.data, height: 300
end end
img.data = thumbnail img.data = thumbnail
img.size = thumbnail.size
unless img.mime == "image/webp"
# image_size.cr resizes non-webp images to jpg
img.mime = "image/jpeg"
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 entry " \
+1 -1
View File
@@ -7,7 +7,7 @@ require "option_parser"
require "clim" require "clim"
require "./plugin/*" require "./plugin/*"
MANGO_VERSION = "0.15.0" MANGO_VERSION = "0.15.1"
# From http://www.network-science.de/ascii/ # From http://www.network-science.de/ascii/
BANNER = %{ BANNER = %{