Fix tag style in card sidebar and remove flex basis on card labels

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2019-09-04 18:33:43 +02:00
parent 1db20878a9
commit 6c8ac1ed47
2 changed files with 23 additions and 2 deletions

View File

@@ -36,7 +36,10 @@
:taggable="true" label="title" :taggable="true" label="title"
track-by="id" @select="addLabelToCard" @remove="removeLabelFromCard"> track-by="id" @select="addLabelToCard" @remove="removeLabelFromCard">
<template #option="scope"> <template #option="scope">
<div :style="{ color: '#' + scope.option.color}">{{ scope.option.title }}</div> <div :style="{ backgroundColor: '#' + scope.option.color, color: textColor(scope.option.color)}" class="tag">{{ scope.option.title }}</div>
</template>
<template #tag="scope">
<div :style="{ backgroundColor: '#' + scope.option.color, color: textColor(scope.option.color)}" class="tag">{{ scope.option.title }}</div>
</template> </template>
</multiselect> </multiselect>
</div> </div>
@@ -93,6 +96,7 @@ import VueEasymde from 'vue-easymde'
import { Actions } from 'nextcloud-vue/dist/Components/Actions' import { Actions } from 'nextcloud-vue/dist/Components/Actions'
import { ActionButton } from 'nextcloud-vue/dist/Components/ActionButton' import { ActionButton } from 'nextcloud-vue/dist/Components/ActionButton'
import ActivityEntry from '../ActivityEntry' import ActivityEntry from '../ActivityEntry'
import Color from '../../mixins/color'
export default { export default {
name: 'CardSidebar', name: 'CardSidebar',
@@ -107,6 +111,9 @@ export default {
ActionButton, ActionButton,
Avatar Avatar
}, },
mixins: [
Color
],
props: { props: {
id: { id: {
type: Number, type: Number,
@@ -319,6 +326,16 @@ export default {
} }
} }
.tag {
flex-grow: 0;
flex-shrink: 1;
overflow: hidden;
padding: 1px 3px;
border-radius: 3px;
font-size: 85%;
margin-right: 3px;
}
.avatarLabel { .avatarLabel {
padding: 6px padding: 6px
} }

View File

@@ -189,10 +189,10 @@ export default {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
margin-left: $card-padding; margin-left: $card-padding;
margin-right: $card-padding;
margin-top: -5px; margin-top: -5px;
li { li {
flex-basis: 5em;
flex-grow: 0; flex-grow: 0;
flex-shrink: 1; flex-shrink: 1;
display: flex; display: flex;
@@ -204,6 +204,10 @@ export default {
margin-right: 3px; margin-right: 3px;
margin-bottom: 3px; margin-bottom: 3px;
&:hover {
overflow: unset;
}
span { span {
flex-grow: 0; flex-grow: 0;
flex-shrink: 1; flex-shrink: 1;