diff --git a/chatapp.svg b/chatapp.svg index 32e8395..2f2acde 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; border-radius: 10px;" > @@ -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%' }); @@ -390,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'); @@ -398,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', 'blue'); + 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'; } @@ -515,20 +517,20 @@ async function dialog_nabopige() { - - - - + + + + loading... - + - -status + +status @@ -537,9 +539,9 @@ async function dialog_nabopige() { SEND - + Dine kontakter - + Ven Mor