@@ -116,37 +116,29 @@ const ConnectionView = (): JSX.Element => {
116
116
link . click ( ) ;
117
117
} ;
118
118
119
- const formatLog = (
120
- msg : ConnectionStatusUpdate ,
121
- remoteAddr : string
122
- ) : SimplifiedLog => {
119
+ const formatLog = ( msg : ConnectionStatusUpdate ) : SimplifiedLog => {
123
120
const date = msg . ts ?. toLocaleTimeString ( ) || '' ;
124
121
const status = msg . lastError ? 'error' : 'info' ;
125
122
let message = '' ;
126
123
127
124
switch ( msg . status ) {
128
125
case 1 :
129
- message = msg . peerAddr + ' opening connection to ' + remoteAddr ;
126
+ message = 'Connecting to Pomerium...' ;
130
127
break ;
131
128
case 2 :
132
- message =
133
- msg . peerAddr +
134
- ' authentication with ' +
135
- msg . authUrl +
136
- ' required for ' +
137
- remoteAddr ;
129
+ message = `Authentication required, web browser was open` ;
138
130
break ;
139
131
case 3 :
140
- message = msg . peerAddr + ' connected to ' + remoteAddr ;
132
+ message = 'Connected to Pomerium' ;
141
133
break ;
142
134
case 4 :
143
- message = msg . peerAddr + ' disconnected from ' + remoteAddr ;
135
+ message = 'Disconnected from Pomerium' ;
144
136
break ;
145
137
case 5 :
146
- message = 'Listener opened ' ;
138
+ message = 'Listening for new connections ' ;
147
139
break ;
148
140
case 6 :
149
- message = 'Listener closed connection to ' + remoteAddr ;
141
+ message = 'Stop listening for new connections' ;
150
142
break ;
151
143
default :
152
144
break ;
@@ -179,7 +171,7 @@ const ConnectionView = (): JSX.Element => {
179
171
}
180
172
} ) ;
181
173
ipcRenderer . on ( LISTENER_LOG , ( _ , args ) => {
182
- setLogs ( ( oldLogs ) => [ formatLog ( args . msg , args . remoteAddr ) , ...oldLogs ] ) ;
174
+ setLogs ( ( oldLogs ) => [ formatLog ( args . msg ) , ...oldLogs ] ) ;
183
175
} ) ;
184
176
ipcRenderer . on ( EXPORT , ( _ , args ) => {
185
177
if ( args . err ) {
0 commit comments