diff --git a/web/public/js/components/server/http-cache-config-box.js b/web/public/js/components/server/http-cache-config-box.js index a7ca1289..19d05519 100644 --- a/web/public/js/components/server/http-cache-config-box.js +++ b/web/public/js/components/server/http-cache-config-box.js @@ -17,69 +17,6 @@ Vue.component("http-cache-config-box", { methods: { isOn: function () { return (!this.vIsLocation || this.cacheConfig.isPrior) && this.cacheConfig.isOn - }, - addRef: function () { - window.UPDATING_CACHE_REF = null - - let width = window.innerWidth - if (width > 1024) { - width = 1024 - } - let height = window.innerHeight - if (height > 500) { - height = 500 - } - let that = this - teaweb.popup("/servers/server/settings/cache/createPopup", { - width: width + "px", - height: height + "px", - callback: function (resp) { - that.cacheConfig.cacheRefs.push(resp.data.cacheRef) - } - }) - }, - updateRef: function (index, cacheRef) { - window.UPDATING_CACHE_REF = cacheRef - - let width = window.innerWidth - if (width > 1024) { - width = 1024 - } - let height = window.innerHeight - if (height > 500) { - height = 500 - } - let that = this - teaweb.popup("/servers/server/settings/cache/createPopup", { - width: width + "px", - height: height + "px", - callback: function (resp) { - Vue.set(that.cacheConfig.cacheRefs, index, resp.data.cacheRef) - } - }) - }, - removeRef: function (index) { - let that = this - teaweb.confirm("确定要删除此缓存设置吗?", function () { - that.cacheConfig.cacheRefs.$remove(index) - }) - }, - timeUnitName: function (unit) { - switch (unit) { - case "ms": - return "毫秒" - case "second": - return "秒" - case "minute": - return "分钟" - case "hour": - return "小时" - case "day": - return "天" - case "week": - return "周 " - } - return unit } }, template: `
暂时还没有缓存条件。