mirror of
https://github.com/gedoor/legado.git
synced 2024-09-01 09:34:25 +08:00
优化
This commit is contained in:
parent
84ce343895
commit
3fd3781f05
@ -377,7 +377,7 @@ $('.menu').addEventListener('click', e => {
|
||||
case 'accept':
|
||||
(async () => {
|
||||
let saveRule = [rule2json()];
|
||||
await HttpPost(`/saveBookSources`, saveRule).then(json => {
|
||||
await HttpPost(`/saveBookSource`, saveRule[0]).then(json => {
|
||||
alert(json.isSuccess ? `源《${saveRule[0].bookSourceName}》已成功保存到「阅读3.0APP」` : `源《${saveRule[0].bookSourceName}》保存失败!\nErrorMsg: ${json.errorMsg}`);
|
||||
setRule(saveRule[0]);
|
||||
}).catch(err => { alert(`保存源失败,无法连接到「阅读3.0APP」!\n${err}`); });
|
||||
|
@ -236,7 +236,7 @@ $('.menu').addEventListener('click', e => {
|
||||
let DebugInfos = $('#DebugConsole');
|
||||
function DebugPrint(msg) { DebugInfos.value += `\n${msg}`; DebugInfos.scrollTop = DebugInfos.scrollHeight; }
|
||||
let saveRule = [rule2json()];
|
||||
HttpPost(`/saveRssSources`, saveRule).then(sResult => {
|
||||
HttpPost(`/saveRssSource`, saveRule[0]).then(sResult => {
|
||||
if (sResult.isSuccess) {
|
||||
$('#DebugConsole').value = `源《${saveRule[0].sourceName}》保存成功!开始调试...`;
|
||||
let ws = new WebSocket(`${wsOrigin}/rssSourceDebug`);
|
||||
|
Loading…
Reference in New Issue
Block a user