From ff5d092436bccb03e2adb59fb2f6605c5020c248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 22 Apr 2020 18:01:48 +0200 Subject: [PATCH] Add animations and pin create card input MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- src/components/board/Board.vue | 53 ++++++++------ src/components/board/Stack.vue | 109 +++++++++++++++++++++------- src/components/card/CardSidebar.vue | 2 +- src/components/cards/CardItem.vue | 24 ++++-- src/css/animations.scss | 25 +++++++ 5 files changed, 157 insertions(+), 56 deletions(-) create mode 100644 src/css/animations.scss diff --git a/src/components/board/Board.vue b/src/components/board/Board.vue index 5b43205a0..3d18bdfa2 100644 --- a/src/components/board/Board.vue +++ b/src/components/board/Board.vue @@ -23,26 +23,29 @@ @@ -102,8 +105,12 @@ export default { methods: { async fetchData() { this.loading = true - await this.$store.dispatch('loadBoardById', this.id) - await this.$store.dispatch('loadStacks', this.id) + try { + await this.$store.dispatch('loadBoardById', this.id) + await this.$store.dispatch('loadStacks', this.id) + } catch (e) { + console.error(e) + } this.loading = false }, @@ -125,6 +132,8 @@ export default { diff --git a/src/components/card/CardSidebar.vue b/src/components/card/CardSidebar.vue index 8fa487dcd..6485581a6 100644 --- a/src/components/card/CardSidebar.vue +++ b/src/components/card/CardSidebar.vue @@ -236,7 +236,7 @@ export default { descriptionSaveTimeout: null, descriptionSaving: false, hasActivity: capabilities && capabilities.activity, - hasComments: !!OC.appswebroots['comments'] + hasComments: !!OC.appswebroots['comments'], } }, computed: { diff --git a/src/components/cards/CardItem.vue b/src/components/cards/CardItem.vue index ef02af1d1..d8f2a219d 100644 --- a/src/components/cards/CardItem.vue +++ b/src/components/cards/CardItem.vue @@ -48,16 +48,21 @@
-
- {{ relativeDate }} -
+ +
+ {{ relativeDate }} +
+
- +
@@ -132,6 +137,13 @@ export default { return moment(this.card.duedate).format('LLLL') }, }, + watch: { + currentCard(newValue) { + if (newValue) { + this.$nextTick(() => this.$el.scrollIntoView()) + } + }, + }, methods: { openCard() { this.$router.push({ name: 'card', params: { cardId: this.id } }) @@ -154,6 +166,8 @@ export default {