mirror of
https://github.com/plankanban/planka.git
synced 2025-07-19 13:19:44 +02:00
Add project backgrounds
This commit is contained in:
parent
fb9ceb5db7
commit
2f7a244807
67 changed files with 774 additions and 210 deletions
|
@ -15,6 +15,15 @@ module.exports = {
|
|||
type: 'string',
|
||||
required: true,
|
||||
},
|
||||
background: {
|
||||
type: 'json',
|
||||
},
|
||||
backgroundImageDirname: {
|
||||
type: 'string',
|
||||
isNotEmptyString: true,
|
||||
allowNull: true,
|
||||
columnName: 'background_image_dirname',
|
||||
},
|
||||
|
||||
// ╔═╗╔╦╗╔╗ ╔═╗╔╦╗╔═╗
|
||||
// ║╣ ║║║╠╩╗║╣ ║║╚═╗
|
||||
|
@ -34,4 +43,14 @@ module.exports = {
|
|||
via: 'projectId',
|
||||
},
|
||||
},
|
||||
|
||||
customToJSON() {
|
||||
return {
|
||||
..._.omit(this, ['backgroundImageDirname']),
|
||||
backgroundImage: this.backgroundImageDirname && {
|
||||
url: `${sails.config.custom.projectBackgroundImagesUrl}/${this.backgroundImageDirname}/original.jpg`,
|
||||
coverUrl: `${sails.config.custom.projectBackgroundImagesUrl}/${this.backgroundImageDirname}/cover-336.jpg`,
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue