Skip to content

Commit

Permalink
fix remained traffic in info
Browse files Browse the repository at this point in the history
Co-Authored-By: Alireza Ahmadi <[email protected]>
  • Loading branch information
MHSanaei and alireza0 committed Mar 13, 2024
1 parent 1e2be10 commit 14d04e8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions web/html/xui/inbound_info_modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
<tr>
<td>
<a-tag v-if="infoModal.clientStats && infoModal.clientSettings.totalGB > 0" :color="statsColor(infoModal.clientStats)">
[[ sizeFormat(infoModal.clientSettings.totalGB - infoModal.clientStats.up - infoModal.clientStats.down) ]]
[[ getRemStats() ]]
</a-tag>
</td>
<td>
Expand Down Expand Up @@ -423,7 +423,11 @@
},
statsColor(stats) {
return usageColor(stats.up + stats.down, app.trafficDiff, stats.total);
}
},
getRemStats() {
remained = this.infoModal.clientStats.total - this.infoModal.clientStats.up - this.infoModal.clientStats.down;
return remained>0 ? sizeFormat(remained) : '-';
},
},

});
Expand Down
4 changes: 2 additions & 2 deletions web/html/xui/xray.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
<a-space direction="vertical">
<a-card hoverable style="margin-bottom: .5rem;">
<a-row style="display: flex; flex-wrap: wrap; align-items: center;">
<a-col :xs="24" :sm="8" style="padding: 4px;">
<a-col :xs="24" :sm="10" style="padding: 4px;">
<a-space direction="horizontal">
<a-button type="primary" :disabled="saveBtnDisable" @click="updateXraySetting">{{ i18n "pages.xray.save" }}</a-button>
<a-button type="danger" :disabled="!saveBtnDisable" @click="restartXray">{{ i18n "pages.xray.restart" }}</a-button>
Expand All @@ -89,7 +89,7 @@
</a-popover>
</a-space>
</a-col>
<a-col :xs="24" :sm="16">
<a-col :xs="24" :sm="14">
<template>
<div>
<a-back-top :target="() => document.getElementById('content-layout')" visibility-height="200">
Expand Down

0 comments on commit 14d04e8

Please sign in to comment.