fix: Fix widget thumbnail not rendering background colors (#5791)
This commit is contained in:
committed by
GitHub
parent
c121b44df4
commit
8bd5ba187a
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="user-thumbnail-box" :style="{ height: size, width: size }">
|
<div :class="thumbnailBoxClass" :style="{ height: size, width: size }">
|
||||||
<img
|
<img
|
||||||
v-if="!imgError && src"
|
v-if="!imgError && src"
|
||||||
:src="src"
|
:src="src"
|
||||||
@@ -120,6 +120,10 @@ export default {
|
|||||||
this.variant === 'circle' ? 'thumbnail-rounded' : 'thumbnail-square';
|
this.variant === 'circle' ? 'thumbnail-rounded' : 'thumbnail-square';
|
||||||
return `user-thumbnail ${classname} ${variant}`;
|
return `user-thumbnail ${classname} ${variant}`;
|
||||||
},
|
},
|
||||||
|
thumbnailBoxClass() {
|
||||||
|
const boxClass = this.variant === 'circle' ? 'is-rounded' : '';
|
||||||
|
return `user-thumbnail-box ${boxClass}`;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
src(value, oldValue) {
|
src(value, oldValue) {
|
||||||
@@ -142,6 +146,10 @@ export default {
|
|||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
|
&.is-rounded {
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
.user-thumbnail {
|
.user-thumbnail {
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
&.thumbnail-square {
|
&.thumbnail-square {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
@import 'shared/assets/stylesheets/animations';
|
@import 'shared/assets/stylesheets/animations';
|
||||||
|
@import 'shared/assets/stylesheets/colors';
|
||||||
|
|
||||||
@import 'reset';
|
@import 'reset';
|
||||||
@import 'tailwindcss/base';
|
@import 'tailwindcss/base';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="conversation--container">
|
<div class="conversation--container" :class="colorSchemeClass">
|
||||||
<div class="conversation-wrap" :class="{ 'is-typing': isAgentTyping }">
|
<div class="conversation-wrap" :class="{ 'is-typing': isAgentTyping }">
|
||||||
<div v-if="isFetchingList" class="message--loader">
|
<div v-if="isFetchingList" class="message--loader">
|
||||||
<spinner />
|
<spinner />
|
||||||
@@ -26,6 +26,8 @@ import ChatMessage from 'widget/components/ChatMessage.vue';
|
|||||||
import AgentTypingBubble from 'widget/components/AgentTypingBubble.vue';
|
import AgentTypingBubble from 'widget/components/AgentTypingBubble.vue';
|
||||||
import DateSeparator from 'shared/components/DateSeparator.vue';
|
import DateSeparator from 'shared/components/DateSeparator.vue';
|
||||||
import Spinner from 'shared/components/Spinner.vue';
|
import Spinner from 'shared/components/Spinner.vue';
|
||||||
|
import darkModeMixin from 'widget/mixins/darkModeMixin';
|
||||||
|
|
||||||
import { mapActions, mapGetters } from 'vuex';
|
import { mapActions, mapGetters } from 'vuex';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -36,6 +38,7 @@ export default {
|
|||||||
DateSeparator,
|
DateSeparator,
|
||||||
Spinner,
|
Spinner,
|
||||||
},
|
},
|
||||||
|
mixins: [darkModeMixin],
|
||||||
props: {
|
props: {
|
||||||
groupedMessages: {
|
groupedMessages: {
|
||||||
type: Array,
|
type: Array,
|
||||||
@@ -56,6 +59,9 @@ export default {
|
|||||||
conversationSize: 'conversation/getConversationSize',
|
conversationSize: 'conversation/getConversationSize',
|
||||||
isAgentTyping: 'conversation/getIsAgentTyping',
|
isAgentTyping: 'conversation/getIsAgentTyping',
|
||||||
}),
|
}),
|
||||||
|
colorSchemeClass() {
|
||||||
|
return `${this.darkMode === 'light' ? 'light' : 'dark'}`;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
allMessagesLoaded() {
|
allMessagesLoaded() {
|
||||||
@@ -110,6 +116,13 @@ export default {
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
color-scheme: light dark;
|
color-scheme: light dark;
|
||||||
|
|
||||||
|
&.light {
|
||||||
|
color-scheme: light;
|
||||||
|
}
|
||||||
|
&.dark {
|
||||||
|
color-scheme: dark;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.conversation-wrap {
|
.conversation-wrap {
|
||||||
|
|||||||
Reference in New Issue
Block a user