Skip to content

Commit 3544e06

Browse files
committed
feat(web): add redirect logic after site addition
- 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
1 parent 3eace90 commit 3544e06

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

web/templates/site/site_add.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,14 @@
176176
buttons: {
177177
okay: {
178178
text: '关闭',
179+
action: function () {
180+
if (data.failCount > 0) { // 如果有失败的 URL,则显示执行中按钮
181+
$("#btnLoading").hide();
182+
$("#btnOk").show();
183+
} else { // 如果没有失败的 URL,则直接跳转到网站列表页
184+
location.href = "/admin/site";
185+
}
186+
}
179187
}
180188
}
181189
});

0 commit comments

Comments
 (0)