diff --git a/web/public/js/components/server/http-pages-and-shutdown-box.js b/web/public/js/components/server/http-pages-and-shutdown-box.js index 1104189a..858e63cb 100644 --- a/web/public/js/components/server/http-pages-and-shutdown-box.js +++ b/web/public/js/components/server/http-pages-and-shutdown-box.js @@ -48,29 +48,32 @@ Vue.component("http-pages-and-shutdown-box", { addPage: function () { let that = this teaweb.popup("/servers/server/settings/pages/createPopup", { - height: "26em", + height: "30em", callback: function (resp) { that.pages.push(resp.data.page) + that.notifyChange() } }) }, updatePage: function (pageIndex, pageId) { let that = this teaweb.popup("/servers/server/settings/pages/updatePopup?pageId=" + pageId, { - height: "26em", + height: "30em", callback: function (resp) { Vue.set(that.pages, pageIndex, resp.data.page) + that.notifyChange() } }) }, removePage: function (pageIndex) { let that = this - teaweb.confirm("确定要移除此页面吗?", function () { + teaweb.confirm("确定要删除此自定义页面吗?", function () { that.pages.$remove(pageIndex) + that.notifyChange() }) }, addShutdownHTMLTemplate: function () { - this.shutdownConfig.body = ` + this.shutdownConfig.body = `
\t| 自定义页面 | -
-
-
-
-
- 根据响应状态码返回一些自定义页面,比如404,500等错误页面。 - |
- ||||||||||
| 临时关闭页面 | -
-
-
-
开启临时关闭页面时,所有请求都会直接显示此页面。可用于临时升级网站或者禁止用户访问某个网页。 - |
-
根据响应状态码返回一些自定义页面,比如404,500等错误页面。
+ +| 响应状态码 | +页面类型 | +操作 | +
|---|---|---|
| + {{page.status[0]}} + {{page.status}} + | +{{page.url}}[HTML内容] | ++ 修改 + 删除 + | +
开启临时关闭页面时,所有请求都会直接显示此页面。可用于临时升级网站或者禁止用户访问某个网页。
+| 启用临时关闭网站 | +
+
+
+
+
+ 选中后,表示临时关闭当前网站,并显示自定义内容。 + |
+
| 显示内容类型 * | ++ + | +
| 显示页面URL * | +
+
+ 将从此URL中读取内容。 + |
+
| 显示页面HTML * | +
+
+ [使用模板]。填写页面的HTML内容,支持请求变量。 + |
+
| 状态码 | ++ |