Skip to content

Commit f299ec0

Browse files
authored
Fix extra port icon (#118529)
* Don't use an icon on the Port add row * Use early return
1 parent 62dbffb commit f299ec0

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/vs/workbench/contrib/remote/browser/tunnelView.ts

+9-2
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,13 @@ class PrivacyColumn implements ITableColumn<ITunnelItem, ActionBarCell> {
268268
['tunnelType', row.tunnelType],
269269
['tunnelCloseable', row.closeable]
270270
];
271-
const label = row.privacy === TunnelPrivacy.Public ? nls.localize('tunnel.privacyPublic', "Public") : nls.localize('tunnel.privacyPrivate', "Private");
271+
let label: string = '';
272272
let tooltip: string = '';
273+
if (row.tunnelType === TunnelType.Add) {
274+
return { label, context, tunnel: row, icon: row.icon, editId: TunnelEditId.None, tooltip };
275+
}
276+
277+
label = row.privacy === TunnelPrivacy.Public ? nls.localize('tunnel.privacyPublic', "Public") : nls.localize('tunnel.privacyPrivate', "Private");
273278
if (row instanceof TunnelItem) {
274279
tooltip = `${row.privacyTooltip} ${row.tooltipPostfix}`;
275280
}
@@ -544,10 +549,12 @@ class TunnelItem implements ITunnelItem {
544549
}
545550

546551
get icon(): ThemeIcon | undefined {
552+
if (this.tunnelType === TunnelType.Add) {
553+
return undefined;
554+
}
547555
switch (this.privacy) {
548556
case TunnelPrivacy.Public: return publicPortIcon;
549557
default: return privatePortIcon;
550-
551558
}
552559
}
553560

0 commit comments

Comments
 (0)