11import { FlashManager , Step , ErrorCode , loadProgrammer } from "./utils/manager" ;
22import { getManifest } from "./utils/manifest" ;
33
4- import portsThree from "./assets/qdl-ports-three .svg" ;
4+ import portsThree from "./assets/qdl-ports-threex .svg" ;
55import portsFour from "./assets/qdl-ports-four.svg" ;
66import comma3X from "./assets/comma3X.webp" ;
77import commaFour from "./assets/four_screen_on.webp" ;
@@ -333,11 +333,16 @@ async function init() {
333333 $ ( "init-status" ) . textContent = "loading programmer + manifest..." ;
334334
335335 try {
336- const [ programmer , manifest ] = await Promise . all ( [
336+ const [ programmer , { version , manifest } ] = await Promise . all ( [
337337 loadProgrammer ( ) ,
338338 getManifest ( ) ,
339339 ] ) ;
340340
341+ const sha = process . env . GIT_SHA || "master" ;
342+ const versionLink = document . getElementById ( "version-link" ) as HTMLAnchorElement ;
343+ versionLink . href = `https://github.com/commaai/vamOS/tree/${ sha } ` ;
344+ versionLink . textContent = sha . slice ( 0 , 7 ) ;
345+
341346 console . info ( "[flashpack] Manifest loaded:" , manifest . length , "entries" ) ;
342347 manager = new FlashManager ( programmer , { } ) ;
343348 await manager . initialize ( manifest ) ;
@@ -346,7 +351,7 @@ async function init() {
346351 throw new Error ( "Initialization failed" ) ;
347352 }
348353
349- $ ( "init-status" ) . textContent = `ready! ( ${ manager . step === Step . READY ? "manifest loaded" : "..." } )` ;
354+ $ ( "init-status" ) . textContent = "" ;
350355 ( $ ( "btn-start" ) as HTMLButtonElement ) . disabled = false ;
351356 } catch ( err : any ) {
352357 console . error ( "[flashpack] Init failed:" , err ) ;
0 commit comments