Files
neonoverlord 8aa121a92f templates: wrap in #app-content so it renders INSIDE the Nextcloud frame
The frame trap, headed off before it cost a rebuild: TemplateResponse defaults
to renderAs 'user', which supplies the Nextcloud chrome — but the chrome only
PLACES your content if it sits inside #app-content. Without the wrapper the page
renders outside the frame: no nav, wrong width, or blank. It reads as a broken
app when the app is fine.

Comment left in the template so the next person does not remove it and rediscover
this the slow way.

Verified against the running instance first: ping 200 (86ms), garbage 200
(25 MiB @ 336 MB/s), empty 200 (10 MiB sunk), page 200 with template/js/css all
referenced. The garbage payload gzips to 2097496 bytes from 2097152 — LARGER
than source, i.e. genuinely incompressible, which is the entire point.
2026-08-06 07:59:42 -07:00

55 lines
1.9 KiB
PHP

<?php
declare(strict_types=1);
/** @var \OCP\IL10N $l */
?>
<?php
/*
* NEXTCLOUD FRAME TRAP — do not remove the #app-content wrapper.
*
* TemplateResponse defaults to renderAs 'user', which gives you the Nextcloud
* chrome (nav bar, sidebar, settings menu). But the chrome only PLACES your
* content if it is inside #app-content — without it the page renders outside
* the frame: no nav, wrong width, or blank. It looks like the app is broken
* when the app is fine.
*
* #app -> claims the layout slot
* #app-content -> where the chrome puts your content
*/
?>
<div id="app" class="speedtest">
<div id="app-content">
<div id="app-content-wrapper">
<div id="speedtest-app">
<div class="st-wrap">
<h2 class="st-title"><?php p($l->t('Speedtest')); ?></h2>
<p class="st-sub"><?php p($l->t('Measured against this server. Nothing is written to disk.')); ?></p>
<div class="st-grid">
<div class="st-tile" id="st-down">
<div class="st-label"><?php p($l->t('Download')); ?></div>
<div class="st-value"><span data-v>—</span><span class="st-unit">Mbps</span></div>
</div>
<div class="st-tile" id="st-up">
<div class="st-label"><?php p($l->t('Upload')); ?></div>
<div class="st-value"><span data-v>—</span><span class="st-unit">Mbps</span></div>
</div>
<div class="st-tile" id="st-ping">
<div class="st-label"><?php p($l->t('Latency')); ?></div>
<div class="st-value"><span data-v>—</span><span class="st-unit">ms</span></div>
</div>
<div class="st-tile" id="st-jitter">
<div class="st-label"><?php p($l->t('Jitter')); ?></div>
<div class="st-value"><span data-v>—</span><span class="st-unit">ms</span></div>
</div>
</div>
<div class="st-bar"><div class="st-bar-fill" id="st-progress"></div></div>
<div class="st-status" id="st-status"><?php p($l->t('Ready.')); ?></div>
<button class="primary st-go" id="st-go"><?php p($l->t('Start test')); ?></button>
</div>
</div>
</div>
</div>
</div>