From eecc858b7df1ea286d68278c70241df9815eb8a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Semr=C3=A1d?= <76877124+VitroidFPV@users.noreply.github.com> Date: Wed, 19 Jun 2024 11:58:42 +0200 Subject: [PATCH] Style: UI Refresh (#3956) * Style: Use new color system * Fix: sonarcloud issues, remove testing parts * Fix: Remove double variables * Style: First POC of UI refresh - Setup tab * Style Fix: Prevent tab-specific breakpoints from escaping * Style: Remove calc() for main layout * Fix: Break into mobile UI along CSS, update mobile tabs * Style: Refresh Ports tab * Style: Refresh Configuration tab * Style: Reposition StatusBar, add a bit of spacing * Style: Remove text shadows * Style: Fix overlapping select styles * Fix: Remove import for deleted files, fixes builds * Style: Refresh Power & Battery tab * Style: Prevent OSD tab styles from escaping * Style: Refresh Failsafe tab * Style: Refresh Modes tab * Style: Add back td height * Style: Refresh Adjustments tab * Style: Refresh Motors tab * Style: Catch up main.less to various changes * Style: Refresh VTX tab * Style: Refresh OSD tab * Style: Refresh Receiver tab * Chore: Clean up SonarCloud issues * Chore: Clean up more SonarCloud issues * Style: Refresh Blackbox tab * Style: Refresh headerbar * Style: Refresh Options tab * Style: Refresh Firmware Flasher tab * Style: Adjust detect feature, add breakpoint * Fix: Use updated i18n in button * Style: Refresh MSP Radio Emulator * Style: Fix Radio Emulator breakpoint * Style: Fix Radio Emulator layout * Style: Refresh headerbar * Style: Refresh Sensors tab * Style: More consistent select elements * Style: Refresh GPS tab * Style: Fix motors tab layout * Style: Various fixes, align more toolbars * Style: Refresh CLI tab * Style: Clean up VTX tab styling * Style: Fix sensor status color --- locales/en/messages.json | 8 +- .../betaflight-logo/BetaflightLogo.vue | 21 +- src/components/data-flash/DataFlash.vue | 4 +- .../port-picker/FirmwareVirtualOption.vue | 193 +- .../port-picker/PortOverrideOption.vue | 61 +- src/components/port-picker/PortPicker.vue | 4 + src/components/port-picker/PortsInput.vue | 86 - src/components/quad-status/BatteryIcon.vue | 6 +- .../quad-status/BottomStatusIcons.vue | 4 +- src/components/sensor-status/SensorStatus.vue | 15 +- src/components/status-bar/PortUtilization.vue | 2 +- src/components/status-bar/ReadingStat.vue | 6 +- src/components/status-bar/StatusBar.vue | 16 +- src/css/dark-theme.less | 866 +-------- src/css/dropdown-lists/LICENSE | 20 - src/css/dropdown-lists/css/style_lists.css | 148 -- src/css/main.less | 1632 ++++++++--------- src/css/receiver_msp/receiver_msp.less | 81 +- src/css/select2_custom.less | 75 +- src/css/tabs/adjustments.less | 55 +- src/css/tabs/auxiliary.less | 271 ++- src/css/tabs/cli.less | 11 +- src/css/tabs/configuration.less | 430 +---- src/css/tabs/failsafe.less | 215 +-- src/css/tabs/firmware_flasher.less | 262 ++- src/css/tabs/gps.less | 58 +- src/css/tabs/help.less | 4 +- src/css/tabs/landing.less | 10 +- src/css/tabs/led_strip.less | 42 +- src/css/tabs/logging.less | 2 +- src/css/tabs/motors.less | 406 +--- src/css/tabs/onboard_logging.less | 137 +- src/css/tabs/options.less | 6 +- src/css/tabs/osd.less | 452 ++--- src/css/tabs/pid_tuning.less | 110 +- src/css/tabs/ports.less | 143 +- src/css/tabs/power.less | 60 +- src/css/tabs/receiver.less | 501 +---- src/css/tabs/sensors.less | 129 +- src/css/tabs/servos.less | 34 +- src/css/tabs/setup.less | 218 +-- src/css/tabs/static_tab.less | 2 +- src/css/tabs/transponder.less | 18 +- src/css/tabs/vtx.less | 231 +-- src/css/theme.css | 103 +- src/images/corner.svg | 9 + src/images/dark-wide-2-compact.svg | 133 ++ src/images/dark-wide-2.svg | 47 + src/images/icons/sensor_baro_off.png | Bin 1929 -> 2209 bytes src/images/icons/sensor_baro_on.png | Bin 1271 -> 1866 bytes src/index.html | 4 +- src/js/browserMain.js | 1 - src/js/gui.js | 2 +- src/js/main.js | 16 +- src/js/tabs/cli.js | 11 +- src/js/tabs/osd.js | 2 +- src/js/tabs/receiver.js | 2 +- src/js/tabs/vtx.js | 11 +- src/tabs/adjustments.html | 10 +- src/tabs/auxiliary.html | 10 +- src/tabs/cli.html | 13 +- src/tabs/configuration.html | 61 +- src/tabs/failsafe.html | 18 +- src/tabs/firmware_flasher.html | 509 +++-- src/tabs/gps.html | 28 +- src/tabs/led_strip.html | 12 +- src/tabs/motors.html | 237 ++- src/tabs/onboard_logging.html | 242 +-- src/tabs/options.html | 2 +- src/tabs/osd.html | 354 ++-- src/tabs/pid_tuning.html | 43 +- src/tabs/ports.html | 10 +- src/tabs/power.html | 58 +- .../DetailedDialog/PresetsDetailedDialog.less | 6 +- .../presets/SourcesDialog/SourcePanel.css | 6 +- .../presets/SourcesDialog/SourcesDialog.css | 2 +- .../presets/TitlePanel/PresetTitlePanel.css | 16 +- .../presets/TitlePanel/PresetTitlePanel.js | 12 +- src/tabs/presets/presets.html | 4 +- src/tabs/presets/presets.js | 11 +- src/tabs/presets/presets.less | 38 +- src/tabs/receiver.html | 232 ++- src/tabs/setup.html | 6 +- src/tabs/vtx.html | 461 +++-- 84 files changed, 3488 insertions(+), 6309 deletions(-) delete mode 100644 src/css/dropdown-lists/LICENSE delete mode 100644 src/css/dropdown-lists/css/style_lists.css create mode 100644 src/images/corner.svg create mode 100644 src/images/dark-wide-2-compact.svg create mode 100644 src/images/dark-wide-2.svg diff --git a/locales/en/messages.json b/locales/en/messages.json index 9c2b67c2a2..994a6f5f7b 100755 --- a/locales/en/messages.json +++ b/locales/en/messages.json @@ -3427,7 +3427,7 @@ "message": "Select build type to see available boards." }, "firmwareFlasherOnlineSelectBoardDescription": { - "message": "Select or auto-detect your board to see available online firmware releases - Select the correct firmware appropriate for your board." + "message": "Select or detect your board to see available online firmware releases - Select the correct firmware appropriate for your board." }, "firmwareFlasherOnlineSelectBoardHint": { "message": "Betaflight configurator supports flashing of Unified Targets with the respective board specific configurations in one step.

The concept of Unified Targets means that the same firmware .hex file can be used for all boards using the same MCU.

Betaflight 4.4 introduces Cloud Build

With Cloud Build we need to define hardware options present on your build.

To make the different boards work with the same firmware, a specific configuration file is deployed alongside the firmware when a Unified Target is flashed.

With Local build you can load a unified target configuration file or chose a board before loading a firmware .hex file.

If you encounter problems using the firmware, please consider joining Discord or open an issue." @@ -3442,7 +3442,7 @@ "message": "Flash on connect" }, "firmwareFlasherFlashOnConnectDescription": { - "message": "Attempt to flash the board automatically (triggered by newly detected serial port).

WARNING: this function disables the auto-detect and backup feature." + "message": "Attempt to flash the board automatically (triggered by newly detected serial port).

WARNING: this function disables the detect and backup features." }, "firmwareFlasherFullChipErase": { "message": "Full chip erase" @@ -3620,10 +3620,10 @@ "message": "Continue" }, "firmwareFlasherDetectBoardButton": { - "message": "Auto-detect" + "message": "Detect" }, "firmwareFlasherDetectBoardDescriptionHint": { - "message": "Auto-detect only works when not in DFU mode and when MSP communication is working. Sometimes you have to retry a few times or even reconnect USB. Try connecting as normal first as you could have forgotten to apply custom defaults. Please reboot after flashing - replug your USB." + "message": "Detect only works when not in DFU mode and when MSP communication is working. Sometimes you have to retry a few times or even reconnect USB. Try connecting as normal first as you could have forgotten to apply custom defaults. Please reboot after flashing - replug your USB." }, "firmwareFlasherDetectBoardQuery": { "message": "Query board information to preselect right firmware" diff --git a/src/components/betaflight-logo/BetaflightLogo.vue b/src/components/betaflight-logo/BetaflightLogo.vue index e0ffec226e..54e2cca497 100644 --- a/src/components/betaflight-logo/BetaflightLogo.vue +++ b/src/components/betaflight-logo/BetaflightLogo.vue @@ -42,22 +42,23 @@ export default { .logo { height: 70px; width: 240px; - background-image: url(../../images/light-wide-2.svg); + background-image: url(../../images/dark-wide-2.svg); background-repeat: no-repeat; background-position: left center; background-size: contain; position: relative; - margin-top: -25px; +} + +.dark-theme .logo { + background-image: url(../../images/light-wide-2.svg); } .logo_text { position: absolute; left: 80px; top: 49px; - color: #949494; - opacity: 0.5; + color: var(--text); font-size: 10px; - min-width: 210px; display: flex; flex-direction: column; } @@ -70,17 +71,20 @@ export default { .logo { height: 24px; width: 150px; - background-image: url(../../images/light-wide-2-compact.svg); + background-image: url(../../images/dark-wide-2-compact.svg); background-position: left center; order: 2; margin-top: 0; } + .dark-theme .logo { + background-image: url(../../images/light-wide-2-compact.svg); + } .logo_text { display: none !important; } .tab_container .logo { display: block; - background-image: url(../../images/light-wide-2.svg); + background-image: url(../../images/dark-wide-2.svg); background-repeat: no-repeat; background-position: center 20px; background-position-x: 12px; @@ -91,6 +95,9 @@ export default { position: relative; border-bottom: 1px solid rgba(0, 0, 0, 0.3); } + .dark-theme .tab_container .logo { + background-image: url(../../images/light-wide-2.svg); + } .tab_container .logo .logo_text { display: flex !important; left: 82px; diff --git a/src/components/data-flash/DataFlash.vue b/src/components/data-flash/DataFlash.vue index 9734ff9ad8..cc5ee76148 100644 --- a/src/components/data-flash/DataFlash.vue +++ b/src/components/data-flash/DataFlash.vue @@ -78,12 +78,10 @@ export default { rgba(0, 0, 0, 0.55) ); padding-top: 5px; - text-shadow: 0 1px #000000; } .noflash_global { color: #868686; text-align: center; - text-shadow: 0 1px #000000; margin-top: 2px; } @@ -105,7 +103,7 @@ export default { border-radius: 2px; width: 25%; display: block; - background-color: var(--accent); + background-color: var(--primary-500); } .dataflash-contents_global div span { position: absolute; diff --git a/src/components/port-picker/FirmwareVirtualOption.vue b/src/components/port-picker/FirmwareVirtualOption.vue index 01742285bd..47d0983e74 100644 --- a/src/components/port-picker/FirmwareVirtualOption.vue +++ b/src/components/port-picker/FirmwareVirtualOption.vue @@ -1,14 +1,13 @@