Place KeyMind commands above preset URL builder

This commit is contained in:
mikecarper committed 2026-09-22 23:08:18 -07:00
1 parent cacf3e9b37
commit 4eb16deef4
2 files changed
+125 -127

No files matched your search

+124 -125
View File
@@ -58,131 +58,6 @@ create a shareable temporary-radio test URL.</span>
</div>
<section aria-labelledby="share-title">
<details class="preset-test-generator-disclosure" data-role="url-builder-disclosure" open>
<summary>
<h2 id="share-title">Build a temporary radio test URL</h2>
</summary>
<div class="preset-test-generator-disclosure-body">
<p>
Enter the test times in the selected time zone and choose the radio
tuple. The generated URL converts the times to exact UTC instants, keeps
the date punctuation readable, and keeps <code>tz</code> so the page
displays them in the organizer's local time zone.
</p>
<div class="preset-test-generator-layout">
<form class="preset-test-generator" data-role="url-generator">
<div class="preset-test-generator-fields">
<label>
<span>Start date and time</span>
<input type="datetime-local" name="start" step="60" required>
</label>
<label>
<span>End date and time</span>
<input type="datetime-local" name="end" step="60" required>
</label>
<div class="preset-test-timezone-picker">
<div class="preset-test-timezone-toolbar">
<div>
<span>Selected time zone</span>
<strong data-role="selected-time-zone">Detecting browser time zone…</strong>
</div>
<button type="button" data-action="use-browser-time-zone">
Use browser time zone
</button>
</div>
<input type="hidden" name="tz" required>
<div
class="preset-test-timezone-map"
data-role="timezone-map"
aria-label="Interactive world map for selecting a time zone"
></div>
<p class="preset-test-timezone-status" data-role="timezone-map-status" aria-live="polite">
Loading time zone map…
</p>
<small>
Click a region to select its IANA time zone. The initial selection
comes from <code>tz=</code> when present; otherwise it uses your
browser's time zone. Map design inspired by
<a href="https://zones.arilyn.cc/" target="_blank" rel="noopener">zones.arilyn.cc</a>;
boundaries from
<a href="https://github.com/evansiroky/timezone-boundary-builder" target="_blank" rel="noopener">Timezone Boundary Builder</a>
and © OpenStreetMap contributors.
</small>
</div>
<div class="preset-test-generator-subheading">Test radio profile</div>
<label>
<span>Frequency (MHz)</span>
<input type="number" name="freq" min="150" max="2500" step="0.001" required>
</label>
<label>
<span>Bandwidth (kHz)</span>
<select name="bw" required>
<option>7.8</option><option>10.4</option><option>15.6</option>
<option>20.8</option><option>31.25</option><option>41.7</option>
<option>62.5</option><option>125</option><option>250</option><option>500</option>
</select>
</label>
<label>
<span>Spreading factor</span>
<select name="sf" required>
<option>5</option><option>6</option><option>7</option><option>8</option>
<option>9</option><option>10</option><option>11</option><option>12</option>
</select>
</label>
<label>
<span>Coding-rate denominator</span>
<select name="cr" required>
<option>5</option><option>6</option><option>7</option><option>8</option>
</select>
</label>
<label>
<span>TX output for estimate (dBm)</span>
<input type="number" name="tx" min="-30" max="60" step="0.1" required>
<small>This estimate-only value does not change the TempRadio commands.</small>
</label>
</div>
<button type="submit">Generate test URL</button>
</form>
<aside class="preset-test-estimates" aria-labelledby="radio-estimates-title">
<h3 id="radio-estimates-title">Radio estimates</h3>
<dl>
<div><dt>Nominal LoRa bitrate</dt><dd data-role="estimate-rate">—</dd></div>
<div><dt>Estimated sensitivity</dt><dd data-role="estimate-sensitivity">—</dd></div>
<div><dt>TX output used</dt><dd data-role="estimate-tx">—</dd></div>
<div><dt>Estimated link budget</dt><dd data-role="estimate-budget">—</dd></div>
</dl>
<p class="preset-test-note">
The bitrate is the nominal LoRa physical-layer rate; usable payload
throughput is lower. Sensitivity assumes a 6 dB receiver noise figure
and the standard LoRa SNR threshold for the selected spreading factor.
Link budget is TX output minus that sensitivity, before antenna gain,
cable loss, path loss, interference, and implementation differences.
</p>
</aside>
</div>
<p class="preset-test-error preset-test-generator-error"
data-role="generator-error" role="alert" hidden></p>
<pre class="preset-test-generated-url"><code data-command="generated-url"></code></pre>
<div class="preset-test-generator-actions">
<button type="button" data-copy-command="generated-url">Copy generated URL</button>
<a data-role="open-generated-url" target="_blank" rel="noopener">Open generated page</a>
</div>
<p class="preset-test-note">
Advanced use: <code>start</code> and <code>end</code> also accept ISO-8601
timestamps with explicit UTC offsets or Unix epoch seconds. If
<code>tz</code> is omitted, the page uses the browser's time zone. The
other URL parameters are <code>freq</code>, <code>bw</code>,
<code>sf</code>, <code>cr</code>, and estimate-only <code>tx</code>.
</p>
</div>
</details>
</section>
<div data-role="test-content-footer" hidden>
<details class="preset-test-generator-disclosure preset-test-keymind-disclosure"
data-role="keymind-disclosure">
@@ -463,5 +338,129 @@ clock</code></pre>
</div>
</details>
</div>
<section aria-labelledby="share-title">
<details class="preset-test-generator-disclosure" data-role="url-builder-disclosure" open>
<summary>
<h2 id="share-title">Build a temporary radio test URL</h2>
</summary>
<div class="preset-test-generator-disclosure-body">
<p>
Enter the test times in the selected time zone and choose the radio
tuple. The generated URL converts the times to exact UTC instants, keeps
the date punctuation readable, and keeps <code>tz</code> so the page
displays them in the organizer's local time zone.
</p>
<div class="preset-test-generator-layout">
<form class="preset-test-generator" data-role="url-generator">
<div class="preset-test-generator-fields">
<label>
<span>Start date and time</span>
<input type="datetime-local" name="start" step="60" required>
</label>
<label>
<span>End date and time</span>
<input type="datetime-local" name="end" step="60" required>
</label>
<div class="preset-test-timezone-picker">
<div class="preset-test-timezone-toolbar">
<div>
<span>Selected time zone</span>
<strong data-role="selected-time-zone">Detecting browser time zone…</strong>
</div>
<button type="button" data-action="use-browser-time-zone">
Use browser time zone
</button>
</div>
<input type="hidden" name="tz" required>
<div
class="preset-test-timezone-map"
data-role="timezone-map"
aria-label="Interactive world map for selecting a time zone"
></div>
<p class="preset-test-timezone-status" data-role="timezone-map-status" aria-live="polite">
Loading time zone map…
</p>
<small>
Click a region to select its IANA time zone. The initial selection
comes from <code>tz=</code> when present; otherwise it uses your
browser's time zone. Map design inspired by
<a href="https://zones.arilyn.cc/" target="_blank" rel="noopener">zones.arilyn.cc</a>;
boundaries from
<a href="https://github.com/evansiroky/timezone-boundary-builder" target="_blank" rel="noopener">Timezone Boundary Builder</a>
and © OpenStreetMap contributors.
</small>
</div>
<div class="preset-test-generator-subheading">Test radio profile</div>
<label>
<span>Frequency (MHz)</span>
<input type="number" name="freq" min="150" max="2500" step="0.001" required>
</label>
<label>
<span>Bandwidth (kHz)</span>
<select name="bw" required>
<option>7.8</option><option>10.4</option><option>15.6</option>
<option>20.8</option><option>31.25</option><option>41.7</option>
<option>62.5</option><option>125</option><option>250</option><option>500</option>
</select>
</label>
<label>
<span>Spreading factor</span>
<select name="sf" required>
<option>5</option><option>6</option><option>7</option><option>8</option>
<option>9</option><option>10</option><option>11</option><option>12</option>
</select>
</label>
<label>
<span>Coding-rate denominator</span>
<select name="cr" required>
<option>5</option><option>6</option><option>7</option><option>8</option>
</select>
</label>
<label>
<span>TX output for estimate (dBm)</span>
<input type="number" name="tx" min="-30" max="60" step="0.1" required>
<small>This estimate-only value does not change the TempRadio commands.</small>
</label>
</div>
<button type="submit">Generate test URL</button>
</form>
<aside class="preset-test-estimates" aria-labelledby="radio-estimates-title">
<h3 id="radio-estimates-title">Radio estimates</h3>
<dl>
<div><dt>Nominal LoRa bitrate</dt><dd data-role="estimate-rate">—</dd></div>
<div><dt>Estimated sensitivity</dt><dd data-role="estimate-sensitivity">—</dd></div>
<div><dt>TX output used</dt><dd data-role="estimate-tx">—</dd></div>
<div><dt>Estimated link budget</dt><dd data-role="estimate-budget">—</dd></div>
</dl>
<p class="preset-test-note">
The bitrate is the nominal LoRa physical-layer rate; usable payload
throughput is lower. Sensitivity assumes a 6 dB receiver noise figure
and the standard LoRa SNR threshold for the selected spreading factor.
Link budget is TX output minus that sensitivity, before antenna gain,
cable loss, path loss, interference, and implementation differences.
</p>
</aside>
</div>
<p class="preset-test-error preset-test-generator-error"
data-role="generator-error" role="alert" hidden></p>
<pre class="preset-test-generated-url"><code data-command="generated-url"></code></pre>
<div class="preset-test-generator-actions">
<button type="button" data-copy-command="generated-url">Copy generated URL</button>
<a data-role="open-generated-url" target="_blank" rel="noopener">Open generated page</a>
</div>
<p class="preset-test-note">
Advanced use: <code>start</code> and <code>end</code> also accept ISO-8601
timestamps with explicit UTC offsets or Unix epoch seconds. If
<code>tz</code> is omitted, the page uses the browser's time zone. The
other URL parameters are <code>freq</code>, <code>bw</code>,
<code>sf</code>, <code>cr</code>, and estimate-only <code>tx</code>.
</p>
</div>
</details>
</section>
</div>
</div>
+1 -2
View File
@@ -26,9 +26,8 @@ assert(pageSource.indexOf('data-command="stock-now"') <
pageSource.indexOf('data-role="countdown"'));
assert(pageSource.indexOf('data-command="stock-now"') <
pageSource.indexOf('data-role="url-builder-disclosure"'));
assert(pageSource.indexOf('data-role="url-builder-disclosure"') <
pageSource.indexOf('data-role="test-content-footer"'));
assert(pageSource.indexOf('data-role="test-content-footer"') < keymindStart);
assert(keymindStart < pageSource.indexOf('data-role="url-builder-disclosure"'));
assert.strictEqual((pageSource.match(/data-command="stock-now"/g) || []).length, 1);
assert.strictEqual((pageSource.match(/data-command="stock-cancel-during"/g) || []).length, 1);
assert.doesNotMatch(keymindContent, /data-command="stock-now"/);