2023-03-17 19:07:49 +03:00
|
|
|
{{define "form/client"}}
|
|
|
|
<a-form layout="inline" v-if="client">
|
|
|
|
<template v-if="isEdit">
|
2023-05-08 17:44:22 +03:00
|
|
|
<a-tag v-if="isExpiry || isTrafficExhausted" color="red" style="margin-bottom: 10px;display: block;text-align: center;">
|
|
|
|
Account is (Expired|Traffic Ended) And Disabled
|
|
|
|
</a-tag>
|
2023-03-17 19:07:49 +03:00
|
|
|
</template>
|
2023-05-07 14:06:43 +03:00
|
|
|
<a-form-item label='{{ i18n "pages.inbounds.enable" }}'>
|
|
|
|
<a-switch v-model="client.enable"></a-switch>
|
|
|
|
</a-form-item>
|
|
|
|
<br>
|
2023-03-17 19:07:49 +03:00
|
|
|
<a-form-item>
|
|
|
|
<span slot="label">
|
2023-05-12 20:30:10 +03:00
|
|
|
<span>{{ i18n "pages.inbounds.email" }}</span>
|
2023-03-17 19:07:49 +03:00
|
|
|
<a-tooltip>
|
|
|
|
<template slot="title">
|
2023-05-12 20:30:10 +03:00
|
|
|
<span>{{ i18n "pages.inbounds.emailDesc" }}</span>
|
2023-03-17 19:07:49 +03:00
|
|
|
</template>
|
2023-05-13 15:12:46 +03:00
|
|
|
<a-icon @click="client.email = RandomUtil.randomText()" type="sync"> </a-icon>
|
2023-03-17 19:07:49 +03:00
|
|
|
</a-tooltip>
|
|
|
|
</span>
|
2023-05-08 17:44:22 +03:00
|
|
|
<a-input v-model.trim="client.email" style="width: 200px;"></a-input>
|
2023-04-09 22:43:18 +03:00
|
|
|
</a-form-item>
|
2023-05-06 19:51:14 +03:00
|
|
|
<a-form-item label="Password" v-if="inbound.protocol === Protocols.TROJAN || inbound.protocol === Protocols.SHADOWSOCKS">
|
2023-05-08 17:44:22 +03:00
|
|
|
<a-icon v-if="inbound.protocol === Protocols.SHADOWSOCKS"
|
|
|
|
@click="client.password = RandomUtil.randomShadowsocksPassword()" type="sync"> </a-icon>
|
|
|
|
<a-input v-model.trim="client.password" style="width: 300px;"></a-input>
|
2023-03-17 19:07:49 +03:00
|
|
|
</a-form-item>
|
2023-05-07 16:42:47 +03:00
|
|
|
<br>
|
2023-03-17 19:07:49 +03:00
|
|
|
<a-form-item label='{{ i18n "additional" }} ID' v-if="inbound.protocol === Protocols.VMESS">
|
2023-05-07 14:06:43 +03:00
|
|
|
<a-input-number v-model="client.alterId"></a-input-number>
|
2023-05-01 20:28:00 +03:00
|
|
|
</a-form-item>
|
|
|
|
<a-form-item label="ID" v-if="inbound.protocol === Protocols.VMESS || inbound.protocol === Protocols.VLESS">
|
2023-05-13 14:21:07 +03:00
|
|
|
<a-icon @click="client.id = RandomUtil.randomUUID()" type="sync"> </a-icon>
|
2023-05-13 14:33:46 +03:00
|
|
|
<a-input v-model.trim="client.id" style="width: 300px;"></a-input>
|
2023-04-10 00:25:47 +03:00
|
|
|
</a-form-item>
|
2023-05-07 16:42:47 +03:00
|
|
|
<a-form-item v-if="client.email">
|
|
|
|
<span slot="label">
|
|
|
|
Subscription
|
|
|
|
<a-tooltip>
|
|
|
|
<template slot="title">
|
|
|
|
<span>{{ i18n "pages.inbounds.subscriptionDesc" }}</span>
|
|
|
|
</template>
|
|
|
|
<a-icon type="question-circle" theme="filled"></a-icon>
|
|
|
|
</a-tooltip>
|
|
|
|
</span>
|
2023-04-10 00:25:47 +03:00
|
|
|
<a-input v-model.trim="client.subId"></a-input>
|
2023-05-13 14:33:46 +03:00
|
|
|
</a-form-item>
|
2023-05-07 16:42:47 +03:00
|
|
|
<a-form-item v-if="client.email">
|
|
|
|
<span slot="label">
|
|
|
|
Telegram ID
|
|
|
|
<a-tooltip>
|
|
|
|
<template slot="title">
|
|
|
|
<span>{{ i18n "pages.inbounds.telegramDesc" }}</span>
|
|
|
|
</template>
|
|
|
|
<a-icon type="question-circle" theme="filled"></a-icon>
|
|
|
|
</a-tooltip>
|
|
|
|
</span>
|
2023-04-10 00:25:47 +03:00
|
|
|
<a-input v-model.trim="client.tgId"></a-input>
|
2023-03-17 19:07:49 +03:00
|
|
|
</a-form-item>
|
|
|
|
<a-form-item>
|
|
|
|
<span slot="label">
|
2023-04-01 16:49:01 +03:00
|
|
|
<span>{{ i18n "pages.inbounds.IPLimit" }}</span>
|
2023-03-17 19:07:49 +03:00
|
|
|
<a-tooltip>
|
|
|
|
<template slot="title">
|
2023-04-01 16:49:01 +03:00
|
|
|
<span>{{ i18n "pages.inbounds.IPLimitDesc" }}</span>
|
2023-03-17 19:07:49 +03:00
|
|
|
</template>
|
|
|
|
<a-icon type="question-circle" theme="filled"></a-icon>
|
|
|
|
</a-tooltip>
|
|
|
|
</span>
|
2023-05-07 14:06:43 +03:00
|
|
|
<a-input-number v-model="client.limitIp" min="0"></a-input-number>
|
2023-03-17 19:07:49 +03:00
|
|
|
</a-form-item>
|
|
|
|
<a-form-item v-if="client.email && client.limitIp > 0 && isEdit">
|
|
|
|
<span slot="label">
|
2023-04-01 16:49:01 +03:00
|
|
|
<span>{{ i18n "pages.inbounds.IPLimitlog" }}</span>
|
2023-03-17 19:07:49 +03:00
|
|
|
<a-tooltip>
|
|
|
|
<template slot="title">
|
2023-04-01 16:49:01 +03:00
|
|
|
<span>{{ i18n "pages.inbounds.IPLimitlogDesc" }}</span>
|
2023-03-17 19:07:49 +03:00
|
|
|
</template>
|
|
|
|
<a-icon type="question-circle" theme="filled"></a-icon>
|
|
|
|
</a-tooltip>
|
|
|
|
<a-tooltip>
|
|
|
|
<template slot="title">
|
2023-04-01 16:49:01 +03:00
|
|
|
<span>{{ i18n "pages.inbounds.IPLimitlogclear" }}</span>
|
2023-03-17 19:07:49 +03:00
|
|
|
</template>
|
|
|
|
<span style="color: #FF4D4F">
|
2023-03-17 21:04:07 +03:00
|
|
|
<a-icon type="delete" @click="clearDBClientIps(client.email)"></a-icon>
|
2023-03-17 19:07:49 +03:00
|
|
|
</span>
|
|
|
|
</a-tooltip>
|
|
|
|
</span>
|
|
|
|
<a-form layout="block">
|
2023-05-08 17:44:22 +03:00
|
|
|
<a-textarea id="clientIPs" readonly
|
|
|
|
@click="getDBClientIps(client.email,$event)"
|
|
|
|
placeholder="Click To Get IPs"
|
|
|
|
:auto-size="{ minRows: 2, maxRows: 10 }">
|
2023-03-17 19:07:49 +03:00
|
|
|
</a-textarea>
|
|
|
|
</a-form>
|
|
|
|
</a-form-item>
|
2023-05-07 14:06:43 +03:00
|
|
|
<br>
|
2023-04-18 21:04:06 +03:00
|
|
|
<a-form-item v-if="inbound.xtls" label="Flow">
|
2023-05-08 17:44:22 +03:00
|
|
|
<a-select v-model="client.flow" style="width: 200px" :dropdown-class-name="themeSwitcher.darkCardClass">
|
2023-03-17 19:07:49 +03:00
|
|
|
<a-select-option value="">{{ i18n "none" }}</a-select-option>
|
|
|
|
<a-select-option v-for="key in XTLS_FLOW_CONTROL" :value="key">[[ key ]]</a-select-option>
|
|
|
|
</a-select>
|
|
|
|
</a-form-item>
|
2023-05-07 14:06:43 +03:00
|
|
|
<a-form-item v-else-if="inbound.canEnableTlsFlow()" label="Flow">
|
2023-05-08 17:44:22 +03:00
|
|
|
<a-select v-model="client.flow" style="width: 200px" :dropdown-class-name="themeSwitcher.darkCardClass">
|
2023-03-17 19:07:49 +03:00
|
|
|
<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>
|
|
|
|
<span slot="label">
|
2023-05-08 17:44:22 +03:00
|
|
|
<span>{{ i18n "pages.inbounds.totalFlow" }}</span> (GB)
|
2023-03-17 19:07:49 +03:00
|
|
|
<a-tooltip>
|
|
|
|
<template slot="title">
|
|
|
|
0 <span>{{ i18n "pages.inbounds.meansNoLimit" }}</span>
|
|
|
|
</template>
|
|
|
|
<a-icon type="question-circle" theme="filled"></a-icon>
|
|
|
|
</a-tooltip>
|
|
|
|
</span>
|
2023-05-08 17:44:22 +03:00
|
|
|
<a-input-number v-model="client._totalGB" :min="0"></a-input-number>
|
2023-03-17 19:07:49 +03:00
|
|
|
<template v-if="isEdit && clientStats">
|
2023-05-08 17:44:22 +03:00
|
|
|
<br>
|
|
|
|
<span> {{ i18n "usage" }}:</span>
|
2023-03-17 19:07:49 +03:00
|
|
|
<a-tag :color="statsColor">
|
|
|
|
[[ sizeFormat(clientStats.up) ]] /
|
|
|
|
[[ sizeFormat(clientStats.down) ]]
|
|
|
|
([[ sizeFormat(clientStats.up + clientStats.down) ]])
|
|
|
|
</a-tag>
|
2023-04-20 15:25:51 +03:00
|
|
|
<a-tooltip>
|
|
|
|
<template slot="title">{{ i18n "pages.inbounds.resetTraffic" }}</template>
|
2023-05-08 17:44:22 +03:00
|
|
|
<a-icon type="retweet" @click="resetClientTraffic(client.email,clientStats.inboundId,$event.target)"
|
|
|
|
v-if="client.email.length > 0"></a-icon>
|
2023-04-20 15:25:51 +03:00
|
|
|
</a-tooltip>
|
2023-05-07 14:06:43 +03:00
|
|
|
</template>
|
2023-03-17 19:07:49 +03:00
|
|
|
</a-form-item>
|
2023-05-07 14:06:43 +03:00
|
|
|
<br>
|
2023-04-18 21:04:06 +03:00
|
|
|
<a-form-item label='{{ i18n "pages.client.delayedStart" }}'>
|
2023-04-09 22:43:18 +03:00
|
|
|
<a-switch v-model="clientModal.delayedStart" @click="client._expiryTime=0"></a-switch>
|
|
|
|
</a-form-item>
|
2023-05-07 14:06:43 +03:00
|
|
|
<br>
|
2023-04-18 21:04:06 +03:00
|
|
|
<a-form-item label='{{ i18n "pages.client.expireDays" }}' v-if="clientModal.delayedStart">
|
2023-05-04 19:57:42 +03:00
|
|
|
<a-input-number v-model="delayedExpireDays" :min="0"></a-input-number>
|
2023-04-09 22:43:18 +03:00
|
|
|
</a-form-item>
|
|
|
|
<a-form-item v-else>
|
2023-03-17 19:07:49 +03:00
|
|
|
<span slot="label">
|
2023-05-08 17:44:22 +03:00
|
|
|
<span>{{ i18n "pages.inbounds.expireDate" }}</span>
|
2023-03-17 19:07:49 +03:00
|
|
|
<a-tooltip>
|
|
|
|
<template slot="title">
|
|
|
|
<span>{{ i18n "pages.inbounds.leaveBlankToNeverExpire" }}</span>
|
|
|
|
</template>
|
|
|
|
<a-icon type="question-circle" theme="filled"></a-icon>
|
|
|
|
</a-tooltip>
|
|
|
|
</span>
|
2023-04-29 22:08:41 +03:00
|
|
|
<a-date-picker :show-time="{ format: 'HH:mm:ss' }" format="YYYY-MM-DD HH:mm:ss"
|
2023-05-08 17:44:22 +03:00
|
|
|
:dropdown-class-name="themeSwitcher.darkCardClass"
|
2023-04-09 22:43:18 +03:00
|
|
|
v-model="client._expiryTime" style="width: 170px;"></a-date-picker>
|
2023-03-17 19:07:49 +03:00
|
|
|
<a-tag color="red" v-if="isExpiry">Expired</a-tag>
|
|
|
|
</a-form-item>
|
|
|
|
</a-form>
|
|
|
|
{{end}}
|