Update recent_activity.html

This commit is contained in:
2025-06-06 09:49:25 +02:00
parent f6abdb5c63
commit d7c1305dae

View File

@@ -21,23 +21,43 @@
<div> <div>
<div class="fw-bold text-primary"> <div class="fw-bold text-primary">
{% if event.event_type == 'file_upload' %} {% if event.event_type == 'file_upload' %}
Uploaded {{ event.details.get('file_name', 'a file') }} Uploaded {{ event.details.get('filename', 'a file') }}
{% elif event.event_type == 'file_download' %} {% elif event.event_type == 'file_download' %}
Downloaded {{ event.details.get('file_name', 'a file') }} Downloaded {{ event.details.get('filename', 'a file') }}
{% elif event.event_type == 'file_delete' %} {% elif event.event_type == 'file_delete' %}
Deleted {{ event.details.get('file_name', 'a file') }} Deleted {{ event.details.get('filename', 'a file') }}
{% elif event.event_type == 'file_star' %} {% elif event.event_type == 'file_star' %}
Starred {{ event.details.get('file_name', 'a file') }} Starred {{ event.details.get('filename', 'a file') }}
{% elif event.event_type == 'file_unstar' %} {% elif event.event_type == 'file_unstar' %}
Unstarred {{ event.details.get('file_name', 'a file') }} Unstarred {{ event.details.get('filename', 'a file') }}
{% elif event.event_type == 'file_move' %}
Moved {{ event.details.get('filename', 'a file') }}
{% elif event.event_type == 'file_rename' %}
Renamed {{ event.details.get('old_name', 'a file') }} to {{ event.details.get('new_name', 'a file') }}
{% elif event.event_type == 'room_create' %} {% elif event.event_type == 'room_create' %}
Created room "{{ event.details.get('room_name', 'a room') }}" Created room "{{ event.details.get('room_name', 'a room') }}"
{% elif event.event_type == 'room_update' %} {% elif event.event_type == 'room_update' %}
Updated room "{{ event.details.get('room_name', 'a room') }}" Updated room "{{ event.details.get('room_name', 'a room') }}"
{% elif event.event_type == 'room_member_add' %}
Added {{ event.details.get('added_user_name', 'a user') }} to room "{{ event.details.get('room_name', 'a room') }}"
{% elif event.event_type == 'room_member_remove' %}
Removed {{ event.details.get('removed_user_name', 'a user') }} from room "{{ event.details.get('room_name', 'a room') }}"
{% elif event.event_type == 'conversation_create' %} {% elif event.event_type == 'conversation_create' %}
Started a conversation Started conversation "{{ event.details.get('name', 'a conversation') }}"
{% elif event.event_type == 'conversation_open' %}
Opened conversation "{{ event.details.get('conversation_name', 'a conversation') }}"
{% elif event.event_type == 'conversation_update' %}
Updated conversation "{{ event.details.get('conversation_name', 'a conversation') }}"
{% elif event.event_type == 'conversation_member_add' %}
Added {{ event.details.get('added_user_name', 'a user') }} to conversation "{{ event.details.get('conversation_name', 'a conversation') }}"
{% elif event.event_type == 'conversation_member_remove' %}
Removed {{ event.details.get('removed_user_name', 'a user') }} from conversation "{{ event.details.get('conversation_name', 'a conversation') }}"
{% elif event.event_type == 'message_create' %} {% elif event.event_type == 'message_create' %}
Sent a message Sent a message in "{{ event.details.get('conversation_name', 'a conversation') }}"
{% elif event.event_type == 'user_create' %}
Created user account for {{ event.details.get('user_name', 'a user') }}
{% elif event.event_type == 'user_update' %}
Updated user account for {{ event.details.get('user_name', 'a user') }}
{% else %} {% else %}
{{ event.event_type|replace('_', ' ')|title }} {{ event.event_type|replace('_', ' ')|title }}
{% endif %} {% endif %}
@@ -55,6 +75,14 @@
<a href="{{ url_for('rooms.room', room_id=event.details.get('room_id')) }}" class="btn btn-sm btn-outline-primary" style="background-color: white; border: 1px solid var(--primary-color); color: var(--primary-color);" onmouseover="this.style.backgroundColor='var(--primary-color)'; this.querySelector('i').style.color='white'" onmouseout="this.style.backgroundColor='white'; this.querySelector('i').style.color='var(--primary-color)'"> <a href="{{ url_for('rooms.room', room_id=event.details.get('room_id')) }}" class="btn btn-sm btn-outline-primary" style="background-color: white; border: 1px solid var(--primary-color); color: var(--primary-color);" onmouseover="this.style.backgroundColor='var(--primary-color)'; this.querySelector('i').style.color='white'" onmouseout="this.style.backgroundColor='white'; this.querySelector('i').style.color='var(--primary-color)'">
<i class="fas fa-external-link-alt"></i> <i class="fas fa-external-link-alt"></i>
</a> </a>
{% elif event.details.get('conversation_id') %}
<a href="{{ url_for('conversations.conversation', conversation_id=event.details.get('conversation_id')) }}" class="btn btn-sm btn-outline-primary" style="background-color: white; border: 1px solid var(--primary-color); color: var(--primary-color);" onmouseover="this.style.backgroundColor='var(--primary-color)'; this.querySelector('i').style.color='white'" onmouseout="this.style.backgroundColor='white'; this.querySelector('i').style.color='var(--primary-color)'">
<i class="fas fa-external-link-alt"></i>
</a>
{% elif event.event_type == 'user_create' or event.event_type == 'user_update' %}
<a href="{{ url_for('contacts.contact', user_id=event.details.get('user_id')) }}" class="btn btn-sm btn-outline-primary" style="background-color: white; border: 1px solid var(--primary-color); color: var(--primary-color);" onmouseover="this.style.backgroundColor='var(--primary-color)'; this.querySelector('i').style.color='white'" onmouseout="this.style.backgroundColor='white'; this.querySelector('i').style.color='var(--primary-color)'">
<i class="fas fa-external-link-alt"></i>
</a>
{% endif %} {% endif %}
</div> </div>
</div> </div>