From fca3af2634421022b6595a9556595929d2951461 Mon Sep 17 00:00:00 2001 From: Peter Joles Date: Wed, 27 May 2020 14:10:02 -0700 Subject: [PATCH] Allow for custom response icon with simple "icon" output param --- src/components/ChatTeneoResponse.vue | 96 +++++++++++++++------------- 1 file changed, 50 insertions(+), 46 deletions(-) diff --git a/src/components/ChatTeneoResponse.vue b/src/components/ChatTeneoResponse.vue index f2503af0..605bb899 100644 --- a/src/components/ChatTeneoResponse.vue +++ b/src/components/ChatTeneoResponse.vue @@ -30,7 +30,7 @@ - + + +
+ + + + + + + + + + + + +
+ @@ -136,51 +182,7 @@ - -
- - - - - - - - - - - - -
+ @@ -559,6 +561,8 @@ export default { if (tResp.hasEmotion() && tResp.getEmotion().indexOf("|") !== -1) { const rawEmotion = decodeURIComponent(tResp.getEmotion()); icon = `mdi-${rawEmotion.split("|")[1].trim()}`; + } else if (tResp.hasParameter("icon")) { + icon = `mdi-${tResp.getParameter("icon")}`; } } return icon;