diff --git a/modules/config_games/config_servers.php b/modules/config_games/config_servers.php index 5e09b632..811fe5a4 100644 --- a/modules/config_games/config_servers.php +++ b/modules/config_games/config_servers.php @@ -58,10 +58,13 @@ function config_games_print_editor_css() .xml-node__attributes .attr-row{display:flex;gap:8px;align-items:center;margin-bottom:6px} .xml-node__attributes .attr-row input[type="text"]{flex:1} .xml-children{margin-top:10px;border-left:2px solid #2a2a2a;padding-left:12px} -.xml-actions{text-align:right;margin-top:16px} +.xml-actions{display:flex;justify-content:flex-end;margin-top:16px;padding:8px 18px 0} .xml-node__actions{display:flex;gap:8px;align-items:center} .xml-node__apply{background:#1c6dd0;border:1px solid #114b99;color:#fff;padding:6px 12px;border-radius:4px;cursor:pointer} .xml-node__apply:hover{background:#1f7aec} +.xml-global-save{background:#1c6dd0;border:1px solid #114b99;color:#fff;padding:10px 28px;border-radius:4px;font-weight:600;text-transform:uppercase;letter-spacing:0.03em;cursor:pointer;transition:background 0.2s ease,transform 0.2s ease;box-shadow:0 2px 6px rgba(0,0,0,0.35)} +.xml-global-save:hover{background:#1f7aec;transform:translateY(-1px)} +.xml-global-save--top{float:right;margin:0 18px 12px 0} .xml-hint{font-size:0.85rem;color:#999;margin-top:4px} CSS; @@ -397,10 +400,10 @@ function exec_ogp_module() { } else { echo "
"; echo ""; - echo ""; + echo ""; echo "
"; echo config_games_render_editor($xml); - echo "
"; + echo "
"; echo "
"; echo "

Use the action dropdown to remove entire sections. Attribute values left blank will be removed. Script sections such as post_install are fully editable.

"; } diff --git a/modules/config_games/xml_config_creator.php b/modules/config_games/xml_config_creator.php index a5dc8763..eaae2cc0 100644 --- a/modules/config_games/xml_config_creator.php +++ b/modules/config_games/xml_config_creator.php @@ -22,147 +22,143 @@ * */ -function exec_ogp_module() { - ?> -

XML Config Creator

- - - - - - - - - - - "; + unset($dir); + ksort($protocols); + foreach ($protocols as $gameq => $info) { + $queryChoices[$gameq] = $info['name']; + } + $queryLabel = 'GameQ Query Name'; } - else - ?> - - - - - - - - - - - - - - - -
- Query protocol -
- -
- - "; - if($_POST['protocol'] == "lgsl") - { - echo "LGSL Query Name -
- OS: - - -
- Architecture - - -
- Installer - - -
- - -
- +.xml-creator-wrapper{max-width:1100px;margin:0 auto;padding:20px;color:#eee;font-family:'Segoe UI',Tahoma,Arial,sans-serif} +.xml-creator-title{margin-bottom:4px;font-size:1.8rem;font-weight:600} +.xml-creator-lead{color:#bbb;margin-bottom:20px;max-width:900px} +.xml-creator-card{background:#111;border:1px solid #222;border-radius:10px;padding:18px;margin-bottom:18px;box-shadow:0 8px 18px rgba(0,0,0,0.25)} +.xml-creator-card label{display:block;font-size:0.9rem;color:#aaa;margin-bottom:6px;text-transform:uppercase;letter-spacing:0.08em} +.xml-creator-card select,.xml-creator-card button,.xml-creator-card input[type="text"],.xml-creator-card input[type="number"]{width:100%;padding:10px 12px;border:1px solid #2f2f2f;border-radius:6px;background:#0c0c0c;color:#fff;font-size:1rem} +.xml-creator-hint{font-size:0.85rem;color:#888;margin-top:6px} +.xml-creator-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:18px} +.xml-creator-actions{display:flex;justify-content:flex-end;margin-top:12px} +.xml-creator-note{font-size:0.9rem;color:#bbb;margin:12px 0 24px} +.xml-creator-protocol-form{margin-bottom:26px} +.xml-global-save{background:#1c6dd0;border:1px solid #114b99;color:#fff;padding:10px 28px;border-radius:4px;font-weight:600;text-transform:uppercase;letter-spacing:0.03em;cursor:pointer;transition:background 0.2s ease,transform 0.2s ease;box-shadow:0 2px 6px rgba(0,0,0,0.35)} +.xml-global-save:hover{background:#1f7aec;transform:translateY(-1px)} + +CSS; + + echo "
"; + echo "

XML Config Creator

"; + echo "

Use this guided workflow to spin up a brand new XML configuration template. Pick the query layer first, then define the operating system, architecture, and installer defaults before launching the step-by-step wizard.

"; + + echo "
"; + echo ""; + echo ""; + echo "

Selecting a protocol automatically reloads this page and reveals available query names.

"; + echo "
"; + + echo "
"; + if ($selectedProtocol !== '') { + echo ""; + } + + echo "
"; + if (!empty($queryChoices)) { + $label = htmlspecialchars($queryLabel, ENT_QUOTES, 'UTF-8'); + echo ""; + echo ""; + echo "

The query name informs the monitoring layer which protocol preset to use.

"; + } else { + echo ""; + echo "
Select LGSL or GameQ above if this config should publish a query endpoint. You can skip this if the game is not queryable.
"; + } + echo "
"; + + echo "
"; + echo "
"; + echo ""; + echo ""; + echo "

Defines which agent pool can install the server.

"; + echo "
"; + + echo "
"; + echo ""; + echo ""; + echo "

Pick the CPU target that the XML should advertise.

"; + echo "
"; + + echo "
"; + echo ""; + echo ""; + echo "

Optional helper to bootstrap files directly from Steam.

"; + echo "
"; + echo "
"; + + echo "

When you click the button below the panel will send these settings into the XML creation wizard so the initial document already matches your desired platform.

"; + echo "
"; + echo "
"; + echo "
"; +}