feat(start): replace start page with Silo web app webview #117
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Replace the native Qt Widgets start page with a Python-based dual-mode view:
Architecture
Python module using a
QStackedWidgetwith two pages:Page 1: Silo Web View (online)
QWebEngineViewpointed at the Silo base URL (http://localhost:8080by default)acceptNavigationRequestto keep navigation within SiloPage 2: Offline Fallback (native Qt)
.FCStdfiles from FreeCAD preferences (reuse existingRecentFilesModelpattern)Connectivity Logic
QTimer-based polling (e.g. every 5s) hitting the Silo API URLImplementation Details
src/Mod/Start/StartGui.pyor similar, following the Help module pattern (src/Mod/Help/Help.py)Gui::MDIViewsubclass, added viamw.addWindow()Start_Startcommand to instantiate the new viewFreeCAD.ParamGet('User parameter:BaseApp/Preferences/Mod/Silo').GetString('ApiUrl'), strip/apisuffix for web UI root, fall back toSILO_API_URLenv var thenhttp://localhost:8080StartLauncherbehavior that shows the page on startupFallback Behavior
If QtWebEngine is not available at all (import fails):
Related
mods/silo/(Go backend, server-rendered HTML templates at/, API at/api)src/Mod/Help/Help.pysrc/Mod/Start/Gui/StartView.cppmods/silo/pkg/freecad/silo_commands.py→_get_api_url()