feat: add comment column into clients table and translations for multiple languages

This commit is contained in:
egregors 2025-06-18 18:26:23 +02:00
parent f86219f4de
commit 1ccc79e76c
No known key found for this signature in database
GPG key ID: 78C8DDCC8BB0494A
15 changed files with 58 additions and 1 deletions

View file

@ -50,6 +50,28 @@
<a-badge :class="isClientOnline(client.email)? 'online-animation' : ''" :color="client.enable ? statsExpColor(record, client.email) : themeSwitcher.isDarkTheme ? '#2c3950' : '#bcbcbc'"></a-badge>
</a-tooltip> [[ client.email ]]
</template>
<template slot="comment" slot-scope="text, client">
<template v-if="client.comment && client.comment.trim()">
<a-tooltip :overlay-class-name="themeSwitcher.currentTheme">
<template slot="title">
[[ client.comment ]]
</template>
<span :class="isMobile ? 'comment-cell-mobile' : 'comment-cell'">[[ client.comment ]]</span>
</a-tooltip>
</template>
<span v-else style="color: #ccc;"></span>
</template>
<template slot="comment" slot-scope="text, client">
<template v-if="client.comment && client.comment.trim()">
<a-tooltip :overlay-class-name="themeSwitcher.currentTheme">
<template slot="title">
[[ client.comment ]]
</template>
<span :class="isMobile ? 'comment-cell-mobile' : 'comment-cell'">[[ client.comment ]]</span>
</a-tooltip>
</template>
<span v-else style="color: #ccc;"></span>
</template>
<template slot="traffic" slot-scope="text, client">
<a-popover :overlay-class-name="themeSwitcher.currentTheme">
<template slot="content" v-if="client.email">
@ -168,6 +190,12 @@
<a-popover placement="bottomRight" :overlay-class-name="themeSwitcher.currentTheme" trigger="click">
<template slot="content">
<table>
<tr v-if="client.comment && client.comment.trim()">
<td colspan="3" :style="{ textAlign: 'center', borderBottom: '1px solid #f0f0f0', paddingBottom: '8px', marginBottom: '8px' }">
<div :style="{ fontSize: '0.9em', color: '#666' }">{{ i18n "pages.inbounds.comment" }}</div>
<div :style="{ wordBreak: 'break-word', maxWidth: '250px' }">[[ client.comment ]]</div>
</td>
</tr>
<tr>
<td colspan="3" :style="{ textAlign: 'center' }">{{ i18n "pages.inbounds.traffic" }}</td>
</tr>

View file

@ -79,6 +79,20 @@
max-width: 200px;
overflow: hidden;
}
.comment-cell {
max-width: 150px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
}
.comment-cell-mobile {
max-width: 120px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
}
.online-animation .ant-badge-status-dot {
animation: onlineAnimation 1.2s linear infinite;
}
@ -666,13 +680,15 @@
{ title: '{{ i18n "pages.inbounds.enable" }}', width: 30, scopedSlots: { customRender: 'enable' } },
{ title: '{{ i18n "online" }}', width: 30, scopedSlots: { customRender: 'online' } },
{ title: '{{ i18n "pages.inbounds.client" }}', width: 80, scopedSlots: { customRender: 'client' } },
{ title: '{{ i18n "pages.inbounds.comment" }}', width: 60, scopedSlots: { customRender: 'comment' } },
{ title: '{{ i18n "pages.inbounds.traffic" }}', width: 80, align: 'center', scopedSlots: { customRender: 'traffic' } },
{ title: '{{ i18n "pages.inbounds.expireDate" }}', width: 80, align: 'center', scopedSlots: { customRender: 'expiryTime' } },
];
const innerMobileColumns = [
{ title: '{{ i18n "pages.inbounds.operate" }}', width: 10, align: 'center', scopedSlots: { customRender: 'actionMenu' } },
{ title: '{{ i18n "pages.inbounds.client" }}', width: 90, align: 'left', scopedSlots: { customRender: 'client' } },
{ title: '{{ i18n "pages.inbounds.client" }}', width: 70, align: 'left', scopedSlots: { customRender: 'client' } },
{ title: '{{ i18n "pages.inbounds.comment" }}', width: 20, align: 'left', scopedSlots: { customRender: 'comment' } },
{ title: '{{ i18n "pages.inbounds.info" }}', width: 10, align: 'center', scopedSlots: { customRender: 'info' } },
];

View file

@ -191,6 +191,7 @@
"privatekey" = "المفتاح الخاص"
"clickOnQRcode" = "اضغط على كود QR للنسخ"
"client" = "عميل"
"comment" = "تعليق"
"export" = "تصدير كل الروابط"
"clone" = "استنساخ"
"cloneInbound" = "استنساخ الإدخال"

View file

@ -189,6 +189,7 @@
"privatekey" = "Private Key"
"clickOnQRcode" = "Click on QR Code to Copy"
"client" = "Client"
"comment" = "Comment"
"export" = "Export All URLs"
"clone" = "Clone"
"cloneInbound" = "Clone"

View file

@ -193,6 +193,7 @@
"privatekey" = "Clave Privada"
"clickOnQRcode" = "Haz clic en el Código QR para Copiar"
"client" = "Cliente"
"comment" = "Comentario"
"export" = "Exportar Enlaces"
"clone" = "Clonar"
"cloneInbound" = "Clonar Entradas"

View file

@ -193,6 +193,7 @@
"privatekey" = "کلید خصوصی"
"clickOnQRcode" = "برای کپی بر روی کدتصویری کلیک کنید"
"client" = "کاربر"
"comment" = "نظر"
"export" = "استخراج لینک‌ها"
"clone" = "شبیه‌سازی"
"cloneInbound" = "شبیه‌سازی ورودی"

View file

@ -193,6 +193,7 @@
"privatekey" = "Kunci Pribadi"
"clickOnQRcode" = "Klik pada Kode QR untuk Menyalin"
"client" = "Klien"
"comment" = "Komentar"
"export" = "Ekspor Semua URL"
"clone" = "Duplikat"
"cloneInbound" = "Duplikat"

View file

@ -193,6 +193,7 @@
"privatekey" = "秘密鍵"
"clickOnQRcode" = "QRコードをクリックしてコピー"
"client" = "クライアント"
"comment" = "コメント"
"export" = "リンクエクスポート"
"clone" = "複製"
"cloneInbound" = "複製"

View file

@ -193,6 +193,7 @@
"privatekey" = "Chave Privada"
"clickOnQRcode" = "Clique no Código QR para Copiar"
"client" = "Cliente"
"comment" = "Comentário"
"export" = "Exportar Todos os URLs"
"clone" = "Clonar"
"cloneInbound" = "Clonar"

View file

@ -193,6 +193,7 @@
"privatekey" = "Приватный ключ"
"clickOnQRcode" = "Нажмите на QR-код, чтобы скопировать"
"client" = "Клиент"
"comment" = "Комментарий"
"export" = "Экспорт ссылок"
"clone" = "Клонировать"
"cloneInbound" = "Клонировать"

View file

@ -193,6 +193,7 @@
"privatekey" = "Özel Anahtar"
"clickOnQRcode" = "Kopyalamak için QR Kodu Tıklayın"
"client" = "Müşteri"
"comment" = "Yorum"
"export" = "Tüm URL'leri Dışa Aktar"
"clone" = "Klonla"
"cloneInbound" = "Klonla"

View file

@ -193,6 +193,7 @@
"privatekey" = "Закритий ключ"
"clickOnQRcode" = "Натисніть QR-код, щоб скопіювати"
"client" = "Клієнт"
"comment" = "Коментар"
"export" = "Експортувати всі URL-адреси"
"clone" = "Клон"
"cloneInbound" = "Клонувати"

View file

@ -193,6 +193,7 @@
"privatekey" = "Khóa cá nhân"
"clickOnQRcode" = "Nhấn vào Mã QR để sao chép"
"client" = "Người dùng"
"comment" = "Bình luận"
"export" = "Xuất liên kết"
"clone" = "Sao chép"
"cloneInbound" = "Sao chép điểm vào (Inbound)"

View file

@ -193,6 +193,7 @@
"privatekey" = "私钥"
"clickOnQRcode" = "点击二维码复制"
"client" = "客户"
"comment" = "备注"
"export" = "导出链接"
"clone" = "克隆"
"cloneInbound" = "克隆"

View file

@ -195,6 +195,7 @@
"privatekey" = "私鑰"
"clickOnQRcode" = "點選二維碼複製"
"client" = "客戶"
"comment" = "備註"
"export" = "匯出連結"
"clone" = "複製"
"cloneInbound" = "複製"