mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-09-12 13:10:05 +00:00
Remove periodic traffic reset fields from client
This commit is contained in:
parent
cad0074557
commit
d132ff8839
5 changed files with 33 additions and 86 deletions
|
@ -91,20 +91,19 @@ type Setting struct {
|
|||
}
|
||||
|
||||
type Client struct {
|
||||
ID string `json:"id"`
|
||||
Security string `json:"security"`
|
||||
Password string `json:"password"`
|
||||
Flow string `json:"flow"`
|
||||
Email string `json:"email"`
|
||||
LimitIP int `json:"limitIp"`
|
||||
TotalGB int64 `json:"totalGB" form:"totalGB"`
|
||||
ExpiryTime int64 `json:"expiryTime" form:"expiryTime"`
|
||||
Enable bool `json:"enable" form:"enable"`
|
||||
TgID int64 `json:"tgId" form:"tgId"`
|
||||
SubID string `json:"subId" form:"subId"`
|
||||
Comment string `json:"comment" form:"comment"`
|
||||
Reset int `json:"reset" form:"reset"`
|
||||
PeriodicTrafficReset string `json:"periodicTrafficReset" form:"periodicTrafficReset"`
|
||||
CreatedAt int64 `json:"created_at,omitempty"`
|
||||
UpdatedAt int64 `json:"updated_at,omitempty"`
|
||||
ID string `json:"id"`
|
||||
Security string `json:"security"`
|
||||
Password string `json:"password"`
|
||||
Flow string `json:"flow"`
|
||||
Email string `json:"email"`
|
||||
LimitIP int `json:"limitIp"`
|
||||
TotalGB int64 `json:"totalGB" form:"totalGB"`
|
||||
ExpiryTime int64 `json:"expiryTime" form:"expiryTime"`
|
||||
Enable bool `json:"enable" form:"enable"`
|
||||
TgID int64 `json:"tgId" form:"tgId"`
|
||||
SubID string `json:"subId" form:"subId"`
|
||||
Comment string `json:"comment" form:"comment"`
|
||||
Reset int `json:"reset" form:"reset"`
|
||||
CreatedAt int64 `json:"created_at,omitempty"`
|
||||
UpdatedAt int64 `json:"updated_at,omitempty"`
|
||||
}
|
||||
|
|
|
@ -1792,7 +1792,6 @@ Inbound.VmessSettings.VMESS = class extends XrayCommonClass {
|
|||
subId = RandomUtil.randomLowerAndNum(16),
|
||||
comment = '',
|
||||
reset = 0,
|
||||
periodicTrafficReset = 'never',
|
||||
created_at = undefined,
|
||||
updated_at = undefined
|
||||
) {
|
||||
|
@ -1808,7 +1807,6 @@ Inbound.VmessSettings.VMESS = class extends XrayCommonClass {
|
|||
this.subId = subId;
|
||||
this.comment = comment;
|
||||
this.reset = reset;
|
||||
this.periodicTrafficReset = periodicTrafficReset;
|
||||
this.created_at = created_at;
|
||||
this.updated_at = updated_at;
|
||||
}
|
||||
|
@ -1826,7 +1824,6 @@ Inbound.VmessSettings.VMESS = class extends XrayCommonClass {
|
|||
json.subId,
|
||||
json.comment,
|
||||
json.reset,
|
||||
json.periodicTrafficReset,
|
||||
json.created_at,
|
||||
json.updated_at,
|
||||
);
|
||||
|
@ -1910,7 +1907,6 @@ Inbound.VLESSSettings.VLESS = class extends XrayCommonClass {
|
|||
subId = RandomUtil.randomLowerAndNum(16),
|
||||
comment = '',
|
||||
reset = 0,
|
||||
periodicTrafficReset = 'never',
|
||||
created_at = undefined,
|
||||
updated_at = undefined
|
||||
) {
|
||||
|
@ -1926,7 +1922,6 @@ Inbound.VLESSSettings.VLESS = class extends XrayCommonClass {
|
|||
this.subId = subId;
|
||||
this.comment = comment;
|
||||
this.reset = reset;
|
||||
this.periodicTrafficReset = periodicTrafficReset;
|
||||
this.created_at = created_at;
|
||||
this.updated_at = updated_at;
|
||||
}
|
||||
|
@ -1944,7 +1939,6 @@ Inbound.VLESSSettings.VLESS = class extends XrayCommonClass {
|
|||
json.subId,
|
||||
json.comment,
|
||||
json.reset,
|
||||
json.periodicTrafficReset,
|
||||
json.created_at,
|
||||
json.updated_at,
|
||||
);
|
||||
|
@ -2058,7 +2052,6 @@ Inbound.TrojanSettings.Trojan = class extends XrayCommonClass {
|
|||
subId = RandomUtil.randomLowerAndNum(16),
|
||||
comment = '',
|
||||
reset = 0,
|
||||
periodicTrafficReset = 'never',
|
||||
created_at = undefined,
|
||||
updated_at = undefined
|
||||
) {
|
||||
|
@ -2073,7 +2066,6 @@ Inbound.TrojanSettings.Trojan = class extends XrayCommonClass {
|
|||
this.subId = subId;
|
||||
this.comment = comment;
|
||||
this.reset = reset;
|
||||
this.periodicTrafficReset = periodicTrafficReset;
|
||||
this.created_at = created_at;
|
||||
this.updated_at = updated_at;
|
||||
}
|
||||
|
@ -2090,7 +2082,6 @@ Inbound.TrojanSettings.Trojan = class extends XrayCommonClass {
|
|||
subId: this.subId,
|
||||
comment: this.comment,
|
||||
reset: this.reset,
|
||||
periodicTrafficReset: this.periodicTrafficReset,
|
||||
created_at: this.created_at,
|
||||
updated_at: this.updated_at,
|
||||
};
|
||||
|
@ -2108,7 +2099,6 @@ Inbound.TrojanSettings.Trojan = class extends XrayCommonClass {
|
|||
json.subId,
|
||||
json.comment,
|
||||
json.reset,
|
||||
json.periodicTrafficReset,
|
||||
json.created_at,
|
||||
json.updated_at,
|
||||
);
|
||||
|
@ -2231,7 +2221,6 @@ Inbound.ShadowsocksSettings.Shadowsocks = class extends XrayCommonClass {
|
|||
subId = RandomUtil.randomLowerAndNum(16),
|
||||
comment = '',
|
||||
reset = 0,
|
||||
periodicTrafficReset = 'never',
|
||||
created_at = undefined,
|
||||
updated_at = undefined
|
||||
) {
|
||||
|
@ -2247,7 +2236,6 @@ Inbound.ShadowsocksSettings.Shadowsocks = class extends XrayCommonClass {
|
|||
this.subId = subId;
|
||||
this.comment = comment;
|
||||
this.reset = reset;
|
||||
this.periodicTrafficReset = periodicTrafficReset;
|
||||
this.created_at = created_at;
|
||||
this.updated_at = updated_at;
|
||||
}
|
||||
|
@ -2265,7 +2253,6 @@ Inbound.ShadowsocksSettings.Shadowsocks = class extends XrayCommonClass {
|
|||
subId: this.subId,
|
||||
comment: this.comment,
|
||||
reset: this.reset,
|
||||
periodicTrafficReset: this.periodicTrafficReset,
|
||||
created_at: this.created_at,
|
||||
updated_at: this.updated_at,
|
||||
};
|
||||
|
@ -2284,7 +2271,6 @@ Inbound.ShadowsocksSettings.Shadowsocks = class extends XrayCommonClass {
|
|||
json.subId,
|
||||
json.comment,
|
||||
json.reset,
|
||||
json.periodicTrafficReset,
|
||||
json.created_at,
|
||||
json.updated_at,
|
||||
);
|
||||
|
|
|
@ -168,23 +168,5 @@
|
|||
</template>
|
||||
<a-input-number v-model.number="client.reset" :min="0"></a-input-number>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item>
|
||||
<template slot="label">
|
||||
<a-tooltip>
|
||||
<template slot="title">
|
||||
<span>{{ i18n "pages.inbounds.periodicTrafficResetDesc" }}</span>
|
||||
</template>
|
||||
{{ i18n "pages.inbounds.periodicTrafficResetTitle" }}
|
||||
<a-icon type="question-circle"></a-icon>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
<a-select v-model="client.periodicTrafficReset" :dropdown-class-name="themeSwitcher.currentTheme">
|
||||
<a-select-option value="never">{{ i18n "pages.inbounds.periodicTrafficReset.never" }}</a-select-option>
|
||||
<a-select-option value="daily">{{ i18n "pages.inbounds.periodicTrafficReset.daily" }}</a-select-option>
|
||||
<a-select-option value="weekly">{{ i18n "pages.inbounds.periodicTrafficReset.weekly" }}</a-select-option>
|
||||
<a-select-option value="monthly">{{ i18n "pages.inbounds.periodicTrafficReset.monthly" }}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
{{end}}
|
|
@ -44,24 +44,6 @@
|
|||
<a-input-number v-model.number="dbInbound.totalGB" :min="0"></a-input-number>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item>
|
||||
<template slot="label">
|
||||
<a-tooltip>
|
||||
<template slot="title">
|
||||
<span>{{ i18n "pages.inbounds.leaveBlankToNeverExpire" }}</span>
|
||||
</template>
|
||||
{{ i18n "pages.inbounds.expireDate" }}
|
||||
<a-icon type="question-circle"></a-icon>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
<a-date-picker :style="{ width: '100%' }" v-if="datepicker == 'gregorian'" :show-time="{ format: 'HH:mm:ss' }"
|
||||
format="YYYY-MM-DD HH:mm:ss" :dropdown-class-name="themeSwitcher.currentTheme"
|
||||
v-model="dbInbound._expiryTime"></a-date-picker>
|
||||
<a-persian-datepicker v-else placeholder='{{ i18n "pages.settings.datepickerPlaceholder" }}'
|
||||
value="dbInbound._expiryTime" v-model="dbInbound._expiryTime">
|
||||
</a-persian-datepicker>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item>
|
||||
<template slot="label">
|
||||
<a-tooltip>
|
||||
|
@ -79,6 +61,24 @@
|
|||
<a-select-option value="monthly">{{ i18n "pages.inbounds.periodicTrafficReset.monthly" }}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item>
|
||||
<template slot="label">
|
||||
<a-tooltip>
|
||||
<template slot="title">
|
||||
<span>{{ i18n "pages.inbounds.leaveBlankToNeverExpire" }}</span>
|
||||
</template>
|
||||
{{ i18n "pages.inbounds.expireDate" }}
|
||||
<a-icon type="question-circle"></a-icon>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
<a-date-picker :style="{ width: '100%' }" v-if="datepicker == 'gregorian'" :show-time="{ format: 'HH:mm:ss' }"
|
||||
format="YYYY-MM-DD HH:mm:ss" :dropdown-class-name="themeSwitcher.currentTheme"
|
||||
v-model="dbInbound._expiryTime"></a-date-picker>
|
||||
<a-persian-datepicker v-else placeholder='{{ i18n "pages.settings.datepickerPlaceholder" }}'
|
||||
value="dbInbound._expiryTime" v-model="dbInbound._expiryTime">
|
||||
</a-persian-datepicker>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
|
||||
<!-- vmess settings -->
|
||||
|
|
|
@ -122,23 +122,6 @@
|
|||
</template>
|
||||
<a-input-number v-model.number="clientsBulkModal.reset" :min="0"></a-input-number>
|
||||
</a-form-item>
|
||||
<a-form-item>
|
||||
<template slot="label">
|
||||
<a-tooltip>
|
||||
<template slot="title">
|
||||
<span>{{ i18n "pages.inbounds.periodicTrafficResetDesc" }}</span>
|
||||
</template>
|
||||
{{ i18n "pages.inbounds.periodicTrafficResetTitle" }}
|
||||
<a-icon type="question-circle"></a-icon>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
<a-select v-model="clientsBulkModal.periodicTrafficReset" :dropdown-class-name="themeSwitcher.currentTheme">
|
||||
<a-select-option value="never">{{ i18n "pages.inbounds.periodicTrafficReset.never" }}</a-select-option>
|
||||
<a-select-option value="daily">{{ i18n "pages.inbounds.periodicTrafficReset.daily" }}</a-select-option>
|
||||
<a-select-option value="weekly">{{ i18n "pages.inbounds.periodicTrafficReset.weekly" }}</a-select-option>
|
||||
<a-select-option value="monthly">{{ i18n "pages.inbounds.periodicTrafficReset.monthly" }}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-modal>
|
||||
<script>
|
||||
|
@ -166,7 +149,6 @@
|
|||
flow: "",
|
||||
delayedStart: false,
|
||||
reset: 0,
|
||||
periodicTrafficReset: "never",
|
||||
ok() {
|
||||
clients = [];
|
||||
method = clientsBulkModal.emailMethod;
|
||||
|
@ -194,7 +176,6 @@
|
|||
newClient.flow = clientsBulkModal.flow;
|
||||
}
|
||||
newClient.reset = clientsBulkModal.reset;
|
||||
newClient.periodicTrafficReset = clientsBulkModal.periodicTrafficReset;
|
||||
clients.push(newClient);
|
||||
}
|
||||
ObjectUtil.execute(clientsBulkModal.confirm, clients, clientsBulkModal.dbInbound.id);
|
||||
|
@ -226,7 +207,6 @@
|
|||
this.inbound = dbInbound.toInbound();
|
||||
this.delayedStart = false;
|
||||
this.reset = 0;
|
||||
this.periodicTrafficReset = "never";
|
||||
},
|
||||
newClient(protocol) {
|
||||
switch (protocol) {
|
||||
|
|
Loading…
Reference in a new issue