0
0
Fork 0
mirror of https://github.com/VueTubeApp/VueTube synced 2024-11-26 21:23:02 +00:00
VueTube/NUXT/components/Comments/authorCommentBadgeRenderer.vue

42 lines
871 B
Vue
Raw Normal View History

<template>
<div
class="author-comment-badge-renderer"
v-if="metadata && iconTypeMap.hasOwnProperty(metadata.icon.iconType)"
>
<v-tooltip top>
<template v-slot:activator="{ on, attrs }">
2022-04-21 10:51:49 +00:00
<v-icon v-bind="attrs" v-on="on" class="author-badge" small>{{
iconTypeMap[metadata.icon.iconType]
}}</v-icon>
</template>
<span>{{ metadata.iconTooltip }}</span>
</v-tooltip>
</div>
</template>
<script>
export default {
props: {
metadata: {
type: Object,
default: () => ({}),
},
},
data: () => ({
iconTypeMap: {
CHECK: "mdi-check-circle",
2022-04-21 10:51:49 +00:00
CHECK_CIRCLE_THICK: "mdi-check-circle",
OFFICIAL_ARTIST_BADGE: "mdi-music-note",
},
}),
};
</script>
2022-04-21 10:51:49 +00:00
<style scoped>
.author-comment-badge-renderer {
display: flex;
flex-direction: row;
align-items: center;
}
</style>