feat: add battlefield, match stub, and upload result templates
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use BattleForge\Http\Escape;
|
||||
|
||||
/**
|
||||
* @var string $csrf Provided by the front controller.
|
||||
* @var ?string $matchJson The match:current JSON from localStorage, encoded as a string.
|
||||
* Null if no match is in progress.
|
||||
*/
|
||||
$e = static fn (string $v): string => Escape::html($v);
|
||||
$matchInfo = $matchJson !== null ? "Match loaded." : "No match in progress.";
|
||||
?><?php
|
||||
render_layout(static function () use ($e, $matchInfo, $matchJson): void {
|
||||
?>
|
||||
<h1>Match</h1>
|
||||
<p><?= $e($matchInfo) ?></p>
|
||||
<?php if ($matchJson !== null) : ?>
|
||||
<details>
|
||||
<summary>Match state (debug)</summary>
|
||||
<pre><?= $e($matchJson) ?></pre>
|
||||
</details>
|
||||
<?php endif; ?>
|
||||
<p>Battle interface coming in Plan 4.</p>
|
||||
<p><a href="/">Back to home</a></p>
|
||||
<?php
|
||||
}, $csrf, 'Match');
|
||||
Reference in New Issue
Block a user