From 5a3bc05a706da10aaf47039ead33dafa4e99c1ac Mon Sep 17 00:00:00 2001 From: AsbjornOlling Date: Sun, 21 Aug 2022 22:35:01 +0200 Subject: [PATCH 1/2] pick some more typical colors for a chat app --- chatapp.svg | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/chatapp.svg b/chatapp.svg index 32e8395..f15c35a 100644 --- a/chatapp.svg +++ b/chatapp.svg @@ -9,6 +9,7 @@ viewBox="0 0 300 600" onload="start_chat('Ven')" overflow="auto" + style="font-family: sans;" > @@ -100,7 +101,8 @@ function create_link_node(url) { /// *ChatMessages are owned by a Dialog. function TextChatMessage(message_text, is_myself) { let lines = split_text_into_lines(message_text, 28); - let bubble_color = (is_myself)? 'white': '#DDFF66'; + let bubble_color = (is_myself)? '#0084FF': '#E4E6EB'; + let text_color = (is_myself)? 'white': 'black'; let container = document.getElementById('messages'); // attributes @@ -111,7 +113,7 @@ function TextChatMessage(message_text, is_myself) { this.draw = function(y_offset, y_shift) { let group = create_svg_node('g', {'transform': `translate(0, ${y_shift})`}); - let x = (is_myself ? 190 : 110); + let x = (is_myself ? 195 : 105); let text = create_svg_node('text', { 'x': `${x}%`, 'font-size': `${line_height}px`, @@ -125,7 +127,7 @@ function TextChatMessage(message_text, is_myself) { let tspan = create_svg_node('tspan', { 'x': `${x}%`, 'y': `${y + line_height}`, // important: y is lower text baseline - 'fill': 'green', + 'fill': text_color, 'width': '5%' }); @@ -398,7 +400,7 @@ async function local_message_processing(will_be_flagged) { indicator.data = 'Reporting suspicious content'; await wait(1000); text_element.setAttribute('fill', 'white'); - box.setAttribute('fill', 'blue'); + box.setAttribute('fill', '#0084FF'); } indicator.data = 'encrypting message'; await wait(250); @@ -515,15 +517,15 @@ async function dialog_nabopige() { - - - - + + + + loading... - + @@ -537,9 +539,9 @@ async function dialog_nabopige() { SEND - + Dine kontakter - + Ven Mor From a5c970db11c6dbd2836ab3a0feb84d7f992ddf8b Mon Sep 17 00:00:00 2001 From: AsbjornOlling Date: Sun, 21 Aug 2022 22:57:32 +0200 Subject: [PATCH 2/2] shrink, slow down, and re-color scanning indicator --- chatapp.svg | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/chatapp.svg b/chatapp.svg index f15c35a..2f2acde 100644 --- a/chatapp.svg +++ b/chatapp.svg @@ -9,7 +9,7 @@ viewBox="0 0 300 600" onload="start_chat('Ven')" overflow="auto" - style="font-family: sans;" + style="font-family: sans; border-radius: 10px;" > @@ -392,7 +392,7 @@ async function local_message_processing(will_be_flagged) { let text_element = document.getElementById('message_status'); let indicator = text_element.childNodes[0]; indicator.data = 'scanning for illegal content'; - await wait(200); + await wait(800); if(will_be_flagged) { let box = document.getElementById('message_status_box'); text_element.setAttribute('fill', 'red'); @@ -400,12 +400,12 @@ async function local_message_processing(will_be_flagged) { indicator.data = 'Reporting suspicious content'; await wait(1000); text_element.setAttribute('fill', 'white'); - box.setAttribute('fill', '#0084FF'); + box.setAttribute('fill', '#FF7B00'); } indicator.data = 'encrypting message'; - await wait(250); + await wait(550); indicator.data = 'sending message'; - await wait(100); + await wait(500); indicator.data = 'message was sent'; } @@ -529,8 +529,8 @@ async function dialog_nabopige() { - -status + +status