Merge pull request #42 from stagehacks/active-arrangement-indicator

Active arrangement indicator
This commit is contained in:
2022-12-31 10:40:13 -06:00
committed by GitHub
3 changed files with 27 additions and 29 deletions
+6 -4
View File
@@ -56,6 +56,12 @@ a {
-webkit-app-region: drag;
z-index: 1000;
}
#view-buttons-bar .active {
background-color: rgba(255, 255, 255, 0.3);
color: white;
border: #61c650;
border-style: solid;
}
#view-buttons-bar button {
background-color: rgba(255, 255, 255, 0.07);
width: 26px;
@@ -293,10 +299,6 @@ button:hover {
button:focus {
outline: none;
}
button.active {
background-color: rgba(255, 255, 255, 0.3);
color: white;
}
button:disabled {
background: rgba(255, 255, 255, 0.03);
}
+7 -12
View File
@@ -298,19 +298,14 @@ module.exports.getPinnedDevices = function getPinnedDevices() {
};
module.exports.toggleSlotButtons = function toggleSlotButtons(slotIndex) {
if (slotIndex === 1) {
document.getElementById('save-slot-1').classList.add('active');
document.getElementById('save-slot-2').classList.remove('active');
document.getElementById('save-slot-3').classList.remove('active');
} else if (slotIndex === 2) {
document.getElementById('save-slot-1').classList.remove('active');
document.getElementById('save-slot-2').classList.add('active');
document.getElementById('save-slot-3').classList.remove('active');
} else if (slotIndex === 3) {
document.getElementById('save-slot-1').classList.remove('active');
document.getElementById('save-slot-2').classList.remove('active');
document.getElementById('save-slot-3').classList.add('active');
// remove all currently active classes
const currentActiveSlots = document.getElementsByClassName('active');
for (let i = 0; i < currentActiveSlots.length; i++) {
const slotButton = currentActiveSlots[i];
slotButton.classList.remove('active');
}
// add the active class to the newly selected slot
document.getElementById(`save-slot-${slotIndex}`).classList.add('active');
};
module.exports.selectPreviousDevice = function selectPreviousDevice() {