From 873b36e6cd89eebf6ee5d23022de969425a31f35 Mon Sep 17 00:00:00 2001 From: kolaente Date: Fri, 15 Jan 2021 23:33:43 +0100 Subject: [PATCH] Rework attachments list to look great everywhere --- src/components/tasks/partials/attachments.vue | 74 +++++++++---------- src/styles/components/attachments.scss | 50 +++++++++++++ 2 files changed, 83 insertions(+), 41 deletions(-) diff --git a/src/components/tasks/partials/attachments.vue b/src/components/tasks/partials/attachments.vue index 04168de0..07d2b79d 100644 --- a/src/components/tasks/partials/attachments.vue +++ b/src/components/tasks/partials/attachments.vue @@ -5,14 +5,6 @@ Attachments - - - Upload attachment - - - - - - - - - - - - - - - - - - -
NameSizeTypeDateCreated ByAction
- {{ a.file.name }} - {{ a.file.getHumanSize() }}{{ a.file.mime }}{{ formatDateSince(a.created) }} - - -
+
+
+
{{ a.file.name }}
+
+

+ + created {{ formatDateSince(a.created) }} by + + + + {{ a.file.getHumanSize() }} + + + {{ a.file.mime }} + +

+

- - - + Download - - - + Delete -

-
+

+ + + + + + + Upload attachment +
diff --git a/src/styles/components/attachments.scss b/src/styles/components/attachments.scss index ed422ee9..a862d686 100644 --- a/src/styles/components/attachments.scss +++ b/src/styles/components/attachments.scss @@ -3,6 +3,56 @@ display: none; } + .files { + margin-bottom: 1rem; + + .attachment { + margin-bottom: .75rem; + + .filename { + font-weight: bold; + margin-bottom: .25rem; + } + + .info { + color: $grey; + font-size: .9rem; + + p { + margin-bottom: 0; + display: flex; + + > span:not(:last-child):after, + > a:not(:last-child):after { + content: 'ยท'; + padding: 0 .25rem; + } + + @media screen and (max-width: $mobile) { + &.collapses { + flex-direction: column; + + > span:not(:last-child):after, + > a:not(:last-child):after { + display: none; + } + + .user .username { + display: none; + } + } + } + } + } + } + } + + @media screen and (max-width: $tablet) { + .button { + width: 100%; + } + } + .dropzone { position: fixed; background: rgba(250, 250, 250, 0.8);