From 997c7e3ae54bd775b64956ed1c3ff79c3ea85017 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakob=20R=C3=B6hrl?= Date: Fri, 9 Jul 2021 15:18:53 +0200 Subject: [PATCH] styling, some fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakob Röhrl --- src/components/cards/CardItem.vue | 43 ++++++++++--------- .../navigation/AppNavigationBoard.vue | 2 +- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/src/components/cards/CardItem.vue b/src/components/cards/CardItem.vue index 3721aede4..f0105b46b 100644 --- a/src/components/cards/CardItem.vue +++ b/src/components/cards/CardItem.vue @@ -35,12 +35,13 @@ {{ board.title }} » {{ stack.title }}
-

- {{ attachments }} -
- -
-
+
+
+
+
+
+
+

{{ card.title }}

@@ -118,8 +119,13 @@ export default { return { editing: false, copiedCard: null, + images: null, + loading: false, } }, + mounted() { + this.loadImages() + }, computed: { ...mapState({ compactMode: state => state.compactMode, @@ -136,9 +142,6 @@ export default { stack() { return this.$store.getters.stackById(this?.card?.stackId) }, - attachments() { - return [...this.$store.getters.attachmentsByCard(this.id)].filter(attachment => attachment.deletedAt >= 0) - }, canEdit() { if (this.currentBoard) { return !this.currentBoard.archived && this.$store.getters.canEdit @@ -199,6 +202,12 @@ export default { applyLabelFilter(label) { this.$nextTick(() => this.$store.dispatch('toggleFilter', { tags: [label.id] })) }, + async loadImages() { + this.loading = true + await this.$store.dispatch('fetchAttachments', this.id) + this.loading = false + this.images = [...this.$store.getters.attachmentsByCard(this.id)].filter(attachment => attachment.deletedAt >= 0).sort((a, b) => b.id - a.id) + }, }, } @@ -229,18 +238,12 @@ export default { &.current-card { box-shadow: 0 0 5px 1px var(--color-box-shadow); } - - .fileicon { - display: flex; - width: 260px; - height: 260px; - background-size: contain; - background-repeat: no-repeat; - margin-left: auto; - margin-right: auto; - border-radius: var(--border-radius-large); + .imageCard { + width: 272px; + height: 250px; + background-size: cover; + border-radius: var(--border-radius-large) var(--border-radius-large) 0 0 ; } - .card-upper { display: flex; min-height: 44px; diff --git a/src/components/navigation/AppNavigationBoard.vue b/src/components/navigation/AppNavigationBoard.vue index a740b8e91..7553cd540 100644 --- a/src/components/navigation/AppNavigationBoard.vue +++ b/src/components/navigation/AppNavigationBoard.vue @@ -113,7 +113,7 @@ - {{ t('deck', 'Show cover images') }} {{ board.coverImages }} + {{ t('deck', 'Show cover images') }}