mirror of
https://github.com/luckjiawei/podux.git
synced 2026-11-30 01:26:47 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2985e192a4 |
No files matched your search
@@ -286,7 +286,7 @@
|
||||
"totalProxies": "Total Proxies",
|
||||
"confirmDeletion": "Confirm Deletion",
|
||||
"deleteConfirmMessage": "Are you sure you want to delete this proxy? This action cannot be undone.",
|
||||
"remotePortOrDomain": "Remote Port / Domain",
|
||||
"remotePortOrDomain": "Remote Access",
|
||||
"selectServer": "Select Server",
|
||||
"selectServerPlaceholder": "Select a server",
|
||||
"noServersAvailable": "No servers available",
|
||||
@@ -488,4 +488,4 @@
|
||||
"settingsCreateFailed": "Failed to initialize system settings"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -286,7 +286,7 @@
|
||||
"totalProxies": "代理总数",
|
||||
"confirmDeletion": "确认删除",
|
||||
"deleteConfirmMessage": "您确定要删除此代理吗?此操作无法撤消。",
|
||||
"remotePortOrDomain": "远程端口 / 域名",
|
||||
"remotePortOrDomain": "远程访问",
|
||||
"selectServer": "选择服务器",
|
||||
"selectServerPlaceholder": "选择一个服务器",
|
||||
"noServersAvailable": "没有可用的服务器",
|
||||
@@ -488,4 +488,4 @@
|
||||
"settingsCreateFailed": "初始化系统设置失败"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -314,26 +314,38 @@ export function ProxiesView({
|
||||
</Flex>
|
||||
);
|
||||
}
|
||||
const displayText = proxy.remotePort ? String(proxy.remotePort) : "";
|
||||
if (!displayText)
|
||||
const remotePort = proxy.remotePort ? String(proxy.remotePort) : "";
|
||||
if (!remotePort)
|
||||
return <Text size="2" color="gray">-</Text>;
|
||||
const copyKey = `${proxy.id}-port`;
|
||||
const isCopied = copiedId === copyKey;
|
||||
const serverAddr =
|
||||
(proxy as { expand?: { serverId?: { serverAddr?: string } } }).expand?.serverId?.serverAddr || "";
|
||||
const items = proxy.proxyType === "tcp" || proxy.proxyType === "udp"
|
||||
? [remotePort, serverAddr ? `${serverAddr}:${remotePort}` : ""].filter(Boolean)
|
||||
: [remotePort];
|
||||
return (
|
||||
<Flex
|
||||
align="center"
|
||||
gap="1"
|
||||
style={{ cursor: "pointer" }}
|
||||
onClick={() => handleCopy(displayText, copyKey)}
|
||||
title={isCopied ? t("common.copied") : t("common.clickToCopy")}
|
||||
>
|
||||
<Text size="2">{displayText}</Text>
|
||||
<Icon
|
||||
icon={isCopied ? "lucide:check" : "lucide:copy"}
|
||||
width="12"
|
||||
height="12"
|
||||
color={isCopied ? "var(--green-9)" : "var(--gray-8)"}
|
||||
/>
|
||||
<Flex direction="column" gap="1">
|
||||
{items.map((item, i) => {
|
||||
const copyKey = `${proxy.id}-remote-${i}`;
|
||||
const isCopied = copiedId === copyKey;
|
||||
return (
|
||||
<Flex
|
||||
key={item}
|
||||
align="center"
|
||||
gap="1"
|
||||
style={{ cursor: "pointer" }}
|
||||
onClick={() => handleCopy(item, copyKey)}
|
||||
title={isCopied ? t("common.copied") : t("common.clickToCopy")}
|
||||
>
|
||||
<Text size="2">{item}</Text>
|
||||
<Icon
|
||||
icon={isCopied ? "lucide:check" : "lucide:copy"}
|
||||
width="12"
|
||||
height="12"
|
||||
color={isCopied ? "var(--green-9)" : "var(--gray-8)"}
|
||||
/>
|
||||
</Flex>
|
||||
);
|
||||
})}
|
||||
</Flex>
|
||||
);
|
||||
})()}
|
||||
|
||||
@@ -474,17 +474,26 @@ export function ServerDetailPage() {
|
||||
</Flex>
|
||||
);
|
||||
}
|
||||
const displayText = proxy.remotePort || "-";
|
||||
if (displayText === "-") return <Text size="2" color="gray">-</Text>;
|
||||
const copyKey = `${proxy.id}-port`;
|
||||
const isCopied = copiedId === copyKey;
|
||||
const remotePort = proxy.remotePort || "";
|
||||
if (!remotePort) return <Text size="2" color="gray">-</Text>;
|
||||
const items = proxy.proxyType === "tcp" || proxy.proxyType === "udp"
|
||||
? [remotePort, server?.serverAddr ? `${server.serverAddr}:${remotePort}` : ""].filter(Boolean)
|
||||
: [remotePort];
|
||||
return (
|
||||
<Flex align="center" gap="1" style={{ cursor: "pointer" }}
|
||||
onClick={() => handleCopy(displayText, copyKey)}
|
||||
title={isCopied ? t("common.copied") : t("common.clickToCopy")}>
|
||||
<Text size="2">{displayText}</Text>
|
||||
<Icon icon={isCopied ? "lucide:check" : "lucide:copy"} width="12" height="12"
|
||||
color={isCopied ? "var(--green-9)" : "var(--gray-8)"} />
|
||||
<Flex direction="column" gap="1">
|
||||
{items.map((item, i) => {
|
||||
const copyKey = `${proxy.id}-remote-${i}`;
|
||||
const isCopied = copiedId === copyKey;
|
||||
return (
|
||||
<Flex key={item} align="center" gap="1" style={{ cursor: "pointer" }}
|
||||
onClick={() => handleCopy(item, copyKey)}
|
||||
title={isCopied ? t("common.copied") : t("common.clickToCopy")}>
|
||||
<Text size="2">{item}</Text>
|
||||
<Icon icon={isCopied ? "lucide:check" : "lucide:copy"} width="12" height="12"
|
||||
color={isCopied ? "var(--green-9)" : "var(--gray-8)"} />
|
||||
</Flex>
|
||||
);
|
||||
})}
|
||||
</Flex>
|
||||
);
|
||||
})()}
|
||||
|
||||
Reference in new issue
Block a user