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 {
|
type Client struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
Security string `json:"security"`
|
Security string `json:"security"`
|
||||||
Password string `json:"password"`
|
Password string `json:"password"`
|
||||||
Flow string `json:"flow"`
|
Flow string `json:"flow"`
|
||||||
Email string `json:"email"`
|
Email string `json:"email"`
|
||||||
LimitIP int `json:"limitIp"`
|
LimitIP int `json:"limitIp"`
|
||||||
TotalGB int64 `json:"totalGB" form:"totalGB"`
|
TotalGB int64 `json:"totalGB" form:"totalGB"`
|
||||||
ExpiryTime int64 `json:"expiryTime" form:"expiryTime"`
|
ExpiryTime int64 `json:"expiryTime" form:"expiryTime"`
|
||||||
Enable bool `json:"enable" form:"enable"`
|
Enable bool `json:"enable" form:"enable"`
|
||||||
TgID int64 `json:"tgId" form:"tgId"`
|
TgID int64 `json:"tgId" form:"tgId"`
|
||||||
SubID string `json:"subId" form:"subId"`
|
SubID string `json:"subId" form:"subId"`
|
||||||
Comment string `json:"comment" form:"comment"`
|
Comment string `json:"comment" form:"comment"`
|
||||||
Reset int `json:"reset" form:"reset"`
|
Reset int `json:"reset" form:"reset"`
|
||||||
PeriodicTrafficReset string `json:"periodicTrafficReset" form:"periodicTrafficReset"`
|
CreatedAt int64 `json:"created_at,omitempty"`
|
||||||
CreatedAt int64 `json:"created_at,omitempty"`
|
UpdatedAt int64 `json:"updated_at,omitempty"`
|
||||||
UpdatedAt int64 `json:"updated_at,omitempty"`
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1792,7 +1792,6 @@ Inbound.VmessSettings.VMESS = class extends XrayCommonClass {
|
||||||
subId = RandomUtil.randomLowerAndNum(16),
|
subId = RandomUtil.randomLowerAndNum(16),
|
||||||
comment = '',
|
comment = '',
|
||||||
reset = 0,
|
reset = 0,
|
||||||
periodicTrafficReset = 'never',
|
|
||||||
created_at = undefined,
|
created_at = undefined,
|
||||||
updated_at = undefined
|
updated_at = undefined
|
||||||
) {
|
) {
|
||||||
|
@ -1808,7 +1807,6 @@ Inbound.VmessSettings.VMESS = class extends XrayCommonClass {
|
||||||
this.subId = subId;
|
this.subId = subId;
|
||||||
this.comment = comment;
|
this.comment = comment;
|
||||||
this.reset = reset;
|
this.reset = reset;
|
||||||
this.periodicTrafficReset = periodicTrafficReset;
|
|
||||||
this.created_at = created_at;
|
this.created_at = created_at;
|
||||||
this.updated_at = updated_at;
|
this.updated_at = updated_at;
|
||||||
}
|
}
|
||||||
|
@ -1826,7 +1824,6 @@ Inbound.VmessSettings.VMESS = class extends XrayCommonClass {
|
||||||
json.subId,
|
json.subId,
|
||||||
json.comment,
|
json.comment,
|
||||||
json.reset,
|
json.reset,
|
||||||
json.periodicTrafficReset,
|
|
||||||
json.created_at,
|
json.created_at,
|
||||||
json.updated_at,
|
json.updated_at,
|
||||||
);
|
);
|
||||||
|
@ -1910,7 +1907,6 @@ Inbound.VLESSSettings.VLESS = class extends XrayCommonClass {
|
||||||
subId = RandomUtil.randomLowerAndNum(16),
|
subId = RandomUtil.randomLowerAndNum(16),
|
||||||
comment = '',
|
comment = '',
|
||||||
reset = 0,
|
reset = 0,
|
||||||
periodicTrafficReset = 'never',
|
|
||||||
created_at = undefined,
|
created_at = undefined,
|
||||||
updated_at = undefined
|
updated_at = undefined
|
||||||
) {
|
) {
|
||||||
|
@ -1926,7 +1922,6 @@ Inbound.VLESSSettings.VLESS = class extends XrayCommonClass {
|
||||||
this.subId = subId;
|
this.subId = subId;
|
||||||
this.comment = comment;
|
this.comment = comment;
|
||||||
this.reset = reset;
|
this.reset = reset;
|
||||||
this.periodicTrafficReset = periodicTrafficReset;
|
|
||||||
this.created_at = created_at;
|
this.created_at = created_at;
|
||||||
this.updated_at = updated_at;
|
this.updated_at = updated_at;
|
||||||
}
|
}
|
||||||
|
@ -1944,7 +1939,6 @@ Inbound.VLESSSettings.VLESS = class extends XrayCommonClass {
|
||||||
json.subId,
|
json.subId,
|
||||||
json.comment,
|
json.comment,
|
||||||
json.reset,
|
json.reset,
|
||||||
json.periodicTrafficReset,
|
|
||||||
json.created_at,
|
json.created_at,
|
||||||
json.updated_at,
|
json.updated_at,
|
||||||
);
|
);
|
||||||
|
@ -2058,7 +2052,6 @@ Inbound.TrojanSettings.Trojan = class extends XrayCommonClass {
|
||||||
subId = RandomUtil.randomLowerAndNum(16),
|
subId = RandomUtil.randomLowerAndNum(16),
|
||||||
comment = '',
|
comment = '',
|
||||||
reset = 0,
|
reset = 0,
|
||||||
periodicTrafficReset = 'never',
|
|
||||||
created_at = undefined,
|
created_at = undefined,
|
||||||
updated_at = undefined
|
updated_at = undefined
|
||||||
) {
|
) {
|
||||||
|
@ -2073,7 +2066,6 @@ Inbound.TrojanSettings.Trojan = class extends XrayCommonClass {
|
||||||
this.subId = subId;
|
this.subId = subId;
|
||||||
this.comment = comment;
|
this.comment = comment;
|
||||||
this.reset = reset;
|
this.reset = reset;
|
||||||
this.periodicTrafficReset = periodicTrafficReset;
|
|
||||||
this.created_at = created_at;
|
this.created_at = created_at;
|
||||||
this.updated_at = updated_at;
|
this.updated_at = updated_at;
|
||||||
}
|
}
|
||||||
|
@ -2090,7 +2082,6 @@ Inbound.TrojanSettings.Trojan = class extends XrayCommonClass {
|
||||||
subId: this.subId,
|
subId: this.subId,
|
||||||
comment: this.comment,
|
comment: this.comment,
|
||||||
reset: this.reset,
|
reset: this.reset,
|
||||||
periodicTrafficReset: this.periodicTrafficReset,
|
|
||||||
created_at: this.created_at,
|
created_at: this.created_at,
|
||||||
updated_at: this.updated_at,
|
updated_at: this.updated_at,
|
||||||
};
|
};
|
||||||
|
@ -2108,7 +2099,6 @@ Inbound.TrojanSettings.Trojan = class extends XrayCommonClass {
|
||||||
json.subId,
|
json.subId,
|
||||||
json.comment,
|
json.comment,
|
||||||
json.reset,
|
json.reset,
|
||||||
json.periodicTrafficReset,
|
|
||||||
json.created_at,
|
json.created_at,
|
||||||
json.updated_at,
|
json.updated_at,
|
||||||
);
|
);
|
||||||
|
@ -2231,7 +2221,6 @@ Inbound.ShadowsocksSettings.Shadowsocks = class extends XrayCommonClass {
|
||||||
subId = RandomUtil.randomLowerAndNum(16),
|
subId = RandomUtil.randomLowerAndNum(16),
|
||||||
comment = '',
|
comment = '',
|
||||||
reset = 0,
|
reset = 0,
|
||||||
periodicTrafficReset = 'never',
|
|
||||||
created_at = undefined,
|
created_at = undefined,
|
||||||
updated_at = undefined
|
updated_at = undefined
|
||||||
) {
|
) {
|
||||||
|
@ -2247,7 +2236,6 @@ Inbound.ShadowsocksSettings.Shadowsocks = class extends XrayCommonClass {
|
||||||
this.subId = subId;
|
this.subId = subId;
|
||||||
this.comment = comment;
|
this.comment = comment;
|
||||||
this.reset = reset;
|
this.reset = reset;
|
||||||
this.periodicTrafficReset = periodicTrafficReset;
|
|
||||||
this.created_at = created_at;
|
this.created_at = created_at;
|
||||||
this.updated_at = updated_at;
|
this.updated_at = updated_at;
|
||||||
}
|
}
|
||||||
|
@ -2265,7 +2253,6 @@ Inbound.ShadowsocksSettings.Shadowsocks = class extends XrayCommonClass {
|
||||||
subId: this.subId,
|
subId: this.subId,
|
||||||
comment: this.comment,
|
comment: this.comment,
|
||||||
reset: this.reset,
|
reset: this.reset,
|
||||||
periodicTrafficReset: this.periodicTrafficReset,
|
|
||||||
created_at: this.created_at,
|
created_at: this.created_at,
|
||||||
updated_at: this.updated_at,
|
updated_at: this.updated_at,
|
||||||
};
|
};
|
||||||
|
@ -2284,7 +2271,6 @@ Inbound.ShadowsocksSettings.Shadowsocks = class extends XrayCommonClass {
|
||||||
json.subId,
|
json.subId,
|
||||||
json.comment,
|
json.comment,
|
||||||
json.reset,
|
json.reset,
|
||||||
json.periodicTrafficReset,
|
|
||||||
json.created_at,
|
json.created_at,
|
||||||
json.updated_at,
|
json.updated_at,
|
||||||
);
|
);
|
||||||
|
|
|
@ -168,23 +168,5 @@
|
||||||
</template>
|
</template>
|
||||||
<a-input-number v-model.number="client.reset" :min="0"></a-input-number>
|
<a-input-number v-model.number="client.reset" :min="0"></a-input-number>
|
||||||
</a-form-item>
|
</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>
|
</a-form>
|
||||||
{{end}}
|
{{end}}
|
|
@ -44,24 +44,6 @@
|
||||||
<a-input-number v-model.number="dbInbound.totalGB" :min="0"></a-input-number>
|
<a-input-number v-model.number="dbInbound.totalGB" :min="0"></a-input-number>
|
||||||
</a-form-item>
|
</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>
|
<a-form-item>
|
||||||
<template slot="label">
|
<template slot="label">
|
||||||
<a-tooltip>
|
<a-tooltip>
|
||||||
|
@ -79,6 +61,24 @@
|
||||||
<a-select-option value="monthly">{{ i18n "pages.inbounds.periodicTrafficReset.monthly" }}</a-select-option>
|
<a-select-option value="monthly">{{ i18n "pages.inbounds.periodicTrafficReset.monthly" }}</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</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>
|
</a-form>
|
||||||
|
|
||||||
<!-- vmess settings -->
|
<!-- vmess settings -->
|
||||||
|
|
|
@ -122,23 +122,6 @@
|
||||||
</template>
|
</template>
|
||||||
<a-input-number v-model.number="clientsBulkModal.reset" :min="0"></a-input-number>
|
<a-input-number v-model.number="clientsBulkModal.reset" :min="0"></a-input-number>
|
||||||
</a-form-item>
|
</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-form>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
<script>
|
<script>
|
||||||
|
@ -166,7 +149,6 @@
|
||||||
flow: "",
|
flow: "",
|
||||||
delayedStart: false,
|
delayedStart: false,
|
||||||
reset: 0,
|
reset: 0,
|
||||||
periodicTrafficReset: "never",
|
|
||||||
ok() {
|
ok() {
|
||||||
clients = [];
|
clients = [];
|
||||||
method = clientsBulkModal.emailMethod;
|
method = clientsBulkModal.emailMethod;
|
||||||
|
@ -194,7 +176,6 @@
|
||||||
newClient.flow = clientsBulkModal.flow;
|
newClient.flow = clientsBulkModal.flow;
|
||||||
}
|
}
|
||||||
newClient.reset = clientsBulkModal.reset;
|
newClient.reset = clientsBulkModal.reset;
|
||||||
newClient.periodicTrafficReset = clientsBulkModal.periodicTrafficReset;
|
|
||||||
clients.push(newClient);
|
clients.push(newClient);
|
||||||
}
|
}
|
||||||
ObjectUtil.execute(clientsBulkModal.confirm, clients, clientsBulkModal.dbInbound.id);
|
ObjectUtil.execute(clientsBulkModal.confirm, clients, clientsBulkModal.dbInbound.id);
|
||||||
|
@ -226,7 +207,6 @@
|
||||||
this.inbound = dbInbound.toInbound();
|
this.inbound = dbInbound.toInbound();
|
||||||
this.delayedStart = false;
|
this.delayedStart = false;
|
||||||
this.reset = 0;
|
this.reset = 0;
|
||||||
this.periodicTrafficReset = "never";
|
|
||||||
},
|
},
|
||||||
newClient(protocol) {
|
newClient(protocol) {
|
||||||
switch (protocol) {
|
switch (protocol) {
|
||||||
|
|
Loading…
Reference in a new issue