mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 13:10:26 +08:00 
			
		
		
		
	commit components.js
This commit is contained in:
		
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@@ -8417,6 +8417,9 @@ Vue.component("http-firewall-actions-box", {
 | 
			
		||||
			pageBody: defaultPageBody,
 | 
			
		||||
			defaultPageBody: defaultPageBody,
 | 
			
		||||
 | 
			
		||||
			redirectStatus: 307,
 | 
			
		||||
			redirectURL: "",
 | 
			
		||||
 | 
			
		||||
			goGroupName: "",
 | 
			
		||||
			goGroupId: 0,
 | 
			
		||||
			goGroup: null,
 | 
			
		||||
@@ -8426,7 +8429,15 @@ Vue.component("http-firewall-actions-box", {
 | 
			
		||||
 | 
			
		||||
			jsCookieLife: "",
 | 
			
		||||
			jsCookieMaxFails: "",
 | 
			
		||||
			jsCookieFailBlockTimeout: ""
 | 
			
		||||
			jsCookieFailBlockTimeout: "",
 | 
			
		||||
 | 
			
		||||
			statusOptions: [
 | 
			
		||||
				{"code": 301, "text": "Moved Permanently"},
 | 
			
		||||
				{"code": 308, "text": "Permanent Redirect"},
 | 
			
		||||
				{"code": 302, "text": "Found"},
 | 
			
		||||
				{"code": 303, "text": "See Other"},
 | 
			
		||||
				{"code": 307, "text": "Temporary Redirect"}
 | 
			
		||||
			]
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
	watch: {
 | 
			
		||||
@@ -8593,6 +8604,9 @@ Vue.component("http-firewall-actions-box", {
 | 
			
		||||
			this.pageStatus = 403
 | 
			
		||||
			this.pageBody = this.defaultPageBody
 | 
			
		||||
 | 
			
		||||
			this.redirectStatus = 307
 | 
			
		||||
			this.redirectURL = ""
 | 
			
		||||
 | 
			
		||||
			this.goGroupName = ""
 | 
			
		||||
			this.goGroupId = 0
 | 
			
		||||
			this.goGroup = null
 | 
			
		||||
@@ -8719,7 +8733,16 @@ Vue.component("http-firewall-actions-box", {
 | 
			
		||||
					if (config.options.body != null) {
 | 
			
		||||
						this.pageBody = config.options.body
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
					break
 | 
			
		||||
				case "redirect":
 | 
			
		||||
					this.redirectStatus = 307
 | 
			
		||||
					this.redirectURL = ""
 | 
			
		||||
					if (config.options.status != null) {
 | 
			
		||||
						this.redirectStatus = config.options.status
 | 
			
		||||
					}
 | 
			
		||||
					if (config.options.url != null) {
 | 
			
		||||
						this.redirectURL = config.options.url
 | 
			
		||||
					}
 | 
			
		||||
					break
 | 
			
		||||
				case "go_group":
 | 
			
		||||
					if (config.options != null) {
 | 
			
		||||
@@ -8806,6 +8829,23 @@ Vue.component("http-firewall-actions-box", {
 | 
			
		||||
					status: pageStatus,
 | 
			
		||||
					body: this.pageBody
 | 
			
		||||
				}
 | 
			
		||||
			} else if (this.actionCode == "redirect") {
 | 
			
		||||
				let redirectStatus = this.redirectStatus.toString()
 | 
			
		||||
				if (!redirectStatus.match(/^\d{3}$/)) {
 | 
			
		||||
					redirectStatus = 307
 | 
			
		||||
				} else {
 | 
			
		||||
					redirectStatus = parseInt(redirectStatus)
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				if (this.redirectURL.length == 0) {
 | 
			
		||||
					teaweb.warn("请输入跳转到URL")
 | 
			
		||||
					return
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				this.actionOptions = {
 | 
			
		||||
					status: redirectStatus,
 | 
			
		||||
					url: this.redirectURL
 | 
			
		||||
				}
 | 
			
		||||
			} else if (this.actionCode == "go_group") { // go_group
 | 
			
		||||
				let groupId = this.goGroupId
 | 
			
		||||
				if (typeof (groupId) == "string") {
 | 
			
		||||
@@ -8946,6 +8986,9 @@ Vue.component("http-firewall-actions-box", {
 | 
			
		||||
			<!-- page -->
 | 
			
		||||
			<span v-if="config.code == 'page'">:[{{config.options.status}}]</span>
 | 
			
		||||
			
 | 
			
		||||
			<!-- redirect -->
 | 
			
		||||
			<span v-if="config.code == 'redirect'">:{{config.options.url}}</span>
 | 
			
		||||
			
 | 
			
		||||
			<!-- go_group -->
 | 
			
		||||
			<span v-if="config.code == 'go_group'">:{{config.options.groupName}}</span>
 | 
			
		||||
			
 | 
			
		||||
@@ -9153,6 +9196,22 @@ Vue.component("http-firewall-actions-box", {
 | 
			
		||||
				</td>
 | 
			
		||||
			</tr>
 | 
			
		||||
			
 | 
			
		||||
			<!-- redirect -->
 | 
			
		||||
			<tr v-if="actionCode == 'redirect'">
 | 
			
		||||
				<td>状态码 *</td>
 | 
			
		||||
				<td>
 | 
			
		||||
					<select class="ui dropdown auto-width" v-model="redirectStatus">
 | 
			
		||||
						<option v-for="status in statusOptions" :value="status.code">{{status.code}} {{status.text}}</option>
 | 
			
		||||
					</select>
 | 
			
		||||
				</td>
 | 
			
		||||
			</tr>
 | 
			
		||||
			<tr v-if="actionCode == 'redirect'">
 | 
			
		||||
				<td>跳转到URL</td>
 | 
			
		||||
				<td>
 | 
			
		||||
					<input type="text" v-model="redirectURL"/>
 | 
			
		||||
				</td>
 | 
			
		||||
			</tr>
 | 
			
		||||
			
 | 
			
		||||
			<!-- 规则分组 -->
 | 
			
		||||
			<tr v-if="actionCode == 'go_group'">
 | 
			
		||||
				<td>下一个分组 *</td>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user