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:
parent
20ecaa683f
commit
b305876feb
2 changed files with 18 additions and 5 deletions
|
|
@ -17,6 +17,7 @@
|
||||||
{% component "unfold/components/container.html" %}
|
{% component "unfold/components/container.html" %}
|
||||||
{% component "unfold/components/title.html" %}
|
{% component "unfold/components/title.html" %}
|
||||||
{% trans "Dashboard" %}
|
{% trans "Dashboard" %}
|
||||||
|
<br/>
|
||||||
{% endcomponent %}
|
{% endcomponent %}
|
||||||
|
|
||||||
<div class="grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-4 gap-4 mb-6">
|
<div class="grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-4 gap-4 mb-6">
|
||||||
|
|
@ -147,5 +148,15 @@
|
||||||
{% endcomponent %}
|
{% endcomponent %}
|
||||||
</div>
|
</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 %}
|
{% endcomponent %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
@ -430,10 +430,11 @@ def dashboard_callback(request, context):
|
||||||
link = item.get("link")
|
link = item.get("link")
|
||||||
if not title or not link:
|
if not title or not link:
|
||||||
continue
|
continue
|
||||||
if str(title).lower() == "dashboard":
|
quick_links.append({
|
||||||
continue
|
"title": str(title),
|
||||||
url = str(link)
|
"link": str(link),
|
||||||
quick_links.append({"name": str(title), "href": url})
|
**({"icon": item.get("icon")} if item.get("icon") else {}),
|
||||||
|
})
|
||||||
|
|
||||||
most_wished: dict[str, str | int | float | None] | None = None
|
most_wished: dict[str, str | int | float | None] | None = None
|
||||||
with suppress(Exception):
|
with suppress(Exception):
|
||||||
|
|
@ -481,6 +482,7 @@ def dashboard_callback(request, context):
|
||||||
"revenue_net_30": revenue_net_30,
|
"revenue_net_30": revenue_net_30,
|
||||||
"returns_30": returns_30,
|
"returns_30": returns_30,
|
||||||
"processed_orders_30": processed_orders_30,
|
"processed_orders_30": processed_orders_30,
|
||||||
|
"evibes_version": settings.EVIBES_VERSION,
|
||||||
"quick_links": quick_links,
|
"quick_links": quick_links,
|
||||||
"most_wished_product": most_wished,
|
"most_wished_product": most_wished,
|
||||||
"most_popular_product": most_popular,
|
"most_popular_product": most_popular,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue