diff --git a/app/javascript/shared/components/FluentIcon/icons.json b/app/javascript/shared/components/FluentIcon/icons.json index 9ee0e82da..f3dc089b7 100644 --- a/app/javascript/shared/components/FluentIcon/icons.json +++ b/app/javascript/shared/components/FluentIcon/icons.json @@ -1,4 +1,5 @@ { + "arrow-clockwise-outline": "M12 4.75a7.25 7.25 0 1 0 7.201 6.406c-.068-.588.358-1.156.95-1.156.515 0 .968.358 1.03.87a9.25 9.25 0 1 1-3.432-6.116V4.25a1 1 0 1 1 2.001 0v2.698l.034.052h-.034v.25a1 1 0 0 1-1 1h-3a1 1 0 1 1 0-2h.666A7.219 7.219 0 0 0 12 4.75Z", "arrow-right-outline": "M13.267 4.209a.75.75 0 0 0-1.034 1.086l6.251 5.955H3.75a.75.75 0 0 0 0 1.5h14.734l-6.251 5.954a.75.75 0 0 0 1.034 1.087l7.42-7.067a.996.996 0 0 0 .3-.58.758.758 0 0 0-.001-.29.995.995 0 0 0-.3-.578l-7.419-7.067Z", "attach-outline": "M11.772 3.743a6 6 0 0 1 8.66 8.302l-.19.197-8.8 8.798-.036.03a3.723 3.723 0 0 1-5.489-4.973.764.764 0 0 1 .085-.13l.054-.06.086-.088.142-.148.002.003 7.436-7.454a.75.75 0 0 1 .977-.074l.084.073a.75.75 0 0 1 .074.976l-.073.084-7.594 7.613a2.23 2.23 0 0 0 3.174 3.106l8.832-8.83A4.502 4.502 0 0 0 13 4.644l-.168.16-.013.014-9.536 9.536a.75.75 0 0 1-1.133-.977l.072-.084 9.549-9.55h.002Z", "chevron-right-outline": "M8.293 4.293a1 1 0 0 0 0 1.414L14.586 12l-6.293 6.293a1 1 0 1 0 1.414 1.414l7-7a1 1 0 0 0 0-1.414l-7-7a1 1 0 0 0-1.414 0Z", diff --git a/app/javascript/widget/assets/scss/views/_conversation.scss b/app/javascript/widget/assets/scss/views/_conversation.scss index 609752f96..dbf7f716f 100644 --- a/app/javascript/widget/assets/scss/views/_conversation.scss +++ b/app/javascript/widget/assets/scss/views/_conversation.scss @@ -1,4 +1,4 @@ -.file-uploads .attachment-button + label { +.file-uploads .attachment-button+label { cursor: pointer; } @@ -59,7 +59,7 @@ } .agent-message-wrap { - + .agent-message-wrap { + +.agent-message-wrap { margin-top: $space-micro; .agent-message .chat-bubble { @@ -67,11 +67,11 @@ } } - + .user-message-wrap { + +.user-message-wrap { margin-top: $space-normal; } - &.has-response + .user-message-wrap { + &.has-response+.user-message-wrap { margin-top: $space-micro; .chat-bubble { @@ -79,7 +79,7 @@ } } - &.has-response + .agent-message-wrap { + &.has-response+.agent-message-wrap { margin-top: $space-normal; } } @@ -98,9 +98,21 @@ max-width: 100%; } - .in-progress { + .in-progress, + .is-failed { opacity: 0.6; } + + .is-failed { + align-items: flex-end; + display: flex; + flex-direction: row-reverse; + + .chat-bubble.user { + background: $color-error !important; + // TODO: Remove the important + } + } } @@ -115,7 +127,7 @@ } .user-message-wrap { - + .user-message-wrap { + +.user-message-wrap { margin-top: $space-micro; .user-message .chat-bubble { @@ -123,7 +135,7 @@ } } - + .agent-message-wrap { + +.agent-message-wrap { margin-top: $space-normal; } } @@ -154,7 +166,7 @@ border: 1px solid $color-border-dark; } - + .chat-bubble-wrap { + +.chat-bubble-wrap { .chat-bubble { border-top-left-radius: $space-smaller; } @@ -176,7 +188,7 @@ border-radius: $space-two; } - + .chat-bubble-wrap { + +.chat-bubble-wrap { .chat-bubble { border-top-right-radius: $space-smaller; } @@ -206,7 +218,7 @@ text-align: left; word-break: break-word; - > a { + >a { color: $color-primary; word-break: break-all; } @@ -218,7 +230,7 @@ &.user { border-bottom-right-radius: $space-smaller; - > a { + >a { color: $color-white; } } diff --git a/app/javascript/widget/components/AgentMessage.vue b/app/javascript/widget/components/AgentMessage.vue index e137e9940..def769bc3 100755 --- a/app/javascript/widget/components/AgentMessage.vue +++ b/app/javascript/widget/components/AgentMessage.vue @@ -27,16 +27,14 @@ :class="wrapClass" >
@@ -83,6 +81,11 @@ export default { default: () => {}, }, }, + data() { + return { + hasImageError: false, + }; + }, computed: { shouldDisplayAgentMessage() { if ( @@ -170,5 +173,18 @@ export default { }; }, }, + watch: { + message() { + this.hasImageError = false; + }, + }, + mounted() { + this.hasImageError = false; + }, + methods: { + onImageLoadError() { + this.hasImageError = true; + }, + }, }; diff --git a/app/javascript/widget/components/ImageBubble.vue b/app/javascript/widget/components/ImageBubble.vue index fa4d31788..2c4afbe86 100644 --- a/app/javascript/widget/components/ImageBubble.vue +++ b/app/javascript/widget/components/ImageBubble.vue @@ -6,7 +6,12 @@ class="image" >