- Fixed Image avatar user list, q-qvatar rounded image
This commit is contained in:
@@ -1,45 +1,49 @@
|
||||
<template>
|
||||
<button class="relative-position animate-bounce">
|
||||
<i class="fa fa-2x fa-envelope-o"></i>
|
||||
<span class="floating label bg-dark">5</span>
|
||||
<q-menu self="top right">
|
||||
<q-list bordered class="rounded-borders" style="max-width: 350px; min-width: 250px;">
|
||||
<q-item-label header>{{$t('msgs.messages')}}</q-item-label>
|
||||
<div>
|
||||
<q-btn flat round dense icon="fas fa-comment" class="q-mx-xs" >
|
||||
<q-badge floating color="red">{{getNumMsgUnread}}</q-badge>
|
||||
<q-menu self="top right">
|
||||
<q-list bordered class="rounded-borders" style="max-width: 350px; min-width: 250px;">
|
||||
<q-item-label header>{{$t('msgs.messages')}}</q-item-label>
|
||||
|
||||
<q-separator inset="item"/>
|
||||
<q-separator/>
|
||||
|
||||
<div v-if="lasts_messages().length === 0">
|
||||
<q-item>
|
||||
{{$t('msgs.nomessage')}}
|
||||
<div v-if="getNumMsg === 0">
|
||||
<q-item>
|
||||
{{$t('msgs.nomessage')}}
|
||||
|
||||
</q-item>
|
||||
</div>
|
||||
|
||||
<q-item clickable v-ripple v-for="(msg, index) in lasts_messages()" :key="index">
|
||||
|
||||
<q-item-section avatar>
|
||||
<q-avatar>
|
||||
{{msg.origin.username}}
|
||||
<img :src="getImgByUsername(msg.dest.username)">
|
||||
</q-avatar>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label lines="1">{{getUserByUsername(msg.dest.username)}}</q-item-label>
|
||||
<q-item-label caption lines="2">
|
||||
{{msg.message}}
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section side top>
|
||||
{{tools.getstrDateTimeShort(msg.datemsg)}}
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</div>
|
||||
|
||||
<q-item clickable v-ripple v-for="(msg, index) in lasts_messages()" :key="index">
|
||||
|
||||
<q-item-section avatar>
|
||||
<q-avatar>
|
||||
{{msg.origin.username}}
|
||||
<img src="https://cdn.quasar.dev/img/avatar2.jpg">
|
||||
</q-avatar>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label lines="1">{{msg.message}}</q-item-label>
|
||||
<q-item-label caption lines="2">
|
||||
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section side top>
|
||||
{{tools.getstrDateTime(msg.datemsg)}}
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-separator inset="item"/>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</button>
|
||||
<q-separator/>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
<q-btn v-if="false" flat round dense icon="fas fa-bell">
|
||||
<q-badge v-if="getNumNotifUnread > 0" floating color="red">{{getNumNotifUnread}}</q-badge>
|
||||
</q-btn>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./messagePopover.ts">
|
||||
|
||||
Reference in New Issue
Block a user