From d5553b2ee1af27249d635a0a7aee08a1bcd691ea Mon Sep 17 00:00:00 2001 From: Mark Haslinghuis Date: Wed, 24 Feb 2021 23:08:54 +0100 Subject: [PATCH] Fix persistant settings after changing FC --- locales/en/messages.json | 7 +- src/css/tabs/motors.css | 19 +++++- src/js/Features.js | 4 +- src/js/tabs/motors.js | 143 +++++++++++++++++++++++++++------------ src/tabs/motors.html | 27 ++++---- 5 files changed, 138 insertions(+), 62 deletions(-) diff --git a/locales/en/messages.json b/locales/en/messages.json index b6f79bb5..df32258d 100644 --- a/locales/en/messages.json +++ b/locales/en/messages.json @@ -2591,7 +2591,12 @@ "motorsRemapDialogStartOver": { "message": "Start over" }, - + "motorsButtonReset": { + "message": "Reset" + }, + "motorsButtonSave": { + "message": "Save and Reboot" + }, "escDshotDirectionDialog-Title": { "message": "Motor Direction - Warning: Ensure props are removed!" }, diff --git a/src/css/tabs/motors.css b/src/css/tabs/motors.css index 1b2a7d1d..5dc082c5 100644 --- a/src/css/tabs/motors.css +++ b/src/css/tabs/motors.css @@ -256,6 +256,16 @@ width: calc(100% - 160px); } +.tab-motors .btn .disabled { + cursor: default; + color: #fff; + background-color: #AFAFAF; + border: none; + pointer-events: none; + text-shadow: none; + opacity: 0.5; +} + .tab-motors #dialogMotorOutputReorder-closebtn { margin-right: 0px; margin-bottom: 0px; @@ -298,10 +308,13 @@ } .tab-motors #dialog-settings-changed { - width: 400px; - height: 100px; + height: 120px; } +.tab-motors #dialog-settings-reset-confirmbtn { + margin-bottom: 12px; + position: relative; +} .tab-motors #dialog-settings-changed-confirmbtn { margin-right: 0px; margin-bottom: 0px; @@ -322,7 +335,7 @@ flex-grow: 1; } -.tab-motors .tool-buttons { +.tab-motors .dialog-buttons { float: right; margin-bottom: -3%; } diff --git a/src/js/Features.js b/src/js/Features.js index 0c72abff..35991984 100644 --- a/src/js/Features.js +++ b/src/js/Features.js @@ -151,7 +151,7 @@ Features.prototype.generateElements = function (featuresElements) { if (listElements.length === 0) { newElements.push($('