summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzephyr <[email protected]>2023-06-21 18:32:56 +0800
committerzephyr <[email protected]>2023-06-21 18:32:56 +0800
commit58d86c147440fa12d4f1c48c754efc2b273b48c1 (patch)
tree9e773929d5aa56f4a0767a49dce878821393787a /src
parente940712331c9bccd789eb5f02a1f1ee69cbd9085 (diff)
feat: client tag
Diffstat (limited to 'src')
-rw-r--r--src/components/Connections.tsx12
-rw-r--r--src/i18n/en.ts4
-rw-r--r--src/i18n/zh-cn.ts4
-rw-r--r--src/i18n/zh-tw.ts4
4 files changed, 18 insertions, 6 deletions
diff --git a/src/components/Connections.tsx b/src/components/Connections.tsx
index c7a9b37..b380ea1 100644
--- a/src/components/Connections.tsx
+++ b/src/components/Connections.tsx
@@ -111,7 +111,7 @@ function getNameFromSource(source: string, sourceMap: { reg: string; name: strin
const regExp = new RegExp(reg, 'g');
if (regExp.test(source) && name) {
- sourceName = name;
+ sourceName = `${name}(${source})`;
}
});
@@ -280,8 +280,8 @@ function Conn({ apiConfig }) {
<table>
<thead>
<tr>
- <th>源IP</th>
- <th>设备名</th>
+ <th>{t('c_source')}</th>
+ <th>{t('device_name')}</th>
</tr>
</thead>
<tbody>
@@ -306,12 +306,12 @@ function Conn({ apiConfig }) {
/>
</td>
<td>
- <Button onClick={() => sourceMap.splice(index, 1)}>删除</Button>
+ <Button onClick={() => sourceMap.splice(index, 1)}>{t('delete')}</Button>
</td>
</tr>
))}
</tbody>
- <Button onClick={() => sourceMap.push({ reg: '', name: '' })}>添加规则</Button>
+ <Button onClick={() => sourceMap.push({ reg: '', name: '' })}>{t('add_tag')}</Button>
</table>
</BaseModal>
<div className={s.header}>
@@ -353,7 +353,7 @@ function Conn({ apiConfig }) {
</TabList>
<div>
- <Button onClick={openModalSource}>IP地址备注</Button>
+ <Button onClick={openModalSource}>{t('client_tag')}</Button>
<Button onClick={() => setFilterSourceIpStr('')} kind="minimal">
{t('All')}
</Button>
diff --git a/src/i18n/en.ts b/src/i18n/en.ts
index f9e9785..6ca6425 100644
--- a/src/i18n/en.ts
+++ b/src/i18n/en.ts
@@ -68,4 +68,8 @@ export const data = {
close_all_confirm_no: 'No',
manage_column: 'Custom columns',
reset_column: 'Reset columns',
+ device_name: 'Device Tag',
+ delete: 'Delete',
+ add_tag: 'Add tag',
+ client_tag: 'Client tags',
};
diff --git a/src/i18n/zh-cn.ts b/src/i18n/zh-cn.ts
index 0b47139..bac5ccf 100644
--- a/src/i18n/zh-cn.ts
+++ b/src/i18n/zh-cn.ts
@@ -69,4 +69,8 @@ export const data = {
close_all_confirm_no: '取消',
manage_column: '管理列',
reset_column: '重置列',
+ device_name: '设备名',
+ delete: '删除',
+ add_tag: '添加标签',
+ client_tag: '客户端标签',
};
diff --git a/src/i18n/zh-tw.ts b/src/i18n/zh-tw.ts
index 4467552..18049d4 100644
--- a/src/i18n/zh-tw.ts
+++ b/src/i18n/zh-tw.ts
@@ -68,4 +68,8 @@ export const data = {
close_all_confirm_no: '取消',
manage_column: '管理列',
reset_column: '重置列',
+ device_name: '设备名',
+ delete: '删除',
+ add_tag: '添加标签',
+ client_tag: '客户端标签',
};