mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-19 06:15:13 +03:00
convert some style manipulation over to class manipulation
Use of addClass/removeClass makes design modifications involve html/css instead of html/css/js. Also we can look into packaging the css together to reduce file count. Also removed some extra color statements (it is a shade of green from cleanflight 1.x)
This commit is contained in:
parent
4d7cc704b0
commit
c2e8cf19c9
2 changed files with 16 additions and 20 deletions
|
@ -290,7 +290,6 @@ input[type="number"]::-webkit-inner-spin-button {
|
|||
|
||||
.gyroicon.active {
|
||||
background-image: url(../images/icons/sensor_gyro_on.png);
|
||||
color: #61d514;
|
||||
color: #818181;
|
||||
}
|
||||
|
||||
|
@ -309,7 +308,6 @@ input[type="number"]::-webkit-inner-spin-button {
|
|||
|
||||
.accicon.active {
|
||||
background-image: url(../images/icons/sensor_acc_on.png);
|
||||
color: #61d514;
|
||||
color: #818181;
|
||||
}
|
||||
|
||||
|
@ -1940,13 +1938,23 @@ dialog {
|
|||
.armedicon {
|
||||
background-image: url(../images/icons/cf_icon_armed_grey.svg);
|
||||
}
|
||||
.armedicon.active {
|
||||
background-image: url(../images/icons/cf_icon_armed_active.svg);
|
||||
}
|
||||
|
||||
.failsafeicon {
|
||||
background-image: url(../images/icons/cf_icon_failsafe_grey.svg);
|
||||
}
|
||||
.failsafeicon.active {
|
||||
background-image: url(../images/icons/cf_icon_failsafe_active.svg);
|
||||
}
|
||||
|
||||
.linkicon {
|
||||
background-image: url(../images/icons/cf_icon_link_grey.svg);
|
||||
}
|
||||
.linkicon.active {
|
||||
background-image: url(../images/icons/cf_icon_link_active.svg);
|
||||
}
|
||||
|
||||
.bottomStatusIcons {
|
||||
display: flex;
|
||||
|
|
|
@ -598,23 +598,15 @@ function update_live_status() {
|
|||
for (var i = 0; i < AUX_CONFIG.length; i++) {
|
||||
if (AUX_CONFIG[i] == 'ARM') {
|
||||
if (bit_check(CONFIG.mode, i))
|
||||
$(".armedicon").css({
|
||||
'background-image': 'url(images/icons/cf_icon_armed_active.svg)'
|
||||
});
|
||||
$(".armedicon").addClass('active');
|
||||
else
|
||||
$(".armedicon").css({
|
||||
'background-image': 'url(images/icons/cf_icon_armed_grey.svg)'
|
||||
});
|
||||
$(".armedicon").removeClass('active');
|
||||
}
|
||||
if (AUX_CONFIG[i] == 'FAILSAFE') {
|
||||
if (bit_check(CONFIG.mode, i))
|
||||
$(".failsafeicon").css({
|
||||
'background-image': 'url(images/icons/cf_icon_failsafe_active.svg)'
|
||||
});
|
||||
$(".failsafeicon").addClass('active');
|
||||
else
|
||||
$(".failsafeicon").css({
|
||||
'background-image': 'url(images/icons/cf_icon_failsafe_grey.svg)'
|
||||
});
|
||||
$(".failsafeicon").removeClass('active');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -654,13 +646,9 @@ function update_live_status() {
|
|||
}
|
||||
|
||||
if (active) {
|
||||
$(".linkicon").css({
|
||||
'background-image': 'url(images/icons/cf_icon_link_active.svg)'
|
||||
});
|
||||
$(".linkicon").addClass('active');
|
||||
} else {
|
||||
$(".linkicon").css({
|
||||
'background-image': 'url(images/icons/cf_icon_link_grey.svg)'
|
||||
});
|
||||
$(".linkicon").removeClass('active');
|
||||
}
|
||||
|
||||
statuswrapper.show();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue