Skip to content

Commit

Permalink
feat(web): add redirect logic after site addition
Browse files Browse the repository at this point in the history
- Add action to the 'Okay' button in the site addition dialog
- If there are failed URLs, show the 'Executing' button
- If no failed URLs, redirect to the site list page
  • Loading branch information
ch3nnn committed Feb 1, 2025
1 parent 3eace90 commit 3544e06
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions web/templates/site/site_add.html
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,14 @@
buttons: {
okay: {
text: '关闭',
action: function () {
if (data.failCount > 0) { // 如果有失败的 URL,则显示执行中按钮
$("#btnLoading").hide();
$("#btnOk").show();
} else { // 如果没有失败的 URL,则直接跳转到网站列表页
location.href = "/admin/site";
}
}
}
}
});
Expand Down

0 comments on commit 3544e06

Please sign in to comment.