@@ -10,7 +10,7 @@ import (
10
10
)
11
11
12
12
// Represents the app version
13
- const appversion = "v1.0 .0"
13
+ const appversion = "v1.1 .0"
14
14
15
15
// A structure that represents the ChatRoom UI
16
16
type UI struct {
@@ -285,25 +285,25 @@ func (ui *UI) handlecommand(cmd uicommand) {
285
285
286
286
// Unsupported command
287
287
default :
288
- ui .Logs <- chatlog {logprefix : "badcmd " , logmsg : fmt .Sprintf ("unsupported command - %s" , cmd .cmdtype )}
288
+ ui .Logs <- chatlog {logprefix : "🦆 " , logmsg : fmt .Sprintf ("unsupported command - %s" , cmd .cmdtype )}
289
289
}
290
290
}
291
291
292
292
// A method of UI that displays a message recieved from a peer
293
293
func (ui * UI ) display_chatmessage (msg chatmessage ) {
294
- prompt := fmt .Sprintf ("[green]<%s> :[-]" , msg .SenderName )
294
+ prompt := fmt .Sprintf ("[green] %s :[-]" , msg .SenderName )
295
295
fmt .Fprintf (ui .messageBox , "%s %s\n " , prompt , msg .Message )
296
296
}
297
297
298
298
// A method of UI that displays a message recieved from self
299
299
func (ui * UI ) display_selfmessage (msg string ) {
300
- prompt := fmt .Sprintf ("[blue]<%s> :[-]" , ui .UserName )
300
+ prompt := fmt .Sprintf ("[blue] %s :[-]" , ui .UserName )
301
301
fmt .Fprintf (ui .messageBox , "%s %s\n " , prompt , msg )
302
302
}
303
303
304
304
// A method of UI that displays a log message
305
305
func (ui * UI ) display_logmessage (log chatlog ) {
306
- prompt := fmt .Sprintf ("[yellow]<%s> :[-]" , log .logprefix )
306
+ prompt := fmt .Sprintf ("[yellow] %s :[-]" , log .logprefix )
307
307
fmt .Fprintf (ui .messageBox , "%s %s\n " , prompt , log .logmsg )
308
308
}
309
309
0 commit comments