mirror of
https://github.com/hkalexling/Mango.git
synced 2026-04-25 00:00:52 -04:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 44336c546a | |||
| a4c6e6611c |
@@ -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.2
|
Mango - Manga Server and Web Reader. Version 0.18.3
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
|
|
||||||
|
|||||||
@@ -4,21 +4,30 @@ const component = () => {
|
|||||||
paused: undefined,
|
paused: undefined,
|
||||||
loading: false,
|
loading: false,
|
||||||
toggling: false,
|
toggling: false,
|
||||||
|
ws: undefined,
|
||||||
|
|
||||||
init() {
|
wsConnect(secure = true) {
|
||||||
const ws = new WebSocket(`ws://${location.host}${base_url}api/admin/mangadex/queue`);
|
const url = `${secure ? 'wss' : 'ws'}://${location.host}${base_url}api/admin/mangadex/queue`;
|
||||||
ws.onmessage = event => {
|
console.log(`Connecting to ${url}`);
|
||||||
|
this.ws = new WebSocket(url);
|
||||||
|
this.ws.onmessage = event => {
|
||||||
const data = JSON.parse(event.data);
|
const data = JSON.parse(event.data);
|
||||||
this.jobs = data.jobs;
|
this.jobs = data.jobs;
|
||||||
this.paused = data.paused;
|
this.paused = data.paused;
|
||||||
};
|
};
|
||||||
ws.onerror = err => {
|
this.ws.onclose = () => {
|
||||||
alert('danger', `Socket connection failed. Error: ${err}`);
|
if (this.ws.failed)
|
||||||
|
return this.wsConnect(false);
|
||||||
|
alert('danger', 'Socket connection closed');
|
||||||
};
|
};
|
||||||
ws.onclose = err => {
|
this.ws.onerror = () => {
|
||||||
|
if (secure)
|
||||||
|
return this.ws.failed = true;
|
||||||
alert('danger', 'Socket connection failed');
|
alert('danger', 'Socket connection failed');
|
||||||
};
|
};
|
||||||
|
},
|
||||||
|
init() {
|
||||||
|
this.wsConnect();
|
||||||
this.load();
|
this.load();
|
||||||
},
|
},
|
||||||
load() {
|
load() {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: mango
|
name: mango
|
||||||
version: 0.18.2
|
version: 0.18.3
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
- Alex Ling <hkalexling@gmail.com>
|
- Alex Ling <hkalexling@gmail.com>
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@ require "option_parser"
|
|||||||
require "clim"
|
require "clim"
|
||||||
require "tallboy"
|
require "tallboy"
|
||||||
|
|
||||||
MANGO_VERSION = "0.18.2"
|
MANGO_VERSION = "0.18.3"
|
||||||
|
|
||||||
# From http://www.network-science.de/ascii/
|
# From http://www.network-science.de/ascii/
|
||||||
BANNER = %{
|
BANNER = %{
|
||||||
|
|||||||
Reference in New Issue
Block a user