Commit f832e5ee authored by Tijmen de Mes's avatar Tijmen de Mes

Support 'done icon'

parent 127f0a7e
......@@ -641,6 +641,7 @@ class ChatWidget(base_class, ui_class):
default_user_icon = IconDescriptor(Resources.get('icons/default-avatar.png'))
checkmark_icon = IconDescriptor(Resources.get('icons/checkmark.svg'))
warning_icon = IconDescriptor(Resources.get('icons/warning.svg'))
done_all_icon = IconDescriptor(Resources.get('icons/done-all.svg'))
chat_template = open(Resources.get('chat/template.html')).read()
......@@ -687,8 +688,12 @@ class ChatWidget(base_class, ui_class):
self.last_message = message
def update_message_status(self, id, status):
if status == 'pending':
return
if status == 'failed':
icon = self.warning_icon
elif status == 'displayed':
icon = self.done_all_icon
else:
icon = self.checkmark_icon
insertion_point = self.chat_element.findFirst(f'span#status-{id}')
......
......@@ -55,10 +55,11 @@
filter: invert(38%) sepia(17%) saturate(0%) hue-rotate(177deg) brightness(94%) contrast(97%);
}
.delivered {
.delivered, .displayed {
filter: invert(28%) sepia(98%) saturate(2550%) hue-rotate(107deg) brightness(102%) contrast(103%);
}
.failed {
filter: invert(12%) sepia(77%) saturate(5700%) hue-rotate(357deg) brightness(73%) contrast(112%);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment