mirror of
https://github.com/hkalexling/Mango.git
synced 2026-04-24 00:03:12 -04:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f7b8e2d852 | |||
| 946017c8bd | |||
| ec5256dabd | |||
| 4e707076a1 | |||
| 66a3cc268b | |||
| 96949905b9 |
@@ -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.17.0
|
Mango - Manga Server and Web Reader. Version 0.17.1
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
|
|
||||||
|
|||||||
@@ -22,28 +22,6 @@ const capitalize = (str) => {
|
|||||||
return str.charAt(0).toUpperCase() + str.slice(1);
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* Set an alpine.js property
|
|
||||||
*
|
|
||||||
* @function setProp
|
|
||||||
* @param {string} key - Key of the data property
|
|
||||||
* @param {*} prop - The data property
|
|
||||||
*/
|
|
||||||
const setProp = (key, prop) => {
|
|
||||||
$('#root').get(0).__x.$data[key] = prop;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get an alpine.js property
|
|
||||||
*
|
|
||||||
* @function getProp
|
|
||||||
* @param {string} key - Key of the data property
|
|
||||||
* @return {*} The data property
|
|
||||||
*/
|
|
||||||
const getProp = (key) => {
|
|
||||||
return $('#root').get(0).__x.$data[key];
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the thumbnail generation progress from the API
|
* Get the thumbnail generation progress from the API
|
||||||
*
|
*
|
||||||
|
|||||||
+2
-2
@@ -63,7 +63,7 @@ const validThemeSetting = (theme) => {
|
|||||||
*/
|
*/
|
||||||
const loadThemeSetting = () => {
|
const loadThemeSetting = () => {
|
||||||
let str = localStorage.getItem('theme');
|
let str = localStorage.getItem('theme');
|
||||||
if (!str || !validThemeSetting(str)) str = 'light';
|
if (!str || !validThemeSetting(str)) str = 'system';
|
||||||
return str;
|
return str;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ const loadTheme = () => {
|
|||||||
* @param {string} setting - A theme setting
|
* @param {string} setting - A theme setting
|
||||||
*/
|
*/
|
||||||
const saveThemeSetting = setting => {
|
const saveThemeSetting = setting => {
|
||||||
if (!validThemeSetting(setting)) setting = 'light';
|
if (!validThemeSetting(setting)) setting = 'system';
|
||||||
localStorage.setItem('theme', setting);
|
localStorage.setItem('theme', setting);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: mango
|
name: mango
|
||||||
version: 0.17.0
|
version: 0.17.1
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
- Alex Ling <hkalexling@gmail.com>
|
- Alex Ling <hkalexling@gmail.com>
|
||||||
|
|||||||
+11
-6
@@ -3,7 +3,8 @@ require "../archive"
|
|||||||
class Title
|
class Title
|
||||||
property dir : String, parent_id : String, title_ids : Array(String),
|
property dir : String, parent_id : String, title_ids : Array(String),
|
||||||
entries : Array(Entry), title : String, id : String,
|
entries : Array(Entry), title : String, id : String,
|
||||||
encoded_title : String, mtime : Time
|
encoded_title : String, mtime : Time,
|
||||||
|
entry_display_name_cache : Hash(String, String)?
|
||||||
|
|
||||||
def initialize(@dir : String, @parent_id, storage,
|
def initialize(@dir : String, @parent_id, storage,
|
||||||
@library : Library)
|
@library : Library)
|
||||||
@@ -129,13 +130,17 @@ class Title
|
|||||||
end
|
end
|
||||||
|
|
||||||
def display_name(entry_name)
|
def display_name(entry_name)
|
||||||
dn = entry_name
|
unless @entry_display_name_cache
|
||||||
TitleInfo.new @dir do |info|
|
TitleInfo.new @dir do |info|
|
||||||
info_dn = info.entry_display_name[entry_name]?
|
@entry_display_name_cache = info.entry_display_name
|
||||||
unless info_dn.nil? || info_dn.empty?
|
|
||||||
dn = info_dn
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
dn = entry_name
|
||||||
|
info_dn = @entry_display_name_cache.not_nil![entry_name]?
|
||||||
|
unless info_dn.nil? || info_dn.empty?
|
||||||
|
dn = info_dn
|
||||||
|
end
|
||||||
dn
|
dn
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ require "option_parser"
|
|||||||
require "clim"
|
require "clim"
|
||||||
require "./plugin/*"
|
require "./plugin/*"
|
||||||
|
|
||||||
MANGO_VERSION = "0.17.0"
|
MANGO_VERSION = "0.17.1"
|
||||||
|
|
||||||
# From http://www.network-science.de/ascii/
|
# From http://www.network-science.de/ascii/
|
||||||
BANNER = %{
|
BANNER = %{
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
onclick="location='<%= base_url %>book/<%= item.id %>'"
|
onclick="location='<%= base_url %>book/<%= item.id %>'"
|
||||||
<% end %>>
|
<% end %>>
|
||||||
|
|
||||||
<div class="uk-card uk-card-default" x-data="{selected: false, hover: false, disabled: true}" :class="{selected: selected}"
|
<div class="uk-card uk-card-default" x-data="{selected: false, hover: false, disabled: true, selecting: false}" :class="{selected: selected}" @count.window="selecting = $event.detail.count > 0"
|
||||||
<% if page == "title" && item.is_a?(Entry) && item.err_msg.nil? %>
|
<% if page == "title" && item.is_a?(Entry) && item.err_msg.nil? %>
|
||||||
x-init="disabled = false"
|
x-init="disabled = false"
|
||||||
<% end %>>
|
<% end %>>
|
||||||
@@ -45,6 +45,7 @@
|
|||||||
class="grayscale"
|
class="grayscale"
|
||||||
<% end %>>
|
<% end %>>
|
||||||
<div class="uk-overlay-primary uk-position-cover" x-show="!disabled && (selected || hover)">
|
<div class="uk-overlay-primary uk-position-cover" x-show="!disabled && (selected || hover)">
|
||||||
|
<div class="uk-height-1-1 uk-width-1-1" x-show="selecting" @click.stop="selected = !selected; $dispatch(selected ? 'add' : 'remove')"></div>
|
||||||
<div class="uk-position-center">
|
<div class="uk-position-center">
|
||||||
<span class="fas fa-check-circle fa-3x" @click.stop="selected = !selected; $dispatch(selected ? 'add' : 'remove')" :style="`color:${selected && 'orange'};`"></span>
|
<span class="fas fa-check-circle fa-3x" @click.stop="selected = !selected; $dispatch(selected ? 'add' : 'remove')" :style="`color:${selected && 'orange'};`"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<div>
|
<div>
|
||||||
<div id="select-bar" class="uk-card uk-card-body uk-card-default uk-margin-bottom" uk-sticky="offset:10" x-data="{count: 0}" @add.window="count++" @remove.window="count--" x-show="count > 0" style="border:orange;border-style:solid;" x-cloak data-id="<%= title.id %>">
|
<div id="select-bar" class="uk-card uk-card-body uk-card-default uk-margin-bottom" uk-sticky="offset:10" x-data="{count: 0}" @add.window="count++; $dispatch('count', {count: count})" @remove.window="count--; $dispatch('count', {count: count})" x-show="count > 0" style="border:orange;border-style:solid;" x-cloak data-id="<%= title.id %>">
|
||||||
<div class="uk-child-width-1-3" uk-grid>
|
<div class="uk-child-width-1-3" uk-grid>
|
||||||
<div>
|
<div>
|
||||||
<p x-text="count + ' items selected'" style="color:orange"></p>
|
<p x-text="count + ' items selected'" style="color:orange"></p>
|
||||||
|
|||||||
Reference in New Issue
Block a user