mirror of
https://github.com/venera-app/venera-configs.git
synced 2025-09-27 08:27:24 +00:00
[copy_manga] Allow user to edit copyPlatform (#74)
* [copy_manga] Allow user to edit copyPlatform 拷贝连着三天改了三次这参数 * Update version
This commit is contained in:
@@ -4,7 +4,7 @@ class CopyManga extends ComicSource {
|
||||
|
||||
key = "copy_manga"
|
||||
|
||||
version = "1.1.7"
|
||||
version = "1.2.0"
|
||||
|
||||
minAppVersion = "1.2.1"
|
||||
|
||||
@@ -14,6 +14,8 @@ class CopyManga extends ComicSource {
|
||||
|
||||
static defaultCopyVersion = "2.2.9"
|
||||
|
||||
static defaultCopyPlatform = "2"
|
||||
|
||||
get copyVersion() {
|
||||
return this.loadSetting('version')
|
||||
}
|
||||
@@ -22,6 +24,10 @@ class CopyManga extends ComicSource {
|
||||
return `https://${this.loadSetting('base_url')}`
|
||||
}
|
||||
|
||||
get copyPlatform() {
|
||||
return this.loadSetting('platform')
|
||||
}
|
||||
|
||||
init() {
|
||||
let token = this.loadData("token");
|
||||
if (!token) {
|
||||
@@ -38,7 +44,7 @@ class CopyManga extends ComicSource {
|
||||
"region": "1",
|
||||
"version": this.copyVersion,
|
||||
"authorization": `Token${token}`,
|
||||
"platform": "1",
|
||||
"platform": this.copyPlatform,
|
||||
"umstring": "b4c89ca4104ea9a97750314d791520ac",
|
||||
}
|
||||
// 用于储存 { 作者名 : 英文参数 }
|
||||
@@ -73,7 +79,7 @@ class CopyManga extends ComicSource {
|
||||
"region": "1",
|
||||
"version": this.copyVersion,
|
||||
"authorization": `Token ${token}`,
|
||||
"platform": "1",
|
||||
"platform": this.copyPlatform,
|
||||
"umstring": "b4c89ca4104ea9a97750314d791520ac",
|
||||
}
|
||||
return "ok"
|
||||
@@ -812,6 +818,12 @@ class CopyManga extends ComicSource {
|
||||
validator: '^\\d+(?:\\.\\d+)*$',
|
||||
default: CopyManga.defaultCopyVersion,
|
||||
},
|
||||
platform: {
|
||||
title: "平台代号(重启APP生效)",
|
||||
type: "input",
|
||||
validator: '^\\d+(?:\\.\\d+)*$',
|
||||
default: CopyManga.defaultCopyPlatform,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -3,7 +3,7 @@
|
||||
"name": "拷贝漫画",
|
||||
"fileName": "copy_manga.js",
|
||||
"key": "copy_manga",
|
||||
"version": "1.1.7"
|
||||
"version": "1.2.0"
|
||||
},
|
||||
{
|
||||
"name": "Komiic",
|
||||
|
Reference in New Issue
Block a user