Use Vuejs for web UI
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
class Message {
|
||||
constructor(model) {
|
||||
this.author = model.author
|
||||
this.body = model.body
|
||||
this.image = "https://robohash.org/" + model.author
|
||||
}
|
||||
|
||||
toModel() {
|
||||
return {
|
||||
author: this.author(),
|
||||
body: this.body(),
|
||||
image: this.image()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user