Skip to content

Commit

Permalink
Record and Save icon in disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Commanderk3 committed Jan 9, 2025
1 parent bb9c946 commit 4d34735
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
12 changes: 12 additions & 0 deletions js/activity.js
Original file line number Diff line number Diff line change
Expand Up @@ -1199,6 +1199,18 @@ class Activity {
saveButtonAdvanced.disabled = true;
saveButton.className = "grey-text inactiveLink";
saveButtonAdvanced.className = "grey-text inactiveLink";

const Record = docById("record");
Record.disabled = true;
Record.className = "grey-text inactiveLink";
const outerCircle = Record.querySelector("circle:not(#rec_inside)");
if (outerCircle) {
outerCircle.setAttribute("stroke", "#9E9E9E"); // Change the stroke color of the outer circle
}
const recInside = Record.querySelector("#rec_inside");
if (recInside) {
recInside.setAttribute("fill", "#9E9E9E"); // inner circle fill color
}
}

this.logo.runLogoCommands(null, env);
Expand Down
30 changes: 30 additions & 0 deletions js/logo.js
Original file line number Diff line number Diff line change
Expand Up @@ -956,6 +956,24 @@ class Logo {
}

this.activity.showBlocksAfterRun = false;
const saveButton = docById('saveButton');
const saveButtonAdvanced = docById('saveButtonAdvanced');
saveButton.disabled = false;
saveButtonAdvanced.disabled = false;
saveButton.className = saveButton.className.replace('grey-text inactiveLink', '').trim();
saveButtonAdvanced.className = saveButtonAdvanced.className.replace('grey-text inactiveLink', '').trim();

const Record = docById("record");
Record.disabled = false;
Record.className = Record.className.replace('grey-text inactiveLink', '').trim();
const outerCircle = Record.querySelector("circle:not(#rec_inside)");
if (outerCircle) {
outerCircle.setAttribute("stroke", "#FFFFFF"); // Change the stroke color of the outer circle to white
}
const recInside = Record.querySelector("#rec_inside");
if (recInside) {
recInside.setAttribute("fill", "#FFFFFF"); // Change the inner circle fill color to white
}
}

/**
Expand Down Expand Up @@ -1795,6 +1813,18 @@ class Logo {
saveButtonAdvanced.disabled = false;
saveButton.className = saveButton.className.replace('grey-text inactiveLink', '').trim();
saveButtonAdvanced.className = saveButtonAdvanced.className.replace('grey-text inactiveLink', '').trim();

const Record = docById("record");
Record.disabled = false;
Record.className = Record.className.replace('grey-text inactiveLink', '').trim();
const outerCircle = Record.querySelector("circle:not(#rec_inside)");
if (outerCircle) {
outerCircle.setAttribute("stroke", "#FFFFFF"); // Change the stroke color of the outer circle to white
}
const recInside = Record.querySelector("#rec_inside");
if (recInside) {
recInside.setAttribute("fill", "#FFFFFF"); // Change the inner circle fill color to white
}
}
}
document.getElementById("stop").style.color = "white";
Expand Down

0 comments on commit 4d34735

Please sign in to comment.