Create real careers from the native wizard and preserve manager presentation (by Codex)

This commit is contained in:
Codex committed 2026-10-29 01:11:41 +01:00
1 parent 738ecc7a09
commit ce1535fe2d
38 files changed
+466 -75

No files matched your search

+4 -4
View File
@@ -4,7 +4,7 @@
// belong to the controller. No participants or pairings are invented by the
// renderer.
std::string App::render_opening() {
const auto state = snap().state;
const auto state = engine_mode_?engine_opening_state_:snap().state;
const auto &flow = state.at("opening_flow");
const auto phase = flow.at("phase").get<std::string>();
const bool playing = flow.value("playing", false) && !opening_io_blocked_;
@@ -46,7 +46,8 @@ std::string App::render_opening() {
"<span class=\"opening-heading-detail\">" +
esc(detail) + "</span></header>";
};
const auto note = [](const std::string &text) {
const auto note = [&](const std::string &text) {
if(engine_mode_)return std::string();
return "<span class=\"opening-demo-note\">" + esc(text) + "</span>";
};
const auto pair = [&](int index, int known, int logo_size,
@@ -116,8 +117,7 @@ std::string App::render_opening() {
if (entrants.empty()) {
body += "<div class=\"opening-empty-entrants\"><h3><span>Keine "
"Teilnehmer eingetragen</span></h3>"
"<p><span>Für diesen Wettbewerb sind in dieser Demo-Welt keine "
"Vereine vorgesehen.</span></p></div>";
"<p><span>"+std::string(engine_mode_?"Für diesen Wettbewerb sind derzeit keine deutschen Vereine gemeldet.":"Für diesen Wettbewerb sind in dieser Demo-Welt keine Vereine vorgesehen.")+"</span></p></div>";
} else {
const bool single = entrants.size() == 1;
const auto card = [&](const Json *c) {