From da68858fa57a9d7e66a30a69f63df4d29bffdb6c Mon Sep 17 00:00:00 2001 From: Egor fureunoir Gorbunov Date: Fri, 14 Nov 2025 14:53:17 +0300 Subject: [PATCH] Features: 1) Update `topmenu_links` configuration to add "GraphQL Docs," "Swagger," and "Redoc" with platform-specific URLs; 2) Change default Jazzmin themes to `flatly` and `darkly`; Fixes: 1) Standardize `new_window` settings across `topmenu_links`; Extra: 1) Reformat and improve readability of `topmenu_links` definitions; 2) Minor code style adjustments. --- evibes/settings/jazzmin.py | 45 ++++++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/evibes/settings/jazzmin.py b/evibes/settings/jazzmin.py index 1556ce3c..4e16f4b2 100644 --- a/evibes/settings/jazzmin.py +++ b/evibes/settings/jazzmin.py @@ -17,25 +17,46 @@ JAZZMIN_SETTINGS = { "search_model": None, "user_avatar": "avatar", "topmenu_links": [ - {"name": _("Home"), "url": "admin:index"}, - {"name": _("Storefront"), "url": f"https://{STOREFRONT_DOMAIN}", "new_window": True}, # type: ignore [index] { - "name": "GraphQL Docs", - "url": f"https://api.{BASE_DOMAIN}/graphql", # type: ignore [index] - "new_window": True, + "name": _("Home"), + "url": "admin:index", + "new_window": False, }, { - "name": "REST Docs", - "url": f"https://api.{BASE_DOMAIN}/docs/swagger", # type: ignore [index] - "new_window": True, + "name": _("Storefront"), + "url": f"https://{STOREFRONT_DOMAIN}", + "new_window": False, + }, + { + "name": "GraphQL Docs", + "url": "graphql-platform", + "new_window": False, + }, + { + "name": "Swagger", + "url": "swagger-ui-platform", + "new_window": False, + }, + { + "name": "Redoc", + "url": "redoc-ui-platform", + "new_window": False, }, { "name": _("Taskboard"), "url": "https://plane.wiseless.xyz/spaces/issues/dd33cb0ab9b04ef08a10f7eefae6d90c/?board=kanban", "new_window": True, }, - {"name": "GitLab", "url": "https://gitlab.com/wiseless/evibes", "new_window": True}, - {"name": _("Support"), "url": "https://t.me/fureunoir", "new_window": True}, + { + "name": "GitLab", + "url": "https://gitlab.com/wiseless/evibes", + "new_window": True, + }, + { + "name": _("Support"), + "url": "https://t.me/fureunoir", + "new_window": True, + }, ], "usermenu_links": [], "show_sidebar": True, @@ -58,6 +79,6 @@ JAZZMIN_SETTINGS = { } JAZZMIN_UI_TWEAKS = { - "theme": "cyborg", - "dark_mode_theme": "cyborg", + "theme": "flatly", + "dark_mode_theme": "darkly", }