mirror of
https://github.com/plankanban/planka.git
synced 2025-07-19 13:19:44 +02:00
ref: Collapse image data into one column
This commit is contained in:
parent
fe9fdc0191
commit
39fec45a7f
10 changed files with 102 additions and 86 deletions
|
@ -57,11 +57,8 @@ const Attachments = React.memo(
|
|||
}, [toggleAllVisible]);
|
||||
|
||||
const galleryItemsNode = items.map((item, index) => {
|
||||
const props = item.coverUrl
|
||||
? {
|
||||
width: item.imageWidth,
|
||||
height: item.imageHeight,
|
||||
}
|
||||
const props = item.image
|
||||
? item.image
|
||||
: {
|
||||
content: (
|
||||
<Grid verticalAlign="middle" className={styles.contentWrapper}>
|
||||
|
@ -91,7 +88,7 @@ const Attachments = React.memo(
|
|||
createdAt={item.createdAt}
|
||||
isCover={item.isCover}
|
||||
isPersisted={item.isPersisted}
|
||||
onClick={item.coverUrl ? open : undefined}
|
||||
onClick={item.image ? open : undefined}
|
||||
onCoverSelect={() => handleCoverSelect(item.id)}
|
||||
onCoverDeselect={handleCoverDeselect}
|
||||
onUpdate={(data) => handleUpdate(item.id, data)}
|
||||
|
|
|
@ -9,6 +9,7 @@ export default class extends Model {
|
|||
id: attr(),
|
||||
url: attr(),
|
||||
coverUrl: attr(),
|
||||
image: attr(),
|
||||
name: attr(),
|
||||
cardId: fk({
|
||||
to: 'Card',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue