Skip to content

Commit

Permalink
Correct export different targets handling. Ste version to 1.3.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
sletz committed Jan 29, 2025
1 parent 1b4872b commit b560398
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 91 deletions.
162 changes: 81 additions & 81 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "fausteditor",
"private": true,
"version": "1.3.2",
"version": "1.3.4",
"description": "A simple Faust editor for the web",
"scripts": {
"dev": "vite",
Expand Down
23 changes: 15 additions & 8 deletions src/exportUI.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,22 @@ function forgeURL() {
export async function updateQrCode(sha, div) {
deleteQrCode(div);

var plateform = document.getElementById("Platform").options[document.getElementById("Platform").selectedIndex].value;
var architecture = document.getElementById("Architecture").options[document.getElementById("Architecture").selectedIndex].value;
var output = (plateform === "android") ? "binary.apk" : "binary.zip";

var plat = document.getElementById("Platform").options[document.getElementById("Platform").selectedIndex].value;
var arch = document.getElementById("Architecture").options[document.getElementById("Architecture").selectedIndex].value;
let target;
// Check the different possible targets
if (arch === "pwa" || arch === "pwa-poly") {
target = "index.html";
} else if (plat === "chaos-stratus") {
target = "installer.sh"
} else if (plat === "android") {
target = "binary.apk";
} else {
target = "binary.zip";
}
var link = document.createElement('a');
link.href = document.getElementById("exportUrl").value + "/" + sha + "/" +
plateform + "/" + architecture + "/" + output;

var myWhiteDiv = await getQrCode(document.getElementById("exportUrl").value, sha, plateform, architecture, output, 130);
link.href = document.getElementById("exportUrl").value + "/" + sha + "/" + plat + "/" + arch + "/" + target;
var myWhiteDiv = await getQrCode(document.getElementById("exportUrl").value, sha, plat, arch, target, 130);

div.appendChild(link);
link.appendChild(myWhiteDiv);
Expand Down
2 changes: 1 addition & 1 deletion src/faustlive.js
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ window.addEventListener('touchstart', function () {

// Main entry point, called when libfaust.js has finished to load
function init() {
console.log('FaustEditor: version 1.3.3');
console.log('FaustEditor: version 1.3.4');

// Try to load code from current URL
configureEditorFromUrlParams();
Expand Down

0 comments on commit b560398

Please sign in to comment.