Skip to content

Commit b04ec63

Browse files
committed
cosmetic changes
1 parent 832b66e commit b04ec63

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/ui.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
)
1111

1212
// Represents the app version
13-
const appversion = "v1.0.0"
13+
const appversion = "v1.1.0"
1414

1515
// A structure that represents the ChatRoom UI
1616
type UI struct {
@@ -285,25 +285,25 @@ func (ui *UI) handlecommand(cmd uicommand) {
285285

286286
// Unsupported command
287287
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)}
289289
}
290290
}
291291

292292
// A method of UI that displays a message recieved from a peer
293293
func (ui *UI) display_chatmessage(msg chatmessage) {
294-
prompt := fmt.Sprintf("[green]<%s>:[-]", msg.SenderName)
294+
prompt := fmt.Sprintf("[green] %s :[-]", msg.SenderName)
295295
fmt.Fprintf(ui.messageBox, "%s %s\n", prompt, msg.Message)
296296
}
297297

298298
// A method of UI that displays a message recieved from self
299299
func (ui *UI) display_selfmessage(msg string) {
300-
prompt := fmt.Sprintf("[blue]<%s>:[-]", ui.UserName)
300+
prompt := fmt.Sprintf("[blue] %s :[-]", ui.UserName)
301301
fmt.Fprintf(ui.messageBox, "%s %s\n", prompt, msg)
302302
}
303303

304304
// A method of UI that displays a log message
305305
func (ui *UI) display_logmessage(log chatlog) {
306-
prompt := fmt.Sprintf("[yellow]<%s>:[-]", log.logprefix)
306+
prompt := fmt.Sprintf("[yellow] %s :[-]", log.logprefix)
307307
fmt.Fprintf(ui.messageBox, "%s %s\n", prompt, log.logmsg)
308308
}
309309

0 commit comments

Comments
 (0)