57f78ee0d4
Better edit/remove buttons Spacing More loading Add loading Better dates formatting Add editing comments Move closing delete modal to finally Add delete comments Add keycode modifier Comment styling Comment form Add basic task comments functionality Co-authored-by: kolaente <k@knt.li> Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/66
25 lines
No EOL
516 B
JavaScript
25 lines
No EOL
516 B
JavaScript
import AbstractModel from './abstractModel'
|
|
|
|
export default class UserModel extends AbstractModel {
|
|
constructor(data) {
|
|
super(data)
|
|
this.created = new Date(this.created)
|
|
this.updated = new Date(this.updated)
|
|
}
|
|
|
|
defaults() {
|
|
return {
|
|
id: 0,
|
|
avatar: '',
|
|
email: '',
|
|
username: '',
|
|
created: null,
|
|
updated: null,
|
|
}
|
|
}
|
|
|
|
getAvatarUrl(size = 50) {
|
|
const avatarUrl = this.avatar !== '' ? this.avatar : this.avatarUrl
|
|
return `https://www.gravatar.com/avatar/${avatarUrl}?s=${size}&d=mp`
|
|
}
|
|
} |