Replace table with grid
This commit is contained in:
parent
e47d6d1605
commit
2ab6894542
@ -27,21 +27,20 @@
|
||||
v-if="attachments.length > 0"
|
||||
class="files"
|
||||
>
|
||||
<table class="table table-striped">
|
||||
<tr
|
||||
<div
|
||||
v-for="a in attachments"
|
||||
:key="a.id"
|
||||
class="clickable"
|
||||
class="grid-item clickable"
|
||||
@click="viewOrDownload(a)"
|
||||
>
|
||||
<td class="preview-column">
|
||||
<div class="preview-column">
|
||||
<FilePreview
|
||||
v-if="canPreview(a)"
|
||||
class="attachment-preview"
|
||||
:model-value="a"
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
</div>
|
||||
<div>
|
||||
<div class="filename">
|
||||
{{ a.file.name }}
|
||||
<span
|
||||
@ -109,9 +108,8 @@
|
||||
</BaseButton>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<x-button
|
||||
@ -448,7 +446,7 @@ async function setCoverImage(attachment: IAttachment | null) {
|
||||
}
|
||||
|
||||
.preview-column {
|
||||
max-width: 75px;
|
||||
max-width: 125px;
|
||||
}
|
||||
|
||||
.attachment-preview {
|
||||
@ -459,6 +457,12 @@ async function setCoverImage(attachment: IAttachment | null) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.grid-item {
|
||||
display: grid;
|
||||
grid-template-columns: 140px 1fr;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.is-task-cover {
|
||||
background: var(--primary);
|
||||
color: var(--white);
|
||||
|
Loading…
x
Reference in New Issue
Block a user