adjust card reference style
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
This commit is contained in:
@@ -37,6 +37,8 @@ registerWidget('deck-card', (el, { richObjectType, richObject, accessible }) =>
|
|||||||
// which is not very nice with a simple card
|
// which is not very nice with a simple card
|
||||||
el.parentNode.style['max-width'] = '400px'
|
el.parentNode.style['max-width'] = '400px'
|
||||||
el.parentNode.style['min-width'] = '200px'
|
el.parentNode.style['min-width'] = '200px'
|
||||||
|
el.parentNode.style['margin-left'] = '0'
|
||||||
|
el.parentNode.style['margin-right'] = '0'
|
||||||
|
|
||||||
const Widget = Vue.extend(CardReferenceWidget)
|
const Widget = Vue.extend(CardReferenceWidget)
|
||||||
new Widget({
|
new Widget({
|
||||||
|
|||||||
@@ -21,30 +21,18 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="deck-card-reference">
|
<div class="deck-card-reference">
|
||||||
<h3>
|
|
||||||
<DeckIcon :size="20" class="icon" />
|
|
||||||
<a v-tooltip.top="{ content: boardTooltip }"
|
|
||||||
:href="boardLink"
|
|
||||||
target="_blank"
|
|
||||||
class="link">
|
|
||||||
{{ board.title }}
|
|
||||||
</a>
|
|
||||||
<a v-tooltip.top="{ content: stackTooltip }"
|
|
||||||
:href="boardLink"
|
|
||||||
target="_blank"
|
|
||||||
class="link">
|
|
||||||
/ {{ stack.title }}
|
|
||||||
</a>
|
|
||||||
</h3>
|
|
||||||
<div class="line">
|
<div class="line">
|
||||||
|
<DeckIcon :size="20" class="title-icon" />
|
||||||
|
<strong>
|
||||||
<a :href="cardLink"
|
<a :href="cardLink"
|
||||||
:title="cardTooltip"
|
:title="cardTooltip"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
class="link">
|
class="link">
|
||||||
{{ card.title }}
|
{{ card.title }}
|
||||||
</a>
|
</a>
|
||||||
<div class="spacer" />
|
</strong>
|
||||||
<span v-show="dueDate"
|
<div v-if="dueDate" class="spacer" />
|
||||||
|
<span v-if="dueDate"
|
||||||
v-tooltip.top="{ content: formattedDueDate }"
|
v-tooltip.top="{ content: formattedDueDate }"
|
||||||
class="due-date">
|
class="due-date">
|
||||||
<CalendarBlankIcon :size="20"
|
<CalendarBlankIcon :size="20"
|
||||||
@@ -52,6 +40,14 @@
|
|||||||
{{ dueDate }}
|
{{ dueDate }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="line">
|
||||||
|
<a v-tooltip.top="{ content: stackTooltip }"
|
||||||
|
:href="boardLink"
|
||||||
|
target="_blank"
|
||||||
|
class="link">
|
||||||
|
{{ t('deck', '{stack} in {board}', { stack: stack.title, board: board.title }) }}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<transition-group v-if="card.labels && card.labels.length"
|
<transition-group v-if="card.labels && card.labels.length"
|
||||||
name="zoom"
|
name="zoom"
|
||||||
@@ -65,12 +61,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="line description-assignees">
|
<div class="line description-assignees">
|
||||||
<TextIcon v-if="card.description" :size="20" class="icon" />
|
<TextIcon v-if="card.description" :size="20" class="icon" />
|
||||||
<div class="description"
|
<div v-if="card.description"
|
||||||
|
class="description"
|
||||||
:title="card.description">
|
:title="card.description">
|
||||||
{{ card.description }}
|
{{ card.description }}
|
||||||
</div>
|
</div>
|
||||||
<div class="spacer" />
|
<div v-if="card.assignedUsers .length > 0"
|
||||||
<AvatarList :users="card.assignedUsers" class="card-assignees" />
|
class="spacer" />
|
||||||
|
<AvatarList v-if="card.assignedUsers .length > 0"
|
||||||
|
:users="card.assignedUsers"
|
||||||
|
class="card-assignees" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -142,9 +142,6 @@ export default {
|
|||||||
nbComments: this.card.commentsCount,
|
nbComments: this.card.commentsCount,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
boardTooltip() {
|
|
||||||
return t('deck', 'Owned by {dn}', { dn: this.board.owner.displayname })
|
|
||||||
},
|
|
||||||
stackTooltip() {
|
stackTooltip() {
|
||||||
return t('deck', '{nbCards} cards', { nbCards: this.stack.cards.length })
|
return t('deck', '{nbCards} cards', { nbCards: this.stack.cards.length })
|
||||||
},
|
},
|
||||||
@@ -177,18 +174,7 @@ export default {
|
|||||||
white-space: normal;
|
white-space: normal;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
|
|
||||||
h3 {
|
.link {
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
margin: 0 0 8px 0;
|
|
||||||
font-weight: bold;
|
|
||||||
.icon {
|
|
||||||
margin-right: 8px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.link:hover {
|
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -198,6 +184,9 @@ export default {
|
|||||||
.icon {
|
.icon {
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
}
|
}
|
||||||
|
.title-icon {
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.due-date {
|
.due-date {
|
||||||
|
|||||||
Reference in New Issue
Block a user