From 48d4cf4ec096e1b52bd425c64a9ad3577866a0db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=96=E5=8F=81?= Date: Mon, 23 Dec 2024 23:05:43 +0800 Subject: [PATCH] refactor: ui --- .idea/deploymentTargetSelector.xml | 4 +- app/build.gradle.kts | 1 + .../java/icu/fur93/esp32_car/MainActivity.kt | 341 +++--------------- .../main/java/icu/fur93/esp32_car/Route.kt | 10 + .../esp32_car/page/ControlGamepadModePage.kt | 14 + .../page/ControlGyroscopeModePage.kt | 14 + .../icu/fur93/esp32_car/page/ControlPage.kt | 21 ++ .../page/ControlPathfinderModePage.kt | 14 + .../page/ControlSingleJoystickMode.kt | 14 + .../java/icu/fur93/esp32_car/page/HomePage.kt | 125 +++++++ .../fur93/esp32_car/page/LegacyControlPage.kt | 314 ++++++++++++++++ .../icu/fur93/esp32_car/page/SettingsPage.kt | 21 ++ .../ui/component/BottomNavigationBar.kt | 62 ++++ .../fur93/esp32_car/ui/component/Joystick.kt | 16 +- .../fur93/esp32_car/ui/component/PageTitle.kt | 37 ++ .../esp32_car/ui/component/StatusCard.kt | 68 ++++ .../esp32_car/ui/layout/ControlModeLayout.kt | 21 ++ .../fur93/esp32_car/ui/layout/MainLayout.kt | 27 ++ .../java/icu/fur93/esp32_car/ui/theme/Type.kt | 18 +- .../esp32_car/viewmodel/MainViewModel.kt | 2 + gradle/libs.versions.toml | 2 + 21 files changed, 844 insertions(+), 302 deletions(-) create mode 100644 app/src/main/java/icu/fur93/esp32_car/Route.kt create mode 100644 app/src/main/java/icu/fur93/esp32_car/page/ControlGamepadModePage.kt create mode 100644 app/src/main/java/icu/fur93/esp32_car/page/ControlGyroscopeModePage.kt create mode 100644 app/src/main/java/icu/fur93/esp32_car/page/ControlPage.kt create mode 100644 app/src/main/java/icu/fur93/esp32_car/page/ControlPathfinderModePage.kt create mode 100644 app/src/main/java/icu/fur93/esp32_car/page/ControlSingleJoystickMode.kt create mode 100644 app/src/main/java/icu/fur93/esp32_car/page/HomePage.kt create mode 100644 app/src/main/java/icu/fur93/esp32_car/page/LegacyControlPage.kt create mode 100644 app/src/main/java/icu/fur93/esp32_car/page/SettingsPage.kt create mode 100644 app/src/main/java/icu/fur93/esp32_car/ui/component/BottomNavigationBar.kt create mode 100644 app/src/main/java/icu/fur93/esp32_car/ui/component/PageTitle.kt create mode 100644 app/src/main/java/icu/fur93/esp32_car/ui/component/StatusCard.kt create mode 100644 app/src/main/java/icu/fur93/esp32_car/ui/layout/ControlModeLayout.kt create mode 100644 app/src/main/java/icu/fur93/esp32_car/ui/layout/MainLayout.kt create mode 100644 app/src/main/java/icu/fur93/esp32_car/viewmodel/MainViewModel.kt diff --git a/.idea/deploymentTargetSelector.xml b/.idea/deploymentTargetSelector.xml index c2d1443..231781b 100644 --- a/.idea/deploymentTargetSelector.xml +++ b/.idea/deploymentTargetSelector.xml @@ -4,10 +4,10 @@