Merge pull request #136 from h45h74x/feature/adjustable-page-gaps

Feature/adjustable page gaps
This commit is contained in:
Alex Ling 2021-01-07 01:11:34 +08:00 committed by GitHub
commit 445ebdf357
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 1 deletions

View File

@ -87,6 +87,7 @@ log_level: info
upload_path: ~/mango/uploads
plugin_path: ~/mango/plugins
download_timeout_seconds: 30
page_margin: 30
mangadex:
base_url: https://mangadex.org
api_url: https://mangadex.org/api

View File

@ -25,7 +25,8 @@ const readerComponent = () => {
id: i + 1,
url: `${base_url}api/page/${tid}/${eid}/${i+1}`,
width: d.width,
height: d.height
height: d.height,
style: `margin-top: ${data.margin}px; margin-bottom: ${data.margin}px;`
};
});

View File

@ -20,6 +20,7 @@ class Config
property plugin_path : String = File.expand_path "~/mango/plugins",
home: true
property download_timeout_seconds : Int32 = 30
property page_margin : Int32 = 30
property disable_login = false
property default_username = ""
property mangadex = Hash(String, String | Int32).new

View File

@ -664,6 +664,7 @@ struct APIRouter
send_json env, {
"success" => true,
"dimensions" => sizes,
"margin" => Config.current.page_margin,
}.to_json
rescue e
send_json env, {

View File

@ -25,6 +25,7 @@
<img
uk-img
class="uk-align-center"
:style="item.style"
:data-src="item.url"
:width="item.width"
:height="item.height"