mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-01-04 18:05:36 +10:00
Improve admin snapshot list/grid views with better UX
- Add prominent view mode switcher with List/Grid toggle buttons - Improve filter sidebar CSS with modern styling, rounded corners - Add live progress bar for in-progress snapshots showing hooks status - Show plugin icons only when output directory has content - Display archive result output_size sum from new field - Show hooks succeeded/total count in size column - Add get_progress_stats() method to Snapshot model - Add CSS for progress spinner and status badges - Update grid view template with progress indicator for archiving cards - Add tests for admin views, search, and progress stats
This commit is contained in:
@@ -126,6 +126,21 @@
|
||||
.cards .card .card-info .timestamp {
|
||||
font-weight: 600;
|
||||
}
|
||||
.cards .card .card-progress {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 4px 0;
|
||||
}
|
||||
.cards .card .card-progress .progress-text {
|
||||
font-size: 11px;
|
||||
color: #3b82f6;
|
||||
font-weight: 500;
|
||||
}
|
||||
.cards .card.archiving {
|
||||
border-color: #3b82f6;
|
||||
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
|
||||
}
|
||||
.cards .card .card-footer code {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
@@ -145,14 +160,21 @@
|
||||
{% block content %}
|
||||
<section class="cards">
|
||||
{% for obj in results %}
|
||||
<div class="card">
|
||||
<div class="card{% if obj.status == 'started' %} archiving{% endif %}">
|
||||
<div class="card-info">
|
||||
<a href="{% url 'admin:core_snapshot_change' obj.pk %}">
|
||||
<span class="timestamp">{{obj.bookmarked_at}}</span>
|
||||
</a>
|
||||
<div style="padding: 4px 0;">
|
||||
{{ obj.icons|safe }}
|
||||
</div>
|
||||
{% if obj.status == 'started' %}
|
||||
<div class="card-progress">
|
||||
<span class="snapshot-progress-spinner"></span>
|
||||
<span class="progress-text">Archiving...</span>
|
||||
</div>
|
||||
{% else %}
|
||||
<div style="padding: 4px 0;">
|
||||
{{ obj.icons|safe }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<label>
|
||||
<span>🗄 {{ obj.archive_size | file_size }}</span>
|
||||
<input type="checkbox" name="_selected_action" value="{{obj.pk}}"/>
|
||||
|
||||
Reference in New Issue
Block a user