Change icon for room entry comment count

Resolves MS-344
This commit is contained in:
Ramon Wenger 2022-07-06 18:00:10 +02:00
parent deb2a2cd1b
commit 8b43d36152
2 changed files with 9 additions and 1 deletions

View File

@ -1,11 +1,12 @@
<template> <template>
<div class="entry-count-widget"> <div class="entry-count-widget">
<cards /> <component :is="icon" />
<span data-cy="entry-count">{{ entryCount }} <template v-if="verbose">{{ entryCount === 1 ? 'Beitrag' : 'Beiträge' }}</template></span> <span data-cy="entry-count">{{ entryCount }} <template v-if="verbose">{{ entryCount === 1 ? 'Beitrag' : 'Beiträge' }}</template></span>
</div> </div>
</template> </template>
<script> <script>
import SpeechBubbleIcon from '@/components/icons/SpeechBubbleIcon';
const Cards = () => import(/* webpackChunkName: "icons" */'@/components/icons/Cards.vue'); const Cards = () => import(/* webpackChunkName: "icons" */'@/components/icons/Cards.vue');
export default { export default {
@ -17,9 +18,15 @@
type: Boolean, type: Boolean,
default: true, default: true,
}, },
icon: {
type: String,
default: 'cards'
}
}, },
components: { components: {
'speech-bubble': SpeechBubbleIcon,
SpeechBubbleIcon,
Cards, Cards,
}, },
}; };

View File

@ -34,6 +34,7 @@
/> />
<entry-count-widget <entry-count-widget
:entry-count="comments" :entry-count="comments"
icon="speech-bubble"
:verbose="false" :verbose="false"
/> />
</div> </div>