♻️ 书源 id 去掉 ext. 前缀,沿用旧内置源数据

Co-authored-by: Copilot <[email protected]>
This commit is contained in:
GarfieldandCopilot committed 2026-11-16 14:07:45 +08:00
1 parent b41273ef9b
commit 43d4fcfabc
11 files changed
+32 -32

No files matched your search

@@ -12,9 +12,9 @@ local Setting = {}
local COOKIE_PATHS = { ["/"] = true, ["/v2"] = true, ["/v2/"] = true, ["/v2/pweb"] = true, ["/v2/pweb/"] = true }
function Setting.rowStatus()
local cfg = require("utils.settings").getSource("ext.kuaikan")
local cfg = require("utils.settings").getSource("kuaikan")
local on = cfg.logged_in == true and type(cfg.cookie) == "string" and cfg.cookie ~= ""
and type(cfg.user_id) == "string" and cfg.user_id ~= "" and not require("source.auth").expired("ext.kuaikan")
and type(cfg.user_id) == "string" and cfg.user_id ~= "" and not require("source.auth").expired("kuaikan")
return on and _("已登录") or _("未登录 · 点此登录"), on
end
@@ -109,23 +109,23 @@ function Setting.rows(plugin)
end,
function(iw)
local reviews = require("source.review_setting")
local on = reviews.enabled("ext.kuaikan")
local on = reviews.enabled("kuaikan")
return Row.widget({ width = iw, chevron = false, kind = "toggle", icon = "forum",
title = _("章节评论"), subtitle = _("在章末显示本章讨论,不是段落评论"),
status = on and _("开") or _("关"), status_on = on,
callback = function()
reviews.set("ext.kuaikan", not on)
reviews.set("kuaikan", not on)
if plugin and plugin.desktop then plugin.desktop:updateView() end
end })
end,
}
local cfg = require("utils.settings").getSource("ext.kuaikan")
local cfg = require("utils.settings").getSource("kuaikan")
if type(cfg.cookie) == "string" and cfg.cookie ~= "" then
rows[#rows + 1] = require("source.logout").row("ext.kuaikan", _("确定退出快看账号?"), function()
cfg = require("utils.settings").getSource("ext.kuaikan")
rows[#rows + 1] = require("source.logout").row("kuaikan", _("确定退出快看账号?"), function()
cfg = require("utils.settings").getSource("kuaikan")
cfg.cookie, cfg.user_id, cfg.logged_in = nil, nil, nil
Client.login_revision = Client.login_revision + 1
require("utils.settings").saveSource("ext.kuaikan")
require("utils.settings").saveSource("kuaikan")
end)
end
return rows