@@ -26,6 +26,10 @@ function selectedManifest(device, channel, variant) {
2626 return device . firmware [ channel ] [ variant ] ;
2727}
2828
29+ function repoFor ( device , channel , variant ) {
30+ return ( device . repos && device . repos [ channel ] && device . repos [ channel ] [ variant ] ) || device . repo ;
31+ }
32+
2933function segHtml ( id , label , keys , active , dataAttr ) {
3034 if ( keys . length < 2 ) return '' ;
3135 return `
@@ -112,12 +116,14 @@ export function renderDevice(el, device) {
112116 } ) ;
113117 renderInstall ( ) ;
114118 renderConfig ( ) ;
119+ renderReleaseNotes ( ) ;
115120 } ) ;
116121 }
117122
118123 async function renderInstall ( ) {
119124 const myEpoch = epoch ;
120125 const manifest = selectedManifest ( device , channel , variant ) ;
126+ const repo = repoFor ( device , channel , variant ) ;
121127 if ( hasSerial ) {
122128 installSlot . innerHTML = `
123129 <esp-web-install-button manifest="${ manifest } ">
@@ -153,7 +159,7 @@ export function renderDevice(el, device) {
153159 if ( epoch !== myEpoch ) return ; // selection changed mid-fetch
154160 filesEl . innerHTML =
155161 `<li>Couldn't load the file list — download firmware from the
156- <a href="https://github.com/${ device . repo } /releases">latest release</a>.</li>` ;
162+ <a href="https://github.com/${ repo } /releases">latest release</a>.</li>` ;
157163 }
158164 }
159165 }
@@ -162,10 +168,11 @@ export function renderDevice(el, device) {
162168 const slot = el . querySelector ( '#release-slot' ) ;
163169 slot . innerHTML = '' ;
164170 const myEpoch = epoch ;
171+ const repo = repoFor ( device , channel , variant ) ;
165172 try {
166- const rel = await fetchReleaseNotes ( device . repo , channel ) ;
173+ const rel = await fetchReleaseNotes ( repo , channel ) ;
167174 if ( epoch !== myEpoch ) return ; // selection changed mid-fetch
168- const url = / ^ h t t p s : \/ \/ g i t h u b \. c o m \/ / . test ( rel . url ) ? rel . url : `https://github.com/${ device . repo } /releases` ;
175+ const url = / ^ h t t p s : \/ \/ g i t h u b \. c o m \/ / . test ( rel . url ) ? rel . url : `https://github.com/${ repo } /releases` ;
169176 slot . innerHTML = `
170177 <div class="release-notes">
171178 <details>
@@ -178,7 +185,7 @@ export function renderDevice(el, device) {
178185 if ( epoch !== myEpoch ) return ; // selection changed mid-fetch
179186 slot . innerHTML = `
180187 <div class="release-notes">
181- See <a class="fail-link" href="https://github.com/${ device . repo } /releases">recent releases</a>
188+ See <a class="fail-link" href="https://github.com/${ repo } /releases">recent releases</a>
182189 for what's new.
183190 </div>` ;
184191 }
0 commit comments