show "more" only when a notification has a title. Show either title or message. Use bold font when a notification isn't read

This commit is contained in:
Son 2022-03-09 17:59:42 +01:00
parent fb00c18d5a
commit e0b5bd36a6
1 changed files with 4 additions and 6 deletions

View File

@ -38,15 +38,13 @@
<div class="dropdown-item d-flex" v-for="notification in notifications">
<div class="flex-grow-1">
<div v-html="notification.title" class="font-weight-bold"
<div v-html="notification.title || notification.message"
:class="!notification.read && 'font-weight-bold'"
style="width: 40em; word-wrap:break-word; white-space: normal; overflow: hidden;"></div>
<div v-html="notification.message"
style="width: 40em; word-wrap:break-word; white-space: normal; overflow: hidden; max-height: 100px; text-overflow: ellipsis;">
</div>
<div>
<div v-if="notification.title">
<a :href="'/dashboard/notification/' + notification.id">More</a>
</div>