@@ -39,6 +39,7 @@ import kotlinx.coroutines.cancel
39
39
import kotlinx.coroutines.launch
40
40
import java.awt.Dimension
41
41
import javax.swing.JComponent
42
+ import javax.swing.JLabel
42
43
import javax.swing.event.DocumentEvent
43
44
44
45
class CoderGatewayRecentWorkspaceConnectionsView : GatewayRecentConnections , Disposable {
@@ -62,36 +63,42 @@ class CoderGatewayRecentWorkspaceConnectionsView : GatewayRecentConnections, Dis
62
63
label(CoderGatewayBundle .message(" gateway.connector.recentconnections.title" )).applyToComponent {
63
64
font = JBFont .h3().asBold()
64
65
}
65
- label(" " ).resizableColumn().horizontalAlign(HorizontalAlign .FILL )
66
- searchBar = cell(SearchTextField (false )).applyToComponent {
67
- minimumSize = Dimension (350 , - 1 )
68
- textEditor.border = JBUI .Borders .empty(2 , 5 , 2 , 0 )
69
- addDocumentListener(object : DocumentAdapter () {
70
- override fun textChanged (e : DocumentEvent ) {
71
- val toSearchFor = this @applyToComponent.text
72
- val filteredConnections = recentConnectionsService.getAllRecentConnections().filter { it.coderWorkspaceHostname?.toLowerCase()?.contains(toSearchFor) ? : false || it.projectPath?.toLowerCase()?.contains(toSearchFor) ? : false }
73
- updateContentView(filteredConnections.groupBy { it.coderWorkspaceHostname })
74
- }
75
- })
76
- }.component
66
+ panel {
67
+ indent {
68
+ row {
69
+ cell(JLabel ()).resizableColumn().horizontalAlign(HorizontalAlign .FILL )
70
+ searchBar = cell(SearchTextField (false )).resizableColumn().horizontalAlign(HorizontalAlign .FILL ).applyToComponent {
71
+ minimumSize = Dimension (350 , - 1 )
72
+ textEditor.border = JBUI .Borders .empty(2 , 5 , 2 , 0 )
73
+ addDocumentListener(object : DocumentAdapter () {
74
+ override fun textChanged (e : DocumentEvent ) {
75
+ val toSearchFor = this @applyToComponent.text
76
+ val filteredConnections = recentConnectionsService.getAllRecentConnections().filter { it.coderWorkspaceHostname?.toLowerCase()?.contains(toSearchFor) ? : false || it.projectPath?.toLowerCase()?.contains(toSearchFor) ? : false }
77
+ updateContentView(filteredConnections.groupBy { it.coderWorkspaceHostname })
78
+ }
79
+ })
80
+ }.component
77
81
78
- actionButton(
79
- object : DumbAwareAction (CoderGatewayBundle .message(" gateway.connector.recentconnections.new.wizard.button.tooltip" ), null , AllIcons .General .Add ) {
80
- override fun actionPerformed (e : AnActionEvent ) {
81
- rootPanel.apply {
82
- removeAll()
83
- addToCenter(CoderGatewayConnectorWizardWrapperView {
84
- rootPanel.apply {
85
- removeAll()
86
- addToCenter(contentPanel)
87
- updateUI()
82
+ actionButton(
83
+ object : DumbAwareAction (CoderGatewayBundle .message(" gateway.connector.recentconnections.new.wizard.button.tooltip" ), null , AllIcons .General .Add ) {
84
+ override fun actionPerformed (e : AnActionEvent ) {
85
+ rootPanel.apply {
86
+ removeAll()
87
+ addToCenter(CoderGatewayConnectorWizardWrapperView {
88
+ rootPanel.apply {
89
+ removeAll()
90
+ addToCenter(contentPanel)
91
+ updateUI()
92
+ }
93
+ }.component)
94
+ updateUI()
95
+ }
88
96
}
89
- }.component)
90
- updateUI()
91
- }
97
+ },
98
+ ).gap(RightGap .SMALL )
92
99
}
93
- },
94
- ).gap( RightGap . SMALL )
100
+ }
101
+ }
95
102
}.bottomGap(BottomGap .MEDIUM )
96
103
separator(background = WelcomeScreenUIManager .getSeparatorColor())
97
104
row {
0 commit comments