style: fix some UI issues

Signed-off-by: Luka Trovic <luka@nextcloud.com>
This commit is contained in:
Luka Trovic
2022-02-10 12:36:47 +01:00
parent 7d414891f9
commit 6c59f52c31
5 changed files with 30 additions and 9 deletions

View File

@@ -79,7 +79,7 @@
</div> </div>
<div class="activities"> <div class="activities">
<h2 class="activities-title"> <h2 class="activities-title">
<div class="icon-flash-black" /> Activities <div class="icon-flash-black" /> Activity
</h2> </h2>
<div class="comments"> <div class="comments">
<Avatar :user="currentUser.uid" /> <Avatar :user="currentUser.uid" />
@@ -285,6 +285,10 @@ export default {
margin-right: 5px; margin-right: 5px;
} }
.icon {
margin-right: 5px;
}
.icon-plus { .icon-plus {
background-image: url(../../../img/plus.svg); background-image: url(../../../img/plus.svg);
width: 15px; width: 15px;
@@ -359,7 +363,7 @@ export default {
flex-direction: row; flex-direction: row;
overflow: hidden; overflow: hidden;
padding: 10px 10px; padding: 10px 10px;
border-radius: 5px; border-radius: 10px;
font-size: 85%; font-size: 85%;
margin-bottom: 3px; margin-bottom: 3px;
margin-right: 5px; margin-right: 5px;

View File

@@ -1,6 +1,6 @@
<template> <template>
<div class="section-details"> <div v-if="copiedCard" class="section-details">
<div @click="$emit('active-tab', 'duedate')"> <div @click="$emit('active-tab', 'default')">
<DatetimePicker v-model="duedate" <DatetimePicker v-model="duedate"
:placeholder="t('deck', 'Set a due date')" :placeholder="t('deck', 'Set a due date')"
type="datetime" type="datetime"
@@ -11,11 +11,16 @@
:shortcuts="shortcuts" :shortcuts="shortcuts"
confirm /> confirm />
</div> </div>
<Actions v-if="canEdit">
<ActionButton v-if="copiedCard.duedate" icon="icon-delete" @click="removeDue()">
{{ t('deck', 'Remove due date') }}
</ActionButton>
</Actions>
</div> </div>
</template> </template>
<script> <script>
import { DatetimePicker } from '@nextcloud/vue' import { DatetimePicker, Actions, ActionButton } from '@nextcloud/vue'
import { mapState, mapGetters } from 'vuex' import { mapState, mapGetters } from 'vuex'
import Color from '../../mixins/color' import Color from '../../mixins/color'
import labelStyle from '../../mixins/labelStyle' import labelStyle from '../../mixins/labelStyle'
@@ -27,7 +32,7 @@ import {
import moment from '@nextcloud/moment' import moment from '@nextcloud/moment'
export default { export default {
components: { DatetimePicker }, components: { DatetimePicker, Actions, ActionButton },
mixins: [Color, labelStyle], mixins: [Color, labelStyle],
props: { props: {
card: { card: {
@@ -135,6 +140,10 @@ export default {
this.copiedCard = JSON.parse(JSON.stringify(this.card)) this.copiedCard = JSON.parse(JSON.stringify(this.card))
}, },
removeDue() {
this.copiedCard.duedate = null
this.$store.dispatch('updateCardDue', this.copiedCard)
},
}, },
} }
</script> </script>
@@ -142,5 +151,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.section-details { .section-details {
margin-right: 5px; margin-right: 5px;
display: flex;
align-items: center;
} }
</style> </style>

View File

@@ -170,6 +170,7 @@ export default {
padding: 9px; padding: 9px;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin-left: 5px;
} }
.section-details { .section-details {

View File

@@ -1,6 +1,6 @@
<template> <template>
<div class="section-details"> <div class="section-details">
<div class="section-wrapper" @click="$emit('active-tab', 'project')"> <div class="section-wrapper" @click="$emit('active-tab', 'default')">
<CollectionList v-if="card.id" <CollectionList v-if="card.id"
:id="`${card.id}`" :id="`${card.id}`"
:name="card.title" :name="card.title"

View File

@@ -5,7 +5,7 @@
:multiple="true" :multiple="true"
:disabled="!canEdit" :disabled="!canEdit"
:options="labelsSorted" :options="labelsSorted"
:placeholder="t('deck', 'Assign a tag to this card')" :placeholder="t('deck', 'Assign a tag to this card')"
:taggable="true" :taggable="true"
label="title" label="title"
track-by="id" track-by="id"
@@ -74,7 +74,7 @@ export default {
methods: { methods: {
add() { add() {
this.showSelelectTags = true this.showSelelectTags = true
this.$emit('active-tab', 'tags') this.$emit('active-tab', 'default')
}, },
async initialize() { async initialize() {
if (!this.card) { if (!this.card) {
@@ -137,4 +137,9 @@ export default {
width: 32px; width: 32px;
padding: 5px 7px; padding: 5px 7px;
} }
.tag {
padding: 0px 5px;
border-radius: 15px;
}
</style> </style>