Features: 1) Add "eVibes" version display in admin dashboard footer;

Fixes: 1) Remove dashboard title exclusion logic; 2) Refactor quick links to include title, link, and optional icon;

Extra: 1) Add separator and version text component; 2) Update template to render version info; 3) Minor formatting cleanup.
This commit is contained in:
Egor Pavlovich Gorbunov 2025-11-16 16:03:11 +03:00
parent 20ecaa683f
commit b305876feb
2 changed files with 18 additions and 5 deletions

View file

@ -17,6 +17,7 @@
{% component "unfold/components/container.html" %}
{% component "unfold/components/title.html" %}
{% trans "Dashboard" %}
<br/>
{% endcomponent %}
<div class="grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-4 gap-4 mb-6">
@ -147,5 +148,15 @@
{% endcomponent %}
</div>
{% component "unfold/components/separator.html" %}
{% endcomponent %}
<div class="mt-4">
{% component "unfold/components/text.html" with class="text-center text-xs text-gray-500 dark:text-gray-400" %}
"eVibes" {{ evibes_version }} · "Wiseless Team"
{% endcomponent %}
</div>
{% endcomponent %}
{% endblock %}
{% endblock %}

View file

@ -430,10 +430,11 @@ def dashboard_callback(request, context):
link = item.get("link")
if not title or not link:
continue
if str(title).lower() == "dashboard":
continue
url = str(link)
quick_links.append({"name": str(title), "href": url})
quick_links.append({
"title": str(title),
"link": str(link),
**({"icon": item.get("icon")} if item.get("icon") else {}),
})
most_wished: dict[str, str | int | float | None] | None = None
with suppress(Exception):
@ -481,6 +482,7 @@ def dashboard_callback(request, context):
"revenue_net_30": revenue_net_30,
"returns_30": returns_30,
"processed_orders_30": processed_orders_30,
"evibes_version": settings.EVIBES_VERSION,
"quick_links": quick_links,
"most_wished_product": most_wished,
"most_popular_product": most_popular,