// @ts-nocheck
const vscode = acquireVsCodeApi();
function sendCommand(command, data) {
vscode.postMessage({
command,
data
});
}
function appendHTML(parent, html) {
var div = document.createElement("div");
div.innerHTML = html;
while (div.children.length > 0) {
parent.appendChild(div.children[0]);
}
div.remove();
}
const releaseNoteTemplate = `
@TYPE@NOTE @EXTRA
`;
const notesElement = document.querySelector("#notes");
releaseNotes.changes.forEach(change => {
const html = releaseNoteTemplate
.replace(new RegExp("@NOTE", "g"), change.details)
.replace(new RegExp("@TYPE", "g"), change.type)
.replace(new RegExp("@COLOR", "g"), change.color)
.replace(
new RegExp("@EXTRA", "g"),
change.author && change.pullRequest
? `(Thanks to @${change.author} for PR #${change.pullRequest})`
: ""
);
appendHTML(notesElement, html);
});
const currentVersionElement = document.querySelector("#current-version");
currentVersionElement.innerHTML = releaseNotes.currentVersion;
document.querySelector("#customCheck1").checked = checked === "true";