mirror of
https://github.com/dredx/prole.git
synced 2026-09-23 10:13:58 +00:00
45 lines
1.1 KiB
Python
45 lines
1.1 KiB
Python
"""
|
|
Main UI orchestration for Knoe Installer.
|
|
|
|
This module centralizes canvas/page registration and delegates page rendering
|
|
to feature modules. The legacy install.py will import and invoke run().
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from . import build as build_mod
|
|
from . import deploy as deploy_mod
|
|
|
|
|
|
def register_page(app, page_id: str, frame):
|
|
if not hasattr(app, "pages"):
|
|
app.pages = {}
|
|
app.pages[page_id] = frame
|
|
|
|
|
|
def clear_canvas_page(app):
|
|
if getattr(app, "bg_canvas", None) is None:
|
|
return
|
|
for item in getattr(app, "_canvas_items", []):
|
|
try:
|
|
app.bg_canvas.delete(item)
|
|
except Exception:
|
|
pass
|
|
app._canvas_items = []
|
|
|
|
|
|
def create_page_build(app):
|
|
# Delegates build page UI creation to knoe.build
|
|
return build_mod.create_build_page(app)
|
|
|
|
|
|
def create_page_deploy(app):
|
|
# Delegates deploy page UI creation to knoe.deploy
|
|
return deploy_mod.create_deploy_page(app)
|
|
|
|
|
|
def run(app):
|
|
"""Entry for the legacy install.py to wire pages via this module."""
|
|
# Register pages through this orchestrator if needed in the future.
|
|
pass
|