File tree 2 files changed +9
-2
lines changed
gitpod-web/portsview/src/porttable
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -38,8 +38,9 @@ export type GitpodAnalyticsEvent =
38
38
action : 'share' | 'stop-sharing' | 'stop' | 'snapshot' | 'extend-timeout' ;
39
39
} > |
40
40
GAET < 'vscode_execute_command_gitpod_ports' , {
41
- action : 'private' | 'public' | 'preview' | 'openBrowser' ;
41
+ action : 'private' | 'public' | 'preview' | 'openBrowser' | 'urlCopy' ;
42
42
isWebview ?: boolean ;
43
+ userOverride ?: string ; // 'true' | 'false'
43
44
} > |
44
45
GAET < 'vscode_execute_command_gitpod_config' , {
45
46
action : 'remove' | 'add' ;
Original file line number Diff line number Diff line change 36
36
function onHoverCommand(command : string ) {
37
37
dispatch (" command" , { command: command as PortCommand , port });
38
38
}
39
+ function openAddr(e : Event ) {
40
+ e .preventDefault ();
41
+ if (port .status .exposed .url ) {
42
+ dispatch (" command" , { command: " openBrowser" as PortCommand , port });
43
+ }
44
+ }
39
45
</script >
40
46
41
47
<HoverOptions
45
51
onHoverCommand (e .detail );
46
52
}}
47
53
>
48
- <a href ={port .status .exposed .url }>{port .status .exposed .url }</a >
54
+ <a on:click ={( e ) => { openAddr ( e ) }} href ={port .status .exposed .url }>{port .status .exposed .url }</a >
49
55
</HoverOptions >
50
56
51
57
<style >
You can’t perform that action at this time.
0 commit comments