Only load legacy FE extension if --enable-manager-legacy-ui is set (#1746)

* only load JS extensions when legacy arg is set

* add `is_legacy_manager_ui` endpoint
This commit is contained in:
Christian Byrne
2025-04-15 07:03:04 +08:00
committed by GitHub
parent 1816bb748e
commit abfd85602e
2 changed files with 8 additions and 4 deletions

View File

@@ -991,6 +991,13 @@ def populate_markdown(x):
if 'title' in x:
x['title'] = manager_util.sanitize_tag(x['title'])
@routes.get("/v2/manager/is_legacy_manager_ui")
async def is_legacy_manager_ui(request):
return web.json_response(
{"is_legacy_manager_ui": args.enable_manager_legacy_ui},
content_type="application/json",
status=200,
)
# freeze imported version
startup_time_installed_node_packs = core.get_installed_node_packs()