diff options
| author | mhsanaei <ho3ein.sanaei@gmail.com> | 2025-09-16 19:28:02 +0300 |
|---|---|---|
| committer | mhsanaei <ho3ein.sanaei@gmail.com> | 2025-09-16 19:28:02 +0300 |
| commit | dc21f419327dce4bdb2e8b1f2ce37b2e19cb5e10 (patch) | |
| tree | 529e7d45b17545f6ec5e2eb092eb49b8c95db50f /web/html/modals/inbound_info_modal.html | |
| parent | f137b1af76c0a6206ea792a39467646f73b043cb (diff) | |
bug fix: del Depleted
Diffstat (limited to 'web/html/modals/inbound_info_modal.html')
| -rw-r--r-- | web/html/modals/inbound_info_modal.html | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/web/html/modals/inbound_info_modal.html b/web/html/modals/inbound_info_modal.html index 8b825ca8..5112ec1c 100644 --- a/web/html/modals/inbound_info_modal.html +++ b/web/html/modals/inbound_info_modal.html @@ -180,9 +180,9 @@ <tr> <td>{{ i18n "status" }}</td> <td> - <a-tag v-if="isEnable" color="green">{{ i18n "enabled" }}</a-tag> - <a-tag v-else>{{ i18n "disabled" }}</a-tag> - <a-tag v-if="!isActive" color="red">{{ i18n "depleted" }}</a-tag> + <a-tag v-if="isEnable && isActive && !isDepleted" color="green">{{ i18n "enabled" }}</a-tag> + <a-tag v-if="!isEnable && !isDepleted">{{ i18n "disabled" }}</a-tag> + <a-tag v-if="isDepleted" color="red">{{ i18n "depleted" }}</a-tag> </td> </tr> <tr v-if="infoModal.clientStats"> @@ -587,6 +587,14 @@ } return infoModal.dbInbound.isEnable; }, + get isDepleted() { + const stats = this.infoModal.clientStats; + if (!stats) return false; + const now = new Date().getTime(); + const expired = stats.expiryTime > 0 && now >= stats.expiryTime; + const exhausted = stats.total > 0 && (stats.up + stats.down) >= stats.total; + return expired || exhausted; + }, }, methods: { copy(content) { |
