@@ -299,7 +299,8 @@ <h2>Browser support</h2>
299299 </ div >
300300 </ div >
301301 < footer >
302- Product of < a href ="https://github.com/C5Lab/projectZero/ "> C5Lab/projectZero</ a > .
302+ Product of < a href ="https://github.com/C5Lab/projectZero/ "> C5Lab/projectZero</ a > -
303+ < span id ="pageVersion " class ="mono "> Web flasher v1.0.0</ span > .
303304 </ footer >
304305
305306 < script type ="module ">
@@ -316,6 +317,7 @@ <h2>Browser support</h2>
316317 baud : document . getElementById ( "baudSelect" ) ,
317318 branch : document . getElementById ( "branchSelect" ) ,
318319 releaseInfo : document . getElementById ( "releaseInfo" ) ,
320+ pageVersion : document . getElementById ( "pageVersion" ) ,
319321 } ;
320322
321323 const state = {
@@ -333,6 +335,20 @@ <h2>Browser support</h2>
333335 autoFlashTriggered : false ,
334336 } ;
335337
338+ const PAGE_VERSION = "1.0.0" ;
339+
340+ const setFooterVersion = ( manifest ) => {
341+ if ( ! ui . pageVersion ) return ;
342+ if ( ! manifest ) {
343+ ui . pageVersion . textContent = `Web flasher v${ PAGE_VERSION } ` ;
344+ return ;
345+ }
346+ const build = manifest . build || "n/a" ;
347+ const label = manifest . version || "n/a" ;
348+ const branch = getBranch ( ) ;
349+ ui . pageVersion . textContent = `Web flasher v${ PAGE_VERSION } - Build ${ build } - ${ label } - ${ branch } ` ;
350+ } ;
351+
336352 const applyQueryParams = ( ) => {
337353 const params = new URLSearchParams ( window . location . search ) ;
338354 const branch = params . get ( "branch" ) ;
@@ -447,13 +463,15 @@ <h2>Browser support</h2>
447463 }
448464 ui . manifest . style . display = "inline-flex" ;
449465 ui . manifest . textContent = `Build ${ manifest . build || "n/a" } - ${ releaseLabel } - ${ getBranch ( ) } ` ;
466+ setFooterVersion ( { ...manifest , version : releaseLabel } ) ;
450467 const files = ( manifest . parts || [ ] ) . length ;
451468 const releaseText = state . latestRelease ? ` - latest ${ releaseLabel } ` : "" ;
452469 ui . releaseInfo . innerHTML = `<span class="badge">Manifest</span> ${ manifest . name || "projectZero" } ${ releaseText } - ${ files } file(s) - chip ${ manifest . chipFamily || "ESP32-C5" } - ${ getBranch ( ) } ` ;
453470 setStatus ( "Manifest loaded." ) ;
454471 } catch ( err ) {
455472 setStatus ( "Manifest not found. Publish a release first." , "error" ) ;
456473 ui . releaseInfo . textContent = "No manifest available." ;
474+ setFooterVersion ( null ) ;
457475 throw err ;
458476 }
459477 } ;
0 commit comments