2018-05-02 00:05:36 +00:00
|
|
|
{#if media.length}
|
2019-05-27 19:31:42 +00:00
|
|
|
<ul class="compose-media-container"
|
|
|
|
aria-label="Media uploads"
|
|
|
|
style="grid-template-columns: repeat({media.length}, 1fr);"
|
|
|
|
>
|
2018-05-02 00:05:36 +00:00
|
|
|
{#each media as mediaItem, index}
|
2019-02-14 16:46:43 +00:00
|
|
|
<ComposeMediaItem {realm} {mediaItem} {index} {media} />
|
2018-05-02 00:05:36 +00:00
|
|
|
{/each}
|
2019-05-27 19:31:42 +00:00
|
|
|
</ul>
|
2018-05-02 00:05:36 +00:00
|
|
|
{/if}
|
2018-03-02 05:21:49 +00:00
|
|
|
<style>
|
|
|
|
.compose-media-container {
|
|
|
|
grid-area: media;
|
2019-05-27 19:31:42 +00:00
|
|
|
list-style: none;
|
2018-03-02 05:21:49 +00:00
|
|
|
display: grid;
|
|
|
|
grid-column-gap: 5px;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
2019-05-27 19:31:42 +00:00
|
|
|
margin: 10px 0 0 0;
|
2018-03-02 05:21:49 +00:00
|
|
|
background: var(--form-bg);
|
|
|
|
padding: 5px;
|
|
|
|
border-radius: 4px;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<script>
|
|
|
|
import { store } from '../../_store/store'
|
2018-04-10 01:30:15 +00:00
|
|
|
import ComposeMediaItem from './ComposeMediaItem.html'
|
2018-03-02 05:21:49 +00:00
|
|
|
|
|
|
|
export default {
|
2018-03-03 05:55:04 +00:00
|
|
|
store: () => store,
|
2018-04-10 01:30:15 +00:00
|
|
|
components: {
|
|
|
|
ComposeMediaItem
|
2018-03-03 05:55:04 +00:00
|
|
|
}
|
2018-03-02 05:21:49 +00:00
|
|
|
}
|
2019-02-14 02:38:34 +00:00
|
|
|
</script>
|