Welcome to mirror list, hosted at ThFree Co, Russian Federation.

inbound_client_table.html « xui « html « web - github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 140d7626282af484d87bf54c112fc68c76d32793 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{{define "client_table"}}
<template slot="actions" slot-scope="text, client, index">
    <a-tooltip>
        <template slot="title">{{ i18n "qrCode" }}</template>
        <a-icon style="font-size: 24px;" type="qrcode" v-if="record.hasLink()" @click="showQrcode(record,index);"></a-icon>
    </a-tooltip>
    <a-tooltip>
        <template slot="title">{{ i18n "pages.client.edit" }}</template>
        <a-icon style="font-size: 24px;" type="edit" @click="openEditClient(record.id,client);"></a-icon>
    </a-tooltip>
    <a-tooltip>
        <template slot="title">{{ i18n "info" }}</template>
        <a-icon style="font-size: 24px;" type="info-circle" @click="showInfo(record,index);"></a-icon>
    </a-tooltip>
    <a-tooltip>
        <template slot="title">{{ i18n "pages.inbounds.resetTraffic" }}</template>
        <a-icon style="font-size: 24px;" type="retweet" @click="resetClientTraffic(client,record.id)" v-if="client.email.length > 0"></a-icon>
    </a-tooltip>
    <a-tooltip>
        <template slot="title"><span style="color: #FF4D4F"> {{ i18n "delete"}}</span></template>
        <a-icon style="font-size: 24px;" type="delete" v-if="isRemovable(record.id)" @click="delClient(record.id,client)"></a-icon>
    </a-tooltip>
</template>
<template slot="enable" slot-scope="text, client, index">
    <a-switch v-model="client.enable" @change="switchEnableClient(record.id,client)"></a-switch>
</template>   
<template slot="client" slot-scope="text, client">
    [[ client.email ]]
    <a-tag v-if="!isClientEnabled(record, client.email)" color="red">{{ i18n "depleted" }}</a-tag>
</template>                                    
<template slot="traffic" slot-scope="text, client">
    <a-popover :overlay-class-name="themeSwitcher.darkClass">
        <template slot="content" v-if="client.email">
            <table cellpadding="2" width="100%">
                <tr>
                    <td>↑[[ sizeFormat(getUpStats(record, client.email)) ]]</td>
                    <td>↓[[ sizeFormat(getDownStats(record, client.email)) ]]</td>
                </tr>
                <tr v-if="client.totalGB > 0">
                    <td>{{ i18n "remained" }}</td>
                    <td>[[ sizeFormat(client.totalGB - getUpStats(record, client.email) - getDownStats(record, client.email)) ]]</td>
                </tr>
            </table>
        </template>
        <a-tag :color="statsColor(record, client.email)">
            [[ sizeFormat(getUpStats(record, client.email) + getDownStats(record, client.email)) ]] /
            <template v-if="client.totalGB > 0">[[client._totalGB]]GB</template>
            <template v-else>♾</template>
        </a-tag>
    </a-popover>
</template>                                    
<template slot="expiryTime" slot-scope="text, client, index">
    <template v-if="client.expiryTime > 0">
        <a-tag :color="usageColor(new Date().getTime(), app.expireDiff, client.expiryTime)">
            [[ DateUtil.formatMillis(client._expiryTime) ]]
        </a-tag>
    </template>
    <a-tag v-else-if="client.expiryTime < 0" color="cyan">
        [[ client._expiryTime ]] {{ i18n "pages.client.days" }}
    </a-tag>
    <a-tag v-else color="green">{{ i18n "indefinite" }}</a-tag>
</template>
{{end}}