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:
parent
a8c4ef5827
commit
b517139b00
1 changed files with 1 additions and 0 deletions
1
main.py
1
main.py
|
@ -448,6 +448,7 @@ def project_list(head, sort="", per_page=20):
|
||||||
|
|
||||||
if path in ("/projects/", "/projects"):
|
if path in ("/projects/", "/projects"):
|
||||||
ibles = global_ibles["/projects"]
|
ibles = global_ibles["/projects"]
|
||||||
|
total = len(ibles)
|
||||||
else:
|
else:
|
||||||
if "projects" in path.split("/"):
|
if "projects" in path.split("/"):
|
||||||
ibles = []
|
ibles = []
|
||||||
|
|
Loading…
Reference in a new issue