diff --git a/src/components/connections/ConnectionCard.tsx b/src/components/connections/ConnectionCard.tsx index 4aae90bf..1a122535 100644 --- a/src/components/connections/ConnectionCard.tsx +++ b/src/components/connections/ConnectionCard.tsx @@ -13,6 +13,7 @@ import type { Connection } from '@/types' import { ArrowDownCircleIcon, ArrowDownIcon, + ArrowRightCircleIcon, ArrowUpCircleIcon, ArrowUpIcon, InformationCircleIcon, @@ -55,45 +56,50 @@ export default defineComponent<{ ), [CONNECTIONS_TABLE_ACCESSOR_KEY.Rule]: ( - {!props.conn.rulePayload - ? props.conn.rule - : `${props.conn.rule} -> ${props.conn.rulePayload}`} + {props.conn.rule} + {props.conn.rulePayload && <>: {props.conn.rulePayload}>} ), [CONNECTIONS_TABLE_ACCESSOR_KEY.Process]: ( {getProcessFromConnection(props.conn)} ), [CONNECTIONS_TABLE_ACCESSOR_KEY.Chains]: ( - - {last(props.conn.chains)}=>{first(props.conn.chains)} + + {last(props.conn.chains)} + {last(props.conn.chains) !== first(props.conn.chains) && ( + <> + + {first(props.conn.chains)} + > + )} ), [CONNECTIONS_TABLE_ACCESSOR_KEY.Download]: ( - + {prettyBytesHelper(props.conn.download)} - + ), [CONNECTIONS_TABLE_ACCESSOR_KEY.Upload]: ( - + {prettyBytesHelper(props.conn.upload)} - + ), [CONNECTIONS_TABLE_ACCESSOR_KEY.DlSpeed]: ( - + {prettyBytesHelper(props.conn.downloadSpeed)}/s - + ), [CONNECTIONS_TABLE_ACCESSOR_KEY.UlSpeed]: ( - + {prettyBytesHelper(props.conn.uploadSpeed)}/s - + ), [CONNECTIONS_TABLE_ACCESSOR_KEY.ConnectTime]: ( - {fromNow(props.conn.start)} + {fromNow(props.conn.start)} ), [CONNECTIONS_TABLE_ACCESSOR_KEY.Details]: ( [] = [ header: () => t('rule'), id: CONNECTIONS_TABLE_ACCESSOR_KEY.Rule, accessorFn: (original) => - !original.rulePayload ? original.rule : `${original.rule} -> ${original.rulePayload}`, + !original.rulePayload ? original.rule : `${original.rule}: ${original.rulePayload}`, }, { header: () => t('chains'), id: CONNECTIONS_TABLE_ACCESSOR_KEY.Chains, - accessorFn: (original) => original.chains.slice().reverse().join(' -> '), + accessorFn: (original) => original.chains.join(','), + cell: ({ row }) => { + const chains: VNode[] = [] + + row.original.chains.forEach((chain, index) => { + chains.push(h('span', chain)) + + if (index < row.original.chains.length - 1) { + chains.push( + h(ArrowRightCircleIcon, { + class: 'h-4 w-4', + }), + ) + } + }) + + return h( + 'div', + { + class: 'inline-flex items-center gap-1', + }, + chains, + ) + }, }, { header: () => t('connectTime'), diff --git a/src/components/proxies/ProxyGroup.vue b/src/components/proxies/ProxyGroup.vue index 41bdb16b..030ff737 100644 --- a/src/components/proxies/ProxyGroup.vue +++ b/src/components/proxies/ProxyGroup.vue @@ -22,7 +22,7 @@ @click.stop="handlerLatencyTest" /> - + diff --git a/src/components/rules/RuleCard.vue b/src/components/rules/RuleCard.vue index bf70929d..6823e312 100644 --- a/src/components/rules/RuleCard.vue +++ b/src/components/rules/RuleCard.vue @@ -22,12 +22,17 @@ - {{ latency }}ms + {{ latency }}ms