✨ (manage): 书源存数据库,远程管理网页支持导入、分页、有效性检查与启停
This commit is contained in:
1 parent
3a7cb92270
commit
f0d737e68a
9 files changed
+1519
No files matched your search
@@ -0,0 +1,29 @@
|
||||
--[[--
|
||||
把书源管理网页(/legado_sources.html)挂进月读远程管理(web.routes)。由 moon_source.lua 加载时 require 一次;
|
||||
接口实现在 remote.lua,用到时才加载。
|
||||
|
||||
@module moonsource_legadorule.extras
|
||||
--]]
|
||||
|
||||
local Ext = require("utils.extension")
|
||||
|
||||
local PREFIX = "moonsource_legadorule."
|
||||
local here = debug.getinfo(1, "S").source:match("^@(.+)/[^/]+$") or "."
|
||||
|
||||
Ext.add("web.routes", {
|
||||
name = "legado_sources",
|
||||
dir = here .. "/web",
|
||||
assets = { "legado_sources.html", "legado_sources.js", "legado_sources.css" },
|
||||
page = {
|
||||
href = "/legado_sources.html", title = "Legado 书源", title_long = "Legado 书源管理", tile = "tile-green",
|
||||
desc = "导入、检查有效性、启停与删除 Legado 书源(单个、数组或合集,本地或在线)。",
|
||||
icon = "M4 6h16v2H4V6zm0 5h16v2H4v-2zm0 5h10v2H4v-2z",
|
||||
},
|
||||
l10n = PREFIX .. "l10n.web",
|
||||
upload = { import = 64 * 1024 * 1024 },
|
||||
handle = function(method, action, params, cb)
|
||||
require(PREFIX .. "remote").handle(method, action, params, cb)
|
||||
end,
|
||||
})
|
||||
|
||||
return {}
|
||||
Reference in new issue
Block a user