use richtext component for description, adjust style to make it work in Text
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
This commit is contained in:
committed by
backportbot-nextcloud[bot]
parent
ad051c5e0e
commit
f7b6e8a3bc
@@ -62,9 +62,14 @@
|
|||||||
<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 v-if="card.description"
|
<div v-if="card.description"
|
||||||
class="description"
|
:class="{
|
||||||
:title="card.description">
|
'description': true,
|
||||||
{{ card.description }}
|
'short-description': shortDescription,
|
||||||
|
}">
|
||||||
|
<RichText v-tooltip.top="{ content: shortDescription ? t('deck', 'Click to expand description') : undefined }"
|
||||||
|
:text="card.description"
|
||||||
|
:use-markdown="true"
|
||||||
|
@click.native="shortDescription = !shortDescription" />
|
||||||
</div>
|
</div>
|
||||||
<div v-if="card.assignedUsers .length > 0"
|
<div v-if="card.assignedUsers .length > 0"
|
||||||
class="spacer" />
|
class="spacer" />
|
||||||
@@ -83,6 +88,7 @@ import DeckIcon from '../components/icons/DeckIcon.vue'
|
|||||||
import AvatarList from '../components/cards/AvatarList.vue'
|
import AvatarList from '../components/cards/AvatarList.vue'
|
||||||
import labelStyle from '../mixins/labelStyle.js'
|
import labelStyle from '../mixins/labelStyle.js'
|
||||||
|
|
||||||
|
import { RichText } from '@nextcloud/vue-richtext'
|
||||||
import moment from '@nextcloud/moment'
|
import moment from '@nextcloud/moment'
|
||||||
import { generateUrl } from '@nextcloud/router'
|
import { generateUrl } from '@nextcloud/router'
|
||||||
|
|
||||||
@@ -94,6 +100,7 @@ export default {
|
|||||||
DeckIcon,
|
DeckIcon,
|
||||||
CalendarBlankIcon,
|
CalendarBlankIcon,
|
||||||
TextIcon,
|
TextIcon,
|
||||||
|
RichText,
|
||||||
},
|
},
|
||||||
|
|
||||||
mixins: [labelStyle],
|
mixins: [labelStyle],
|
||||||
@@ -115,6 +122,7 @@ export default {
|
|||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
shortDescription: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -176,6 +184,8 @@ export default {
|
|||||||
|
|
||||||
.link {
|
.link {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
|
color: var(--color-main-text) !important;
|
||||||
|
padding: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.line {
|
.line {
|
||||||
@@ -201,13 +211,22 @@ export default {
|
|||||||
.description-assignees {
|
.description-assignees {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: start;
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
align-self: start;
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
.description {
|
.description {
|
||||||
text-overflow: ellipsis;
|
|
||||||
overflow: hidden;
|
|
||||||
white-space: nowrap;
|
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
|
padding-top: 6px;
|
||||||
|
max-height: 250px;
|
||||||
|
overflow: scroll;
|
||||||
|
&.short-description {
|
||||||
|
max-height: 25px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-assignees {
|
.card-assignees {
|
||||||
|
|||||||
Reference in New Issue
Block a user