From c09c5b85aa61e8870abcaa861057897cf913ab8e Mon Sep 17 00:00:00 2001 From: Zephyruso <176294927+Zephyruso@users.noreply.github.com> Date: Mon, 6 Jan 2025 18:23:37 +0800 Subject: [PATCH] fix: replace -> --- src/components/connections/ConnectionCard.tsx | 34 +++++++++++-------- .../connections/ConnectionTable.vue | 30 ++++++++++++++-- src/components/proxies/ProxyGroup.vue | 2 +- src/components/rules/RuleCard.vue | 7 +++- src/components/settings/SourceIPLabels.vue | 4 +-- 5 files changed, 56 insertions(+), 21 deletions(-) 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]: (
-
+
- {{ latency }}ms + {{ latency }}ms