mirror of
https://github.com/plankanban/planka.git
synced 2025-07-18 20:59:44 +02:00
feat: Preserve original format of images, change interpolation kernel
Closes #349
This commit is contained in:
parent
73abed65b5
commit
05b57142f9
17 changed files with 212 additions and 103 deletions
|
@ -37,11 +37,8 @@ module.exports = {
|
|||
regex: /^[a-zA-Z0-9]+((_|\.)?[a-zA-Z0-9])*$/,
|
||||
allowNull: true,
|
||||
},
|
||||
avatarDirname: {
|
||||
type: 'string',
|
||||
isNotEmptyString: true,
|
||||
allowNull: true,
|
||||
columnName: 'avatar_dirname',
|
||||
avatar: {
|
||||
type: 'json',
|
||||
},
|
||||
phone: {
|
||||
type: 'string',
|
||||
|
@ -106,10 +103,10 @@ module.exports = {
|
|||
|
||||
customToJSON() {
|
||||
return {
|
||||
..._.omit(this, ['password', 'avatarDirname', 'passwordChangedAt']),
|
||||
..._.omit(this, ['password', 'avatar', 'passwordChangedAt']),
|
||||
avatarUrl:
|
||||
this.avatarDirname &&
|
||||
`${sails.config.custom.userAvatarsUrl}/${this.avatarDirname}/square-100.jpg`,
|
||||
this.avatar &&
|
||||
`${sails.config.custom.userAvatarsUrl}/${this.avatar.dirname}/square-100.${this.avatar.extension}`,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue