Frontend: Proof of concept for image preview #2266

Merged
konrad merged 20 commits from Elscrux/vikunja:feature/image-preview into main 2024-05-25 12:11:05 +00:00
Showing only changes of commit 7664534618 - Show all commits

View File

@ -27,10 +27,10 @@
v-if="attachments.length > 0"
class="files"
>
<div
<button

Please do not use a table for multi-column layout.

Please do not use a table for multi-column layout.

I used a grid instead now

I used a grid instead now
v-for="a in attachments"
:key="a.id"
class="attachment clickable"
class="attachment"

grid-item sounds like a child of a grid. Why not call it attachment as it was before?

`grid-item` sounds like a child of a grid. Why not call it `attachment` as it was before?
@click="viewOrDownload(a)"
>
<div class="preview-column">
@ -109,7 +109,7 @@
</p>
</div>
</div>
</div>
</button>
</div>
<x-button
@ -309,11 +309,18 @@ async function setCoverImage(attachment: IAttachment | null) {
}
Review

Please make this width: 100%.

Please make this `width: 100%`.
Review

done!

done!
.attachment {
display: grid;
grid-template-columns: 9rem 1fr;
align-items: center;
margin-bottom: .5rem;
display: block;
transition: background-color $transition;
border-radius: $radius;
padding: .5rem;
transition: background-color $transition;
background-color: transparent;
border: transparent;
border-radius: $radius;
&:hover {
background-color: var(--grey-200);
@ -453,16 +460,6 @@ async function setCoverImage(attachment: IAttachment | null) {
max-height: 4rem;
}
.clickable {
cursor: pointer;
}
.attachment {
display: grid;
grid-template-columns: 9rem 1fr;
align-items: center;
}
.is-task-cover {
background: var(--primary);
color: var(--white);