Skip to content

Commit e984f37

Browse files
committed
pages fix
1 parent 85a46dd commit e984f37

2 files changed

Lines changed: 22 additions & 4 deletions

File tree

docs/index.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,11 @@ <h2>Flipper FAP uploader</h2>
113113
<p>Upload the latest Lab_C5 .fap (Unleashed/Momentum) over CDC/CLI, auto-cleans old versions, optional auto-launch.</p>
114114
<a href="flipper_fap.html">Open FAP uploader</a>
115115
</div>
116+
<div class="tile">
117+
<h2>Quick start</h2>
118+
<p>Start here for a quick LAB5 introduction, project overview, and direct links to GitHub, Discord, and the latest resources.</p>
119+
<a href="quick_start.html">Open quick start</a>
120+
</div>
116121
</div>
117122
</div>
118123
<footer>

docs/janos_flash.html

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ <h2>Control</h2>
326326
<strong>Erase</strong> does a full flash erase <span class="mono">(esptool erase-flash)</span> before writing the images.
327327
Only enable it when you have OTA partitions / old firmware and you see bootloops or slot errors.
328328
This web flasher seeds both OTA slots by default by writing the app to <span class="mono">0x20000</span> and <span class="mono">0x410000</span>.
329+
If the log shows <span class="mono">Flash ID: 0</span> or an MD5 mismatch, reconnect in ROM mode and retry at <span class="mono">115200</span>.
329330
Note: it wipes anything stored in flash (including NVS settings like Wi-Fi creds/config).
330331
</div>
331332
<div class="progress" aria-label="Flash progress">
@@ -388,7 +389,7 @@ <h2>Browser support</h2>
388389
</div>
389390
<footer>
390391
Product of <a href="https://github.com/C5Lab/projectZero/">C5Lab/projectZero</a> -
391-
<span id="pageVersion" class="mono">Web flasher v1.0.4</span>.
392+
<span id="pageVersion" class="mono">Web flasher v1.0.5</span>.
392393
</footer>
393394

394395
<script type="module">
@@ -418,6 +419,7 @@ <h2>Browser support</h2>
418419

419420
const state = {
420421
manifest: null,
422+
manifestUrl: null,
421423
latestRelease: null,
422424
files: [],
423425
port: null,
@@ -437,7 +439,7 @@ <h2>Browser support</h2>
437439
monitorConnected: false,
438440
};
439441

440-
const PAGE_VERSION = "1.0.3";
442+
const PAGE_VERSION = "1.0.5";
441443
const monitorEncoder = new TextEncoder();
442444

443445
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
@@ -538,10 +540,19 @@ <h2>Browser support</h2>
538540
} catch {}
539541
let cleaned = path.startsWith("/") ? path.slice(1) : path;
540542
const branch = getBranch();
541-
if (cleaned.startsWith("firmware/")) {
543+
const manifestUrl = state.manifestUrl || getManifestUrl();
544+
const manifestHost = (() => {
545+
try {
546+
return new URL(manifestUrl).hostname;
547+
} catch {
548+
return "";
549+
}
550+
})();
551+
if (manifestHost === "raw.githubusercontent.com" && cleaned.startsWith("firmware/")) {
542552
cleaned = cleaned.replace(/^firmware\//, "ESP32C5/binaries-esp32c5/");
553+
return `https://raw.githubusercontent.com/C5Lab/projectZero/${branch}/${cleaned}`;
543554
}
544-
return `https://raw.githubusercontent.com/C5Lab/projectZero/${branch}/${cleaned}`;
555+
return new URL(cleaned, manifestUrl).toString();
545556
};
546557

547558
const getBranch = () => ui.branch.value || "main";
@@ -618,6 +629,7 @@ <h2>Browser support</h2>
618629
if (usedManifestUrl) log(`Manifest: ${usedManifestUrl}`);
619630
const manifest = rewritePartsForBranch(manifestRaw, getBranch());
620631
state.manifest = manifest;
632+
state.manifestUrl = usedManifestUrl || primary;
621633
let releaseLabel = manifest.version || "n/a";
622634
if (getBranch() === "main") {
623635
try {
@@ -959,6 +971,7 @@ <h2>Browser support</h2>
959971
});
960972
ui.branch.addEventListener("change", () => {
961973
state.manifest = null;
974+
state.manifestUrl = null;
962975
ui.manifest.style.display = "none";
963976
ui.manifest.textContent = "";
964977
ui.releaseInfo.textContent = "Loading manifest";

0 commit comments

Comments
 (0)