Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1ae6015

Browse files
committed
address PR comment
1 parent2f0180e commit1ae6015

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

‎site/src/modules/resources/AgentDevcontainerCard.tsx‎

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
importLinkfrom"@mui/material/Link";
22
importTooltip,{typeTooltipProps}from"@mui/material/Tooltip";
3-
importtype{
4-
Workspace,
5-
WorkspaceAgentDevcontainer,
6-
WorkspaceAgentDevcontainerPort,
7-
}from"api/typesGenerated";
3+
importtype{Workspace,WorkspaceAgentDevcontainer}from"api/typesGenerated";
84
import{ExternalLinkIcon}from"lucide-react";
95
importtype{FC}from"react";
106
import{portForwardURL}from"utils/portForward";
@@ -58,6 +54,16 @@ export const AgentDevcontainerCard: FC<AgentDevcontainerCardProps> = ({
5854
consthelperText=hasHostBind
5955
?`${port.host_ip}:${port.host_port}`
6056
:"Not bound to host";
57+
constlinkDest=hasHostBind
58+
?portForwardURL(
59+
wildcardHostname,
60+
port.host_port!,
61+
agentName,
62+
workspace.name,
63+
workspace.owner_name,
64+
location.protocol==="https" ?"https" :"http",
65+
)
66+
:"";
6167
return(
6268
<Tooltipkey={portLabel}title={helperText}>
6369
<span>
@@ -68,14 +74,7 @@ export const AgentDevcontainerCard: FC<AgentDevcontainerCardProps> = ({
6874
underline="none"
6975
startIcon={<ExternalLinkIconclassName="size-icon-sm"/>}
7076
disabled={!hasHostBind}
71-
href={portForwardURL(
72-
wildcardHostname,
73-
port.host_port!,
74-
agentName,
75-
workspace.name,
76-
workspace.owner_name,
77-
location.protocol==="https" ?"https" :"http",
78-
)}
77+
href={linkDest}
7978
>
8079
{portLabel}
8180
</Link>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp