Jacob Schmidt e15d4b3066 Introduce shared web UI runtime and migrate org/store bridges
- add common ForgeWebUI runtime, site loader, and SQF WebUI bridge base declarations
- migrate org and store web UIs to src-driven bundles and new bridge/bootstrap flow
- update addon configs/prep hooks and document the shared CT_WEBBROWSER framework
2026-03-14 00:40:34 -05:00
..
2025-11-26 18:33:09 -06:00
2025-11-26 18:33:09 -06:00
2025-11-26 18:33:09 -06:00
2025-11-26 18:33:09 -06:00
2025-11-26 18:33:09 -06:00
2025-11-26 18:33:09 -06:00
2025-11-26 18:33:09 -06:00
2025-11-26 18:33:09 -06:00
2025-11-26 18:33:09 -06:00
2025-11-26 18:33:09 -06:00

forge_client_org

Player organization UI and client integration.

UI Login Contract

The web UI sends the following request through A3API.SendAlert:

{
    "event": "org::login::request",
    "data": {
        "email": "admin@spearnet.mil",
        "password": "secret"
    }
}

On success, SQF should call the browser bridge with:

private _payload = createHashMapFromArray [
    ["session", createHashMapFromArray [
        ["actorName", name player],
        ["role", "Leader"]
    ]],
    ["portalData", createHashMapFromArray [
        ["org", createHashMapFromArray [
            ["name", "Black Rifle Company"],
            ["tag", "BRC-0160566824"],
            ["type", "Private Military Company"],
            ["status", "Operational"],
            ["headquarters", "Georgetown Command Annex"],
            ["owner", "Jacob Schmidt"]
        ]],
        ["funds", 482750],
        ["reputation", 72],
        ["members", [
            createHashMapFromArray [["name", "Jacob Schmidt"]],
            createHashMapFromArray [["name", "Mara Velez"]]
        ]],
        ["fleet", [
            createHashMapFromArray [
                ["name", "UH-80 Ghost Hawk"],
                ["type", "helicopter"],
                ["status", "Ready"],
                ["damage", "16%"]
            ]
        ]],
        ["assets", [
            createHashMapFromArray [
                ["name", "First Aid Kits"],
                ["type", "items"],
                ["quantity", "36"]
            ]
        ]],
        ["activity", []],
        ["roadmap", []]
    ]]
];

_control ctrlWebBrowserAction [
    "ExecJS",
    format ["OrgUIBridge.receiveLoginSuccess(%1)", toJSON _payload]
];

On failure:

private _payload = createHashMapFromArray [
    ["message", "Invalid credentials."]
];

_control ctrlWebBrowserAction [
    "ExecJS",
    format ["OrgUIBridge.receiveLoginFailure(%1)", toJSON _payload]
];

Current implementation:

  • fnc_handleUIEvents.sqf now handles org::login::request
  • success hydrates the portal with session + portalData
  • failure returns a single message string for inline UI feedback