30 lines
1.1 KiB
Lua
30 lines
1.1 KiB
Lua
--[[--
|
|
把书源管理网页(/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 {}
|