Fix xolours and dashboard

This commit is contained in:
2025-05-27 13:30:44 +02:00
parent 9dc5fbdebc
commit 60582d4520
5 changed files with 25 additions and 40 deletions

View File

@@ -110,7 +110,7 @@ def init_routes(main_bp):
starred_count = RoomFile.query.filter(RoomFile.starred_by.contains(current_user)).count() starred_count = RoomFile.query.filter(RoomFile.starred_by.contains(current_user)).count()
# Get oldest trash date and total trash size # Get oldest trash date and total trash size
oldest_trash = RoomFile.query.filter_by(deleted=True).order_by(RoomFile.deleted_at.asc()).first() oldest_trash = RoomFile.query.filter_by(deleted=True).order_by(RoomFile.deleted_at.asc()).first()
oldest_trash_date = oldest_trash.deleted_at.strftime('%Y-%m-%d') if oldest_trash else None oldest_trash_date = oldest_trash.deleted_at.strftime('%Y-%m-%d') if oldest_trash and oldest_trash.deleted_at else None
trash_size = db.session.query(db.func.sum(RoomFile.size)).filter(RoomFile.deleted==True).scalar() or 0 trash_size = db.session.query(db.func.sum(RoomFile.size)).filter(RoomFile.deleted==True).scalar() or 0
# Get files that will be deleted in next 7 days # Get files that will be deleted in next 7 days
@@ -217,7 +217,7 @@ def init_routes(main_bp):
).count() ).count()
# Get oldest trash date and total trash size for user's rooms # Get oldest trash date and total trash size for user's rooms
oldest_trash = RoomFile.query.filter(RoomFile.room_id.in_(room_ids), RoomFile.deleted==True).order_by(RoomFile.deleted_at.asc()).first() oldest_trash = RoomFile.query.filter(RoomFile.room_id.in_(room_ids), RoomFile.deleted==True).order_by(RoomFile.deleted_at.asc()).first()
oldest_trash_date = oldest_trash.deleted_at.strftime('%Y-%m-%d') if oldest_trash else None oldest_trash_date = oldest_trash.deleted_at.strftime('%Y-%m-%d') if oldest_trash and oldest_trash.deleted_at else None
trash_size = db.session.query(db.func.sum(RoomFile.size)).filter(RoomFile.room_id.in_(room_ids), RoomFile.deleted==True).scalar() or 0 trash_size = db.session.query(db.func.sum(RoomFile.size)).filter(RoomFile.room_id.in_(room_ids), RoomFile.deleted==True).scalar() or 0
# Get files that will be deleted in next 7 days for user's rooms # Get files that will be deleted in next 7 days for user's rooms

View File

@@ -1,51 +1,41 @@
:root { :root {
/* Primary Colors */ /* Default Colors - These will be overridden by dynamic colors */
--primary-color: #16767b; --primary-color: #16767b;
--primary-light: #1a8a90; --primary-light: #1a8a90;
--primary-bg-light: #e6f3f4;
--primary-opacity-15: #16767b26;
/* Secondary Colors */
--secondary-color: #741b5f; --secondary-color: #741b5f;
--secondary-light: #8a2170; --secondary-light: #8a2170;
--secondary-bg-light: #f5e6f2;
/* Background Colors */ --secondary-opacity-15: #741b5f26;
--bg-color: #f8f9fa;
--white: #ffffff;
--primary-bg-light: #e6f3f4;
/* Text Colors */
--text-dark: #333333;
--text-muted: #6c757d;
/* Status Colors */
--warning-color: #ffd700;
--danger-color: #dc3545;
/* Shadow Colors */
--shadow-color: rgba(0, 0, 0, 0.1);
--shadow-color-light: rgba(0, 0, 0, 0.25);
/* Border Colors */
--border-color: #dee2e6;
--border-light: #e9ecef;
/* Opacity Colors */
--primary-opacity-8: rgba(22, 118, 123, 0.08);
--primary-opacity-12: rgba(22, 118, 123, 0.12);
--primary-opacity-15: rgba(22, 118, 123, 0.15);
--primary-opacity-20: rgba(22, 118, 123, 0.2);
--warning-opacity-15: rgba(255, 215, 0, 0.15);
--danger-opacity-15: rgba(220, 53, 69, 0.15);
/* Chart Colors */ /* Chart Colors */
--chart-primary: #16767b; --chart-primary: #16767b;
--chart-secondary: #741b5f; --chart-secondary: #741b5f;
--chart-warning: #ffd700; --chart-warning: #ffd700;
/* Primary Chart Colors */
--chart-primary-light: #2c9da9; --chart-primary-light: #2c9da9;
--chart-primary-lighter: #43c4d3; --chart-primary-lighter: #43c4d3;
--chart-primary-lightest: #5ad9e8; --chart-primary-lightest: #5ad9e8;
--chart-primary-pale: #71eefd; --chart-primary-pale: #71eefd;
/* Secondary Chart Colors */
--chart-secondary-light: #8a2b73; --chart-secondary-light: #8a2b73;
--chart-secondary-lighter: #a03b87; --chart-secondary-lighter: #a03b87;
--chart-secondary-lightest: #b64b9b; --chart-secondary-lightest: #b64b9b;
--chart-secondary-pale: #cc5baf; --chart-secondary-pale: #cc5baf;
/* Other Colors */
--bg-color: #f8f9fa;
--white: #ffffff;
--text-dark: #333333;
--text-muted: #6c757d;
--warning-color: #ffd700;
--danger-color: #dc3545;
--shadow-color: rgba(0, 0, 0, 0.1);
--shadow-color-light: rgba(0, 0, 0, 0.25);
--border-color: #dee2e6;
--border-light: #e9ecef;
} }

View File

@@ -1,9 +1,5 @@
:root { /* Import color variables */
--primary-color: #16767b; @import 'colors.css';
--secondary-color: #741b5f;
--primary-light: #1a8a90;
--secondary-light: #8a2170;
}
.navbar { .navbar {
background-color: var(--primary-color) !important; background-color: var(--primary-color) !important;

View File

@@ -10,7 +10,6 @@
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet"> <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
<link href="{{ url_for('static', filename='css/file-grid.css') }}" rel="stylesheet"> <link href="{{ url_for('static', filename='css/file-grid.css') }}" rel="stylesheet">
<link href="{{ url_for('static', filename='css/base.css') }}" rel="stylesheet"> <link href="{{ url_for('static', filename='css/base.css') }}" rel="stylesheet">
<link rel="stylesheet" href="{{ url_for('static', filename='css/colors.css') }}">
<link rel="stylesheet" href="{{ url_for('main.dynamic_colors') }}"> <link rel="stylesheet" href="{{ url_for('main.dynamic_colors') }}">
{% block extra_css %}{% endblock %} {% block extra_css %}{% endblock %}
</head> </head>