refactor: rename periodicTrafficReset to trafficReset and add lastTrafficResetTime

This commit is contained in:
egregors 2025-09-14 10:21:18 +02:00
parent 09933f845d
commit 52196c014d
No known key found for this signature in database
GPG key ID: 78C8DDCC8BB0494A
4 changed files with 12 additions and 8 deletions

View file

@ -10,7 +10,8 @@ class DBInbound {
this.remark = "";
this.enable = true;
this.expiryTime = 0;
this.periodicTrafficReset = "never";
this.trafficReset = "never";
this.lastTrafficResetTime = 0;
this.listen = "";
this.port = 0;

View file

@ -54,7 +54,7 @@
<a-icon type="question-circle"></a-icon>
</a-tooltip>
</template>
<a-select v-model="dbInbound.periodicTrafficReset" :dropdown-class-name="themeSwitcher.currentTheme">
<a-select v-model="dbInbound.trafficReset" :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>

View file

@ -648,7 +648,7 @@
<tr>
<td>{{ i18n "pages.inbounds.periodicTrafficResetTitle" }}</td>
<td>
<a-tag color="blue">[[ i18n("pages.inbounds.periodicTrafficReset." + dbInbound.periodicTrafficReset) ]]</a-tag>
<a-tag color="blue">[[ i18n("pages.inbounds.periodicTrafficReset." + dbInbound.trafficReset) ]]</a-tag>
</td>
</tr>
</table>
@ -1097,7 +1097,8 @@
remark: dbInbound.remark + " - Cloned",
enable: dbInbound.enable,
expiryTime: dbInbound.expiryTime,
periodicTrafficReset: dbInbound.periodicTrafficReset,
trafficReset: dbInbound.trafficReset,
lastTrafficResetTime: dbInbound.lastTrafficResetTime,
listen: '',
port: RandomUtil.randomInteger(10000, 60000),
@ -1142,7 +1143,8 @@
remark: dbInbound.remark,
enable: dbInbound.enable,
expiryTime: dbInbound.expiryTime,
periodicTrafficReset: dbInbound.periodicTrafficReset,
trafficReset: dbInbound.trafficReset,
lastTrafficResetTime: dbInbound.lastTrafficResetTime,
listen: inbound.listen,
port: inbound.port,
@ -1166,7 +1168,8 @@
remark: dbInbound.remark,
enable: dbInbound.enable,
expiryTime: dbInbound.expiryTime,
periodicTrafficReset: dbInbound.periodicTrafficReset,
trafficReset: dbInbound.trafficReset,
lastTrafficResetTime: dbInbound.lastTrafficResetTime,
listen: inbound.listen,
port: inbound.port,

View file

@ -237,10 +237,10 @@
</a-tooltip>
</td>
</tr>
<tr v-if="infoModal.clientSettings.periodicTrafficReset">
<tr v-if="infoModal.clientSettings.trafficReset">
<td>{{ i18n "pages.inbounds.periodicTrafficResetTitle" }}</td>
<td>
<a-tag color="blue">[[ i18n("pages.inbounds.periodicTrafficReset." + infoModal.clientSettings.periodicTrafficReset) ]]</a-tag>
<a-tag color="blue">[[ i18n("pages.inbounds.periodicTrafficReset." + infoModal.clientSettings.trafficReset) ]]</a-tag>
</td>
</tr>
<tr v-if="app.ipLimitEnable">