| 
									
										
										
										
											2023-03-17 16:07:49 +00:00
										 |  |  | {{define "form/client"}} | 
					
						
							| 
									
										
										
										
											2023-12-13 15:57:36 +00:00
										 |  |  | <a-form layout="horizontal" v-if="client" :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }"> | 
					
						
							|  |  |  |     <a-form-item label='{{ i18n "pages.inbounds.enable" }}'> | 
					
						
							|  |  |  |         <a-switch v-model="client.enable"></a-switch> | 
					
						
							|  |  |  |     </a-form-item> | 
					
						
							|  |  |  |     <a-form-item> | 
					
						
							|  |  |  |         <template slot="label"> | 
					
						
							|  |  |  |             <a-tooltip> | 
					
						
							|  |  |  |                 <template slot="title"> | 
					
						
							|  |  |  |                     <span>{{ i18n "pages.inbounds.emailDesc" }}</span> | 
					
						
							|  |  |  |                 </template> | 
					
						
							|  |  |  |                 {{ i18n "pages.inbounds.email" }} | 
					
						
							|  |  |  |                 <a-icon type="sync" @click="client.email = RandomUtil.randomLowerAndNum(9)"></a-icon> | 
					
						
							|  |  |  |             </a-tooltip> | 
					
						
							|  |  |  |         </template> | 
					
						
							|  |  |  |         <a-input v-model.trim="client.email"></a-input> | 
					
						
							|  |  |  |     </a-form-item> | 
					
						
							| 
									
										
										
										
											2024-01-26 18:37:15 +00:00
										 |  |  |     <a-form-item v-if="inbound.protocol === Protocols.TROJAN || inbound.protocol === Protocols.SHADOWSOCKS"> | 
					
						
							| 
									
										
										
										
											2023-12-13 15:57:36 +00:00
										 |  |  |         <template slot="label"> | 
					
						
							|  |  |  |             <a-tooltip> | 
					
						
							|  |  |  |                 <template slot="title"> | 
					
						
							| 
									
										
										
										
											2024-01-10 12:44:37 +00:00
										 |  |  |                     <span>{{ i18n "reset" }}</span> | 
					
						
							| 
									
										
										
										
											2023-12-13 15:57:36 +00:00
										 |  |  |                 </template> | 
					
						
							|  |  |  |                 {{ i18n "password" }} | 
					
						
							|  |  |  |                 <a-icon v-if="inbound.protocol === Protocols.SHADOWSOCKS"@click="client.password = RandomUtil.randomShadowsocksPassword()" type="sync"></a-icon> | 
					
						
							|  |  |  |                 <a-icon v-if="inbound.protocol === Protocols.TROJAN" @click="client.password = RandomUtil.randomSeq(10)"type="sync"> </a-icon> | 
					
						
							|  |  |  |             </a-tooltip> | 
					
						
							|  |  |  |         </template> | 
					
						
							|  |  |  |         <a-input v-model.trim="client.password"></a-input> | 
					
						
							|  |  |  |     </a-form-item> | 
					
						
							| 
									
										
										
										
											2024-01-26 18:37:15 +00:00
										 |  |  |     <a-form-item v-if="inbound.protocol === Protocols.VMESS || inbound.protocol === Protocols.VLESS"> | 
					
						
							| 
									
										
										
										
											2023-12-13 15:57:36 +00:00
										 |  |  |         <template slot="label"> | 
					
						
							|  |  |  |             <a-tooltip> | 
					
						
							|  |  |  |                 <template slot="title"> | 
					
						
							| 
									
										
										
										
											2024-01-10 12:44:37 +00:00
										 |  |  |                     <span>{{ i18n "reset" }}</span> | 
					
						
							| 
									
										
										
										
											2023-12-13 15:57:36 +00:00
										 |  |  |                 </template> | 
					
						
							|  |  |  |                 ID <a-icon @click="client.id = RandomUtil.randomUUID()" type="sync"></a-icon> | 
					
						
							|  |  |  |             </a-tooltip> | 
					
						
							|  |  |  |         </template> | 
					
						
							|  |  |  |         <a-input v-model.trim="client.id"></a-input> | 
					
						
							| 
									
										
										
										
											2024-08-10 22:47:44 +00:00
										 |  |  |     </a-form-item> | 
					
						
							| 
									
										
										
										
											2024-09-16 11:51:36 +00:00
										 |  |  |     <a-form-item v-if="inbound.protocol === Protocols.VMESS" label='{{ i18n "security" }}'> | 
					
						
							| 
									
										
										
										
											2024-08-10 22:47:44 +00:00
										 |  |  |         <a-select v-model="client.security" :dropdown-class-name="themeSwitcher.currentTheme"> | 
					
						
							|  |  |  |             <a-select-option v-for="key in USERS_SECURITY" :value="key">[[ key ]]</a-select-option> | 
					
						
							|  |  |  |         </a-select> | 
					
						
							| 
									
										
										
										
											2023-12-13 15:57:36 +00:00
										 |  |  |     </a-form-item> | 
					
						
							|  |  |  |     <a-form-item v-if="client.email && app.subSettings.enable"> | 
					
						
							|  |  |  |         <template slot="label"> | 
					
						
							|  |  |  |             <a-tooltip> | 
					
						
							|  |  |  |                 <template slot="title"> | 
					
						
							|  |  |  |                     <span>{{ i18n "pages.inbounds.subscriptionDesc" }}</span> | 
					
						
							|  |  |  |                 </template> | 
					
						
							|  |  |  |                 Subscription | 
					
						
							|  |  |  |                 <a-icon @click="client.subId = RandomUtil.randomLowerAndNum(16)" type="sync"></a-icon> | 
					
						
							|  |  |  |             </a-tooltip> | 
					
						
							|  |  |  |         </template> | 
					
						
							|  |  |  |         <a-input v-model.trim="client.subId"></a-input> | 
					
						
							|  |  |  |     </a-form-item> | 
					
						
							|  |  |  |     <a-form-item v-if="client.email && app.tgBotEnable"> | 
					
						
							|  |  |  |         <template slot="label"> | 
					
						
							|  |  |  |             <a-tooltip> | 
					
						
							|  |  |  |                 <template slot="title"> | 
					
						
							|  |  |  |                     <span>{{ i18n "pages.inbounds.telegramDesc" }}</span> | 
					
						
							|  |  |  |                 </template> | 
					
						
							| 
									
										
										
										
											2024-08-18 21:52:29 +00:00
										 |  |  |                 Telegram ChatID | 
					
						
							| 
									
										
										
										
											2023-12-13 15:57:36 +00:00
										 |  |  |                 <a-icon type="question-circle"></a-icon> | 
					
						
							|  |  |  |             </a-tooltip> | 
					
						
							|  |  |  |         </template> | 
					
						
							| 
									
										
										
										
											2025-04-06 09:40:33 +00:00
										 |  |  |         <a-input-number :style="{ width: '50%' }" v-model.number="client.tgId" min="0"></a-input-number> | 
					
						
							| 
									
										
										
										
											2023-12-13 15:57:36 +00:00
										 |  |  |     </a-form-item> | 
					
						
							| 
									
										
										
										
											2025-01-01 18:13:55 +00:00
										 |  |  |     <a-form-item v-if="client.email" label='{{ i18n "comment" }}'> | 
					
						
							| 
									
										
										
										
											2024-12-27 12:19:49 +00:00
										 |  |  |         <a-input v-model.trim="client.comment"></a-input> | 
					
						
							|  |  |  |     </a-form-item> | 
					
						
							| 
									
										
										
										
											2024-03-12 20:53:32 +00:00
										 |  |  |     <a-form-item v-if="app.ipLimitEnable"> | 
					
						
							| 
									
										
										
										
											2023-12-13 15:57:36 +00:00
										 |  |  |         <template slot="label"> | 
					
						
							|  |  |  |             <a-tooltip> | 
					
						
							|  |  |  |                 <template slot="title"> | 
					
						
							|  |  |  |                     <span>{{ i18n "pages.inbounds.IPLimitDesc"}}</span> | 
					
						
							|  |  |  |                 </template> | 
					
						
							|  |  |  |                     <span>{{ i18n "pages.inbounds.IPLimit"}} </span> | 
					
						
							| 
									
										
										
										
											2023-12-13 16:25:20 +00:00
										 |  |  |                 <a-icon type="question-circle"></a-icon> | 
					
						
							| 
									
										
										
										
											2023-12-13 15:57:36 +00:00
										 |  |  |             </a-tooltip> | 
					
						
							|  |  |  |         </template> | 
					
						
							| 
									
										
										
										
											2025-01-05 19:41:56 +00:00
										 |  |  |         <a-input-number v-model.number="client.limitIp" min="0"></a-input-number> | 
					
						
							| 
									
										
										
										
											2023-12-13 15:57:36 +00:00
										 |  |  |     </a-form-item> | 
					
						
							| 
									
										
										
										
											2024-06-17 19:56:46 +00:00
										 |  |  |     <a-form-item v-if="app.ipLimitEnable && client.limitIp > 0 && client.email && isEdit"> | 
					
						
							| 
									
										
										
										
											2023-12-13 15:57:36 +00:00
										 |  |  |         <template slot="label"> | 
					
						
							|  |  |  |             <a-tooltip> | 
					
						
							|  |  |  |                 <template slot="title"> | 
					
						
							|  |  |  |                     <span>{{ i18n "pages.inbounds.IPLimitlogDesc" }}</span> | 
					
						
							|  |  |  |                 </template> | 
					
						
							| 
									
										
										
										
											2024-03-12 22:01:37 +00:00
										 |  |  |                     <span>{{ i18n "pages.inbounds.IPLimitlog" }} </span> | 
					
						
							| 
									
										
										
										
											2023-12-13 16:25:20 +00:00
										 |  |  |                 <a-icon type="question-circle"></a-icon> | 
					
						
							| 
									
										
										
										
											2023-12-13 15:57:36 +00:00
										 |  |  |             </a-tooltip> | 
					
						
							|  |  |  |         </template> | 
					
						
							|  |  |  |         <a-tooltip> | 
					
						
							|  |  |  |             <template slot="title"> | 
					
						
							|  |  |  |                 <span>{{ i18n "pages.inbounds.IPLimitlogclear" }}</span> | 
					
						
							|  |  |  |             </template> | 
					
						
							| 
									
										
										
										
											2025-04-06 09:40:33 +00:00
										 |  |  |             <span :style="{ color: '#FF4D4F' }"> | 
					
						
							| 
									
										
										
										
											2023-12-13 15:57:36 +00:00
										 |  |  |                 <a-icon type="delete" @click="clearDBClientIps(client.email)"></a-icon> | 
					
						
							|  |  |  |             </span> | 
					
						
							|  |  |  |         </a-tooltip> | 
					
						
							|  |  |  |         <a-form layout="block"> | 
					
						
							|  |  |  |             <a-textarea id="clientIPs" readonly @click="getDBClientIps(client.email)" placeholder="Click To Get IPs" | 
					
						
							|  |  |  |                 :auto-size="{ minRows: 5, maxRows: 10 }"> | 
					
						
							|  |  |  |             </a-textarea> | 
					
						
							|  |  |  |         </a-form> | 
					
						
							|  |  |  |     </a-form-item> | 
					
						
							|  |  |  |     <a-form-item v-if="inbound.canEnableTlsFlow()" label='Flow'> | 
					
						
							|  |  |  |         <a-select v-model="client.flow" :dropdown-class-name="themeSwitcher.currentTheme"> | 
					
						
							|  |  |  |             <a-select-option value="" selected>{{ i18n "none" }}</a-select-option> | 
					
						
							|  |  |  |             <a-select-option v-for="key in TLS_FLOW_CONTROL" :value="key">[[ key ]]</a-select-option> | 
					
						
							|  |  |  |         </a-select> | 
					
						
							|  |  |  |     </a-form-item> | 
					
						
							|  |  |  |     <a-form-item> | 
					
						
							|  |  |  |         <template slot="label"> | 
					
						
							|  |  |  |             <a-tooltip> | 
					
						
							|  |  |  |                 <template slot="title"> | 
					
						
							|  |  |  |                     0 <span>{{ i18n "pages.inbounds.meansNoLimit" }}</span> | 
					
						
							|  |  |  |                 </template> | 
					
						
							| 
									
										
										
										
											2024-01-12 14:24:42 +00:00
										 |  |  |                 {{ i18n "pages.inbounds.totalFlow" }} | 
					
						
							| 
									
										
										
										
											2023-12-13 15:57:36 +00:00
										 |  |  |                 <a-icon type="question-circle"></a-icon> | 
					
						
							|  |  |  |             </a-tooltip> | 
					
						
							|  |  |  |         </template> | 
					
						
							| 
									
										
										
										
											2025-01-05 19:41:56 +00:00
										 |  |  |         <a-input-number v-model.number="client._totalGB" :min="0"></a-input-number> | 
					
						
							| 
									
										
										
										
											2023-12-13 15:57:36 +00:00
										 |  |  |     </a-form-item> | 
					
						
							| 
									
										
										
										
											2023-12-13 16:25:20 +00:00
										 |  |  |     <a-form-item v-if="isEdit && clientStats" label='{{ i18n "usage" }}'> | 
					
						
							| 
									
										
										
										
											2025-03-07 09:07:23 +00:00
										 |  |  |         <a-tag :color="ColorUtils.clientUsageColor(clientStats, app.trafficDiff)"> | 
					
						
							|  |  |  |             [[ SizeFormatter.sizeFormat(clientStats.up) ]] / | 
					
						
							|  |  |  |             [[ SizeFormatter.sizeFormat(clientStats.down) ]] | 
					
						
							|  |  |  |             ([[ SizeFormatter.sizeFormat(clientStats.up + clientStats.down) ]]) | 
					
						
							| 
									
										
										
										
											2023-12-13 15:57:36 +00:00
										 |  |  |         </a-tag> | 
					
						
							|  |  |  |         <a-tooltip> | 
					
						
							|  |  |  |             <template slot="title">{{ i18n "pages.inbounds.resetTraffic" }}</template> | 
					
						
							|  |  |  |             <a-icon type="retweet" | 
					
						
							| 
									
										
										
										
											2025-02-04 10:27:58 +00:00
										 |  |  |                 @click="resetClientTraffic(client.email,clientStats.inboundId,$event.target)" | 
					
						
							| 
									
										
										
										
											2023-12-13 15:57:36 +00:00
										 |  |  |                 v-if="client.email.length > 0"></a-icon> | 
					
						
							|  |  |  |         </a-tooltip> | 
					
						
							|  |  |  |     </a-form-item> | 
					
						
							|  |  |  |     <a-form-item label='{{ i18n "pages.client.delayedStart" }}'> | 
					
						
							|  |  |  |         <a-switch v-model="delayedStart" @click="client._expiryTime=0"></a-switch> | 
					
						
							|  |  |  |     </a-form-item> | 
					
						
							|  |  |  |     <a-form-item v-if="delayedStart" label='{{ i18n "pages.client.expireDays" }}'> | 
					
						
							|  |  |  |         <a-input-number v-model.number="delayedExpireDays" :min="0"></a-input-number> | 
					
						
							|  |  |  |     </a-form-item> | 
					
						
							|  |  |  |     <a-form-item v-else> | 
					
						
							|  |  |  |         <template slot="label"> | 
					
						
							|  |  |  |             <a-tooltip> | 
					
						
							| 
									
										
										
										
											2023-12-13 16:25:20 +00:00
										 |  |  |                 <template slot="title">{{ i18n "pages.inbounds.leaveBlankToNeverExpire" }}</template> | 
					
						
							|  |  |  |                 {{ i18n "pages.inbounds.expireDate" }} | 
					
						
							|  |  |  |                 <a-icon type="question-circle"></a-icon> | 
					
						
							| 
									
										
										
										
											2023-12-13 15:57:36 +00:00
										 |  |  |             </a-tooltip> | 
					
						
							|  |  |  |         </template> | 
					
						
							| 
									
										
										
										
											2024-01-02 08:32:21 +00:00
										 |  |  |         <a-date-picker v-if="datepicker == 'gregorian'" :show-time="{ format: 'HH:mm:ss' }" format="YYYY-MM-DD HH:mm:ss" | 
					
						
							| 
									
										
										
										
											2023-12-13 15:57:36 +00:00
										 |  |  |             :dropdown-class-name="themeSwitcher.currentTheme" v-model="client._expiryTime"></a-date-picker> | 
					
						
							| 
									
										
										
										
											2025-03-08 15:41:27 +00:00
										 |  |  |         <a-persian-datepicker v-else placeholder='{{ i18n "pages.settings.datepickerPlaceholder" }}' | 
					
						
							|  |  |  |                             value="client._expiryTime" v-model="client._expiryTime"></a-persian-datepicker> | 
					
						
							| 
									
										
										
										
											2023-12-13 15:57:36 +00:00
										 |  |  |         <a-tag color="red" v-if="isEdit && isExpiry">Expired</a-tag> | 
					
						
							|  |  |  |     </a-form-item> | 
					
						
							|  |  |  |     <a-form-item v-if="client.expiryTime != 0"> | 
					
						
							|  |  |  |         <template slot="label"> | 
					
						
							|  |  |  |             <a-tooltip> | 
					
						
							| 
									
										
										
										
											2023-12-13 16:25:20 +00:00
										 |  |  |                 <template slot="title">{{ i18n "pages.client.renewDesc" }}</template> | 
					
						
							| 
									
										
										
										
											2023-12-13 15:57:36 +00:00
										 |  |  |                 {{ i18n "pages.client.renew" }} | 
					
						
							| 
									
										
										
										
											2023-12-13 16:25:20 +00:00
										 |  |  |                 <a-icon type="question-circle"></a-icon> | 
					
						
							| 
									
										
										
										
											2023-12-13 15:57:36 +00:00
										 |  |  |             </a-tooltip> | 
					
						
							|  |  |  |         </template> | 
					
						
							|  |  |  |         <a-input-number v-model.number="client.reset" :min="0"></a-input-number> | 
					
						
							|  |  |  |     </a-form-item> | 
					
						
							| 
									
										
										
										
											2023-03-17 16:07:49 +00:00
										 |  |  | </a-form> | 
					
						
							|  |  |  | {{end}} |