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): ...@@ -641,6 +641,7 @@ class ChatWidget(base_class, ui_class):
default_user_icon = IconDescriptor(Resources.get('icons/default-avatar.png')) default_user_icon = IconDescriptor(Resources.get('icons/default-avatar.png'))
checkmark_icon = IconDescriptor(Resources.get('icons/checkmark.svg')) checkmark_icon = IconDescriptor(Resources.get('icons/checkmark.svg'))
warning_icon = IconDescriptor(Resources.get('icons/warning.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() chat_template = open(Resources.get('chat/template.html')).read()
...@@ -687,8 +688,12 @@ class ChatWidget(base_class, ui_class): ...@@ -687,8 +688,12 @@ class ChatWidget(base_class, ui_class):
self.last_message = message self.last_message = message
def update_message_status(self, id, status): def update_message_status(self, id, status):
if status == 'pending':
return
if status == 'failed': if status == 'failed':
icon = self.warning_icon icon = self.warning_icon
elif status == 'displayed':
icon = self.done_all_icon
else: else:
icon = self.checkmark_icon icon = self.checkmark_icon
insertion_point = self.chat_element.findFirst(f'span#status-{id}') insertion_point = self.chat_element.findFirst(f'span#status-{id}')
......
...@@ -55,10 +55,11 @@ ...@@ -55,10 +55,11 @@
filter: invert(38%) sepia(17%) saturate(0%) hue-rotate(177deg) brightness(94%) contrast(97%); 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%); filter: invert(28%) sepia(98%) saturate(2550%) hue-rotate(107deg) brightness(102%) contrast(103%);
} }
.failed { .failed {
filter: invert(12%) sepia(77%) saturate(5700%) hue-rotate(357deg) brightness(73%) contrast(112%); 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