feat(main): track total project count in project

listing

Introduce a new variable to hold the total number of projects when
accessing the projects listing route. This addition enables improved
tracking and potential features that require knowing the total number of
projects upfront, such as pagination controls or statistics display.
This change only affects the `project_list` function when the path
matches the projects endpoint.

By having the total number of projects readily available, future
enhancements or adjustments to the UI/UX involving the display of
project quantities can be more easily implemented, offering a better
user experience.
This commit is contained in:
Kumi 2024-03-28 16:25:33 +01:00
parent a8c4ef5827
commit b517139b00
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -448,6 +448,7 @@ def project_list(head, sort="", per_page=20):
if path in ("/projects/", "/projects"):
ibles = global_ibles["/projects"]
total = len(ibles)
else:
if "projects" in path.split("/"):
ibles = []