mirror of
https://github.com/denizsafak/abogen.git
synced 2026-07-18 21:50:28 +02:00
feat: Refactor queue page to use jobs panel rendering for improved performance
This commit is contained in:
@@ -363,8 +363,7 @@ def index() -> str:
|
||||
|
||||
@web_bp.get("/queue")
|
||||
def queue_page() -> str:
|
||||
jobs = _service().list_jobs()
|
||||
return render_template("queue.html", jobs=jobs)
|
||||
return render_template("queue.html", jobs_panel=_render_jobs_panel())
|
||||
|
||||
|
||||
@web_bp.route("/settings", methods=["GET", "POST"])
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
|
||||
{% block content %}
|
||||
<section class="card" id="jobs-panel" hx-get="{{ url_for('web.jobs_partial') }}" hx-trigger="load, every 3s" hx-target="#jobs-panel" hx-swap="innerHTML">
|
||||
{% include "partials/jobs.html" %}
|
||||
{{ jobs_panel|safe }}
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user