Deprioritize closed

This commit is contained in:
Minecon724 2025-04-04 08:35:32 +02:00
commit b8cc05e0ab
Signed by: Minecon724
GPG key ID: A02E6E67AB961189
3 changed files with 13 additions and 6 deletions

View file

@ -55,7 +55,7 @@ def index():
break
# Sort inquiries - unread first, then by original position (recency)
inquiries_with_data.sort(key=lambda x: (0 if x['is_unread'] else 1, x['position']))
inquiries_with_data.sort(key=lambda x: (1 if x['inquiry'].is_closed else 0, 0 if x['is_unread'] else 1, x['position']))
return render_template('create_inquiry.html', recent_inquiries=inquiries_with_data)

View file

@ -10,7 +10,6 @@ body {
a {
color: #6da8ff;
text-decoration: none;
transition: color 0.2s ease;
}
a:hover {
color: #8fc0ff;
@ -137,7 +136,6 @@ th {
text-decoration: none;
display: inline-block;
font-weight: bold;
transition: background-color 0.3s;
}
.btn-primary:hover {
background-color: #2d6c30;
@ -200,8 +198,17 @@ th {
padding: 1rem;
background-color: #333;
border-radius: 4px;
transition: background-color 0.2s ease;
border-left: 3px solid transparent;
border-left: 3px solid #070;
}
/* Closed inquiry styling */
.inquiry-item.closed {
filter: grayscale(70%);
background-color: #2a2a2a;
}
.inquiry-item.closed:hover {
background-color: #303030;
}
.inquiry-item:hover {

View file

@ -33,7 +33,7 @@
{% for item in recent_inquiries %}
<li>
<a href="{{ url_for('inquiry', inquiry_id=item.inquiry.id) }}">
<div class="inquiry-item {% if item.is_unread %}unread{% endif %}">
<div class="inquiry-item {% if item.is_unread %}unread{% endif %} {% if item.inquiry.is_closed %}closed{% endif %}">
<div class="inquiry-header">
<span class="inquiry-id">Inquiry #{{ item.inquiry.id[:8] }}</span>
<span class="inquiry-status {% if item.inquiry.is_closed %}closed{% else %}open{% endif %}">