2022-04-21 09:22:40 +00:00
|
|
|
<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>{{
|
2022-04-21 09:22:40 +00:00
|
|
|
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",
|
2022-04-21 09:22:40 +00:00
|
|
|
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>
|