3x-ui/web/html/xui/inbounds_client_row.html

35 lines
1.8 KiB
HTML
Raw Normal View History

2023-02-12 16:50:09 +03:00
{{define "client_row"}}
<template slot="actions" slot-scope="text, client, index">
<a-dropdown>
<a-icon @click="e => e.preventDefault()" type="menu"></a-icon>
<template #overlay>
<a-menu>
<a-menu-item v-if="record.hasLink()" @click="showQrcode(record,index);"><a-icon type="qrcode"></a-icon>{{ i18n "qrCode" }}</a-menu-item>
<a-menu-item @click="showInfo(record,index);"><a-icon type="info-circle"></a-icon>{{ i18n "info" }}</a-menu-item>
<a-menu-item @click="resetClientTraffic(client,record,$event)" v-if="client.email != ''"><a-icon type="retweet"></a-icon>{{ i18n "pages.inbounds.resetTraffic" }}</a-menu-item>
</a-menu>
</template>
</a-dropdown>
</template>
2023-02-09 22:18:06 +03:00
<template slot="client" slot-scope="text, client">
[[ client.email ]]
2023-02-12 16:50:09 +03:00
<a-tag v-if="!isClientEnabled(record, client.email)" color="red">{{ i18n "disabled" }}</a-tag>
</template>
2023-02-09 22:18:06 +03:00
<template slot="traffic" slot-scope="text, client">
2023-02-16 18:58:20 +03:00
<a-tag color="blue">[[ sizeFormat(getUpStats(record, client.email)) ]] / [[ sizeFormat(getDownStats(record, client.email)) ]]</a-tag>
<template v-if="client._totalGB > 0">
<a-tag v-if="isTrafficExhausted(record, client.email)" color="red">[[client._totalGB]]GB</a-tag>
<a-tag v-else color="cyan">[[client._totalGB]]GB</a-tag>
</template>
<a-tag v-else color="green">{{ i18n "indefinite" }}</a-tag>
</template>
2023-02-09 22:18:06 +03:00
<template slot="expiryTime" slot-scope="text, client, index">
<template v-if="client._expiryTime > 0">
2023-02-16 18:58:20 +03:00
<a-tag :color="isExpiry(record, index)? 'red' : 'blue'">
2023-02-09 22:18:06 +03:00
[[ DateUtil.formatMillis(client._expiryTime) ]]
</a-tag>
</template>
<a-tag v-else color="green">{{ i18n "indefinite" }}</a-tag>
</template>
{{end}}