3c69886320
Also: - New schema version 8 with video/image thumbnails, screenshots, sizes - Upgrade messages not at current schema version when loading messages to show in conversation - New MessageDetail react component - New ConversationHeader react component
44 lines
1 KiB
Markdown
44 lines
1 KiB
Markdown
```js
|
|
const noop = () => {};
|
|
|
|
const messages = [
|
|
{
|
|
objectURL: 'https://placekitten.com/799/600',
|
|
attachments: [{ contentType: 'image/jpeg' }],
|
|
},
|
|
{
|
|
objectURL: 'https://placekitten.com/900/600',
|
|
attachments: [{ contentType: 'image/jpeg' }],
|
|
},
|
|
// Unsupported image type
|
|
{
|
|
objectURL: 'foo.tif',
|
|
attachments: [{ contentType: 'image/tiff' }],
|
|
},
|
|
// Video
|
|
{
|
|
objectURL: util.mp4ObjectUrl,
|
|
attachments: [{ contentType: 'video/mp4' }],
|
|
},
|
|
{
|
|
objectURL: 'https://placekitten.com/980/800',
|
|
attachments: [{ contentType: 'image/jpeg' }],
|
|
},
|
|
{
|
|
objectURL: 'https://placekitten.com/656/540',
|
|
attachments: [{ contentType: 'image/jpeg' }],
|
|
},
|
|
{
|
|
objectURL: 'https://placekitten.com/762/400',
|
|
attachments: [{ contentType: 'image/jpeg' }],
|
|
},
|
|
{
|
|
objectURL: 'https://placekitten.com/920/620',
|
|
attachments: [{ contentType: 'image/jpeg' }],
|
|
},
|
|
];
|
|
|
|
<div style={{ position: 'relative', width: '100%', height: 500 }}>
|
|
<LightboxGallery messages={messages} onSave={noop} i18n={util.i18n} />
|
|
</div>;
|
|
```
|