From f6abdb5c63aa11957b5d714b643e0c6649dad84e Mon Sep 17 00:00:00 2001 From: Kobe Date: Fri, 6 Jun 2025 09:44:23 +0200 Subject: [PATCH] better usage limit and deletion warnings --- templates/components/usage_limits.html | 122 +++++++++++++++---------- templates/rooms/rooms.html | 18 +++- 2 files changed, 88 insertions(+), 52 deletions(-) diff --git a/templates/components/usage_limits.html b/templates/components/usage_limits.html index 4c890db..5e18edd 100644 --- a/templates/components/usage_limits.html +++ b/templates/components/usage_limits.html @@ -1,67 +1,93 @@ {% from 'common/macros.html' import format_size %} {% macro usage_limits(usage_stats) %} -
+
-
-
Usage Limits
+
+
Usage Limits
- - -
-
-
- - Rooms: +
+ +
+
+
+ + Rooms: + +
+
{{ usage_stats.current_rooms }} / {{ usage_stats.max_rooms }}
+
+
+
-
{{ usage_stats.current_rooms }} / {{ usage_stats.max_rooms }}
-
-
-
-
- -
-
-
- - Conversations: + +
+
+
+ + Conversations: + +
+
{{ usage_stats.current_conversations }} / {{ usage_stats.max_conversations }}
+
+
+
-
{{ usage_stats.current_conversations }} / {{ usage_stats.max_conversations }}
-
-
-
-
- -
-
-
- - Storage: + +
+
+
+ + Storage: + +
+
{{ format_size(usage_stats.current_storage) }} / {{ format_size(usage_stats.max_storage) }}
+
+
+
-
{{ format_size(usage_stats.current_storage) }} / {{ format_size(usage_stats.max_storage) }}
-
-
-
+ + {% endmacro %} \ No newline at end of file diff --git a/templates/rooms/rooms.html b/templates/rooms/rooms.html index 2838295..0d496c8 100644 --- a/templates/rooms/rooms.html +++ b/templates/rooms/rooms.html @@ -91,24 +91,34 @@
- {% if current_user.is_admin or (current_user.is_manager and room.member_permissions|selectattr('user_id', 'equalto', current_user.id)|list|length > 0) %} + {% if current_user.is_admin %}