inbounds_client_row.html 1.4 KB

12345678910111213141516171819202122
  1. {{define "form/client_row"}}
  2. <template slot="client" slot-scope="text, client">
  3. [[ client.email ]]
  4. <a-tag v-if="!isClientEnabled(record, client.email)" color="red"> expired</a-tag>
  5. </template>
  6. <template slot="traffic" slot-scope="text, client">
  7. <a-tag v-if="client._totalGB === 0" color="blue">{{ i18n "used" }}: [[ sizeFormat(getUpStats(record, client.email) + getDownStats(record, client.email)) ]]</a-tag>
  8. <a-tag v-if="client._totalGB > 0 && !isTrafficExhausted(record, client.email)" color="green">{{ i18n "used" }}: [[ sizeFormat(getUpStats(record, client.email) + getDownStats(record, client.email)) ]] / [[client._totalGB]]GB</a-tag>
  9. <a-tag v-if="client._totalGB > 0 && isTrafficExhausted(record, client.email)" color="red">{{ i18n "used" }}: [[ sizeFormat(getUpStats(record, client.email) + getDownStats(record, client.email)) ]] / [[client._totalGB]]GB</a-tag>
  10. </template>
  11. <template slot="expiryTime" slot-scope="text, client, index">
  12. <template v-if="client._expiryTime > 0">
  13. <a-tag v-if="isExpiry(record, index)" color="red">
  14. [[ DateUtil.formatMillis(client._expiryTime) ]]
  15. </a-tag>
  16. <a-tag v-else color="blue">
  17. [[ DateUtil.formatMillis(client._expiryTime) ]]
  18. </a-tag>
  19. </template>
  20. <a-tag v-else color="green">{{ i18n "indefinite" }}</a-tag>
  21. </template>
  22. {{end}}