mirror of
https://github.com/alireza0/x-ui.git
synced 2026-03-21 00:05:49 +00:00
add clientStats to view
This commit is contained in:
@@ -71,9 +71,15 @@
|
||||
<a-date-picker :show-time="{ format: 'HH:mm' }" format="YYYY-MM-DD HH:mm"
|
||||
v-model="vmess._expiryTime" style="width: 300px;"></a-date-picker>
|
||||
</a-form-item>
|
||||
|
||||
<!--Add Svg Icon-->
|
||||
<svg
|
||||
<a-form layout="inline">
|
||||
<a-tag color="blue">[[ sizeFormat(getUpStats(vmess.email)) ]] / [[ sizeFormat(getDownStats(vmess.email)) ]]</a-tag>
|
||||
<a-form v-if="vmess.totalGB > 0">
|
||||
<a-tag color="red">used : [[ sizeFormat(getUpStats(vmess.email) + getDownStats(vmess.email)) ]]</a-tag>
|
||||
</a-form>
|
||||
</a-form>
|
||||
|
||||
<!--Add Svg Icon-->
|
||||
<svg
|
||||
|
||||
@click="addClient(inbound.protocol,vmess, inbound.settings.vmesses)"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
|
||||
@@ -115,6 +115,17 @@
|
||||
isExpiry(index) {
|
||||
return this.inbound.isExpiry(index)
|
||||
},
|
||||
getUpStats(email) {
|
||||
console.log(email,this.inbound.clientStats[email])
|
||||
if(this.inbound.clientStats[email])
|
||||
return this.inbound.clientStats[email]["Up"]
|
||||
|
||||
},
|
||||
getDownStats(email) {
|
||||
if(this.inbound.clientStats[email])
|
||||
return this.inbound.clientStats[email]["Down"]
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user