in editor/extension.ts [9:69]
function showUploadInstructionsAsync(confirmAsync: (confirmOptions: {}) => Promise<number>): Promise<void> {
if (!confirmAsync) {
return Promise.resolve();
}
const boardName = pxt.appTarget.appTheme.boardName;
const docUrl = pxt.appTarget.appTheme.usbDocs;
const htmlBody = `
<div class="ui three column grid stackable">
<div class="column">
<div class="ui">
<div class="image">
<img class="ui medium rounded image" src="./static/download/plugin.png" style="height:150px">
</div>
<div class="content">
<div class="description">
<span class="ui blue circular label">1</span>
${lf("Plug the cable into your {0}", boardName)}
</div>
</div>
</div>
</div>
<div class="column">
<div class="ui">
<div class="image">
<img class="ui medium rounded image" src="./static/download/plugincomp.png" style="height:150px">
</div>
<div class="content">
<div class="description">
<span class="ui blue circular label">2</span>
${lf("Plug the USB and audio cables into your programming device")}
</div>
</div>
</div>
</div>
<div class="column">
<div class="ui">
<div class="image">
<img class="ui medium rounded image" src="./static/download/reset.png" style="height:150px">
</div>
<div class="content">
<div class="description">
<span class="ui blue circular label">3</span>
${lf("Press and hold the PROG button until the PROG light is steady red")}
</div>
</div>
</div>
</div>
</div>`;
return confirmAsync({
header: lf("Upload instructions"),
htmlBody,
hideCancel: true,
agreeLbl: lf("Ready?"),
buttons: [docUrl ? {
label: lf("Help"),
icon: "help",
className: "lightgrey focused",
url: docUrl
} : undefined]
}).then(() => { });
}