From fdae63e1a5747ca9a6b9a9fe8d88ae0e2b53f83a Mon Sep 17 00:00:00 2001 From: wyattb Date: Thu, 5 Sep 2024 17:33:52 -0400 Subject: [PATCH] #172 - battery status comp clean up + mobile view status comp --- .DS_Store | Bin 10244 -> 10244 bytes angular-client/src/app/app.module.ts | 4 +-- .../charging-page-mobile.component.html | 17 ---------- .../charging-page.component.html | 2 +- .../battery-status-display.component.ts | 29 ------------------ .../combined-status-display.component.css} | 0 .../combined-status-display.component.html} | 0 .../combined-status-display.component.ts | 8 +++++ .../combined-status-display.component.css | 7 +++++ .../combined-status-display.component.html | 8 +++++ .../combined-status-display.component.ts | 8 +++++ 11 files changed, 34 insertions(+), 49 deletions(-) delete mode 100644 angular-client/src/pages/charging-page/components/battery-status-display/battery-status-display.component.ts rename angular-client/src/pages/charging-page/components/{battery-status-display/battery-status-display.component.css => combined-status-display/combined-status-display.component.css} (100%) rename angular-client/src/pages/charging-page/components/{battery-status-display/battery-status-display.component.html => combined-status-display/combined-status-display.component.html} (100%) create mode 100644 angular-client/src/pages/charging-page/components/combined-status-display/combined-status-display.component.ts create mode 100644 angular-client/src/pages/charging-page/components/combined-status-display/mobile-view/combined-status-display.component.css create mode 100644 angular-client/src/pages/charging-page/components/combined-status-display/mobile-view/combined-status-display.component.html create mode 100644 angular-client/src/pages/charging-page/components/combined-status-display/mobile-view/combined-status-display.component.ts diff --git a/.DS_Store b/.DS_Store index 12a7b0673d975db203b5ce53178041ab032f4ca4..ff82cb45c0f67d2e1df7881fe5e77bddae2ecacc 100644 GIT binary patch delta 406 zcmZn(XbG6$&uF+YU^hRb;ba~G$+)FV<_ruBEDU-K=?s|+CAs-7E=f80NkB0U!MKa1 zoleIbQRP$c$`@o91}Ep|76A1yFy%9BZWhR4VsZEuyLa*fK?M=5?}Bb3A42LKgpabN%d delta 245 zcmZn(XbG6$dGU^hRb?qnVT$++^n_ZS!$SQzve(it)tN^Sq zFcw*2aOV diff --git a/angular-client/src/app/app.module.ts b/angular-client/src/app/app.module.ts index 2d649684..174a7ea1 100644 --- a/angular-client/src/app/app.module.ts +++ b/angular-client/src/app/app.module.ts @@ -80,7 +80,6 @@ import { SwitchComponent } from 'src/components/switch/switch.component'; import { DoubleLineGraphComponent } from 'src/components/double-line-graph/double-line-graph.component'; import BatteryInfoDesktop from 'src/pages/charging-page/components/battery-info-display/battery-info-desktop/battery-info-desktop.component'; import BatteryInfoMobile from 'src/pages/charging-page/components/battery-info-display/battery-info-mobile/battery-info-mobile.component'; -import BatteryStatusDisplay from 'src/pages/charging-page/components/battery-status-display/battery-status-display.component'; import StateOfChargeDisplay from 'src/pages/charging-page/components/state-of-charge/state-of-charge-display/state-of-charge-display.component'; import PackTemp from 'src/pages/charging-page/components/pack-temp/pack-temp.component'; import CellTempDisplay from 'src/pages/charging-page/components/cell-temp/cell-temp-display/cell-temp-display.component'; @@ -100,6 +99,7 @@ import CurrentTotalTimer from 'src/components/current-total-timer/current-total- import BalancingStatus from 'src/pages/charging-page/components/balancing-status/balancing-status.component'; import FaultedStatus from 'src/pages/charging-page/components/faulted-status/faulted-status.component'; import ActiveStatus from 'src/pages/charging-page/components/active-status/active-status.component'; +import CombinedStatusDisplay from 'src/pages/charging-page/components/combined-status-display/combined-status-display.component'; @NgModule({ declarations: [ @@ -164,7 +164,7 @@ import ActiveStatus from 'src/pages/charging-page/components/active-status/activ BatteryInfoMobile, NodeFilterPipe, DataTypeFilterPipe, - BatteryStatusDisplay, + CombinedStatusDisplay, StateOfChargeDisplay, PackTemp, CellTempDisplay, diff --git a/angular-client/src/pages/charging-page/charging-page-mobile/charging-page-mobile.component.html b/angular-client/src/pages/charging-page/charging-page-mobile/charging-page-mobile.component.html index 5e60ec4a..2d2ba1c4 100644 --- a/angular-client/src/pages/charging-page/charging-page-mobile/charging-page-mobile.component.html +++ b/angular-client/src/pages/charging-page/charging-page-mobile/charging-page-mobile.component.html @@ -2,21 +2,4 @@ - - - - - - - - - - - - - - - - - diff --git a/angular-client/src/pages/charging-page/charging-page.component.html b/angular-client/src/pages/charging-page/charging-page.component.html index 848ab400..d2197ff5 100644 --- a/angular-client/src/pages/charging-page/charging-page.component.html +++ b/angular-client/src/pages/charging-page/charging-page.component.html @@ -19,7 +19,7 @@ - + diff --git a/angular-client/src/pages/charging-page/components/battery-status-display/battery-status-display.component.ts b/angular-client/src/pages/charging-page/components/battery-status-display/battery-status-display.component.ts deleted file mode 100644 index 58fac048..00000000 --- a/angular-client/src/pages/charging-page/components/battery-status-display/battery-status-display.component.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Component } from '@angular/core'; -import Storage from 'src/services/storage.service'; -import Theme from 'src/services/theme.service'; -import { IdentifierDataType } from 'src/utils/enumerations/identifier-data-type'; -import { floatPipe } from 'src/utils/pipes.utils'; - -@Component({ - selector: 'battery-status-display', - templateUrl: './battery-status-display.component.html', - styleUrls: ['./battery-status-display.component.css'] -}) -export default class BatteryStatusDisplay { - isBalancing: boolean = false; - constructor(private storage: Storage) {} - - ngOnInit() { - this.storage.get(IdentifierDataType.STATUS_BALANCING).subscribe((value) => { - this.isBalancing = floatPipe(value.values[0]) === 1; - }); - } - - getBatteryStatus(connected: boolean) { - return connected ? 'BALANCING' : 'NOT BALANCING'; - } - - getStatusColor(isBalancing: boolean) { - return isBalancing ? 'green' : Theme.infoBackground; - } -} diff --git a/angular-client/src/pages/charging-page/components/battery-status-display/battery-status-display.component.css b/angular-client/src/pages/charging-page/components/combined-status-display/combined-status-display.component.css similarity index 100% rename from angular-client/src/pages/charging-page/components/battery-status-display/battery-status-display.component.css rename to angular-client/src/pages/charging-page/components/combined-status-display/combined-status-display.component.css diff --git a/angular-client/src/pages/charging-page/components/battery-status-display/battery-status-display.component.html b/angular-client/src/pages/charging-page/components/combined-status-display/combined-status-display.component.html similarity index 100% rename from angular-client/src/pages/charging-page/components/battery-status-display/battery-status-display.component.html rename to angular-client/src/pages/charging-page/components/combined-status-display/combined-status-display.component.html diff --git a/angular-client/src/pages/charging-page/components/combined-status-display/combined-status-display.component.ts b/angular-client/src/pages/charging-page/components/combined-status-display/combined-status-display.component.ts new file mode 100644 index 00000000..984c4089 --- /dev/null +++ b/angular-client/src/pages/charging-page/components/combined-status-display/combined-status-display.component.ts @@ -0,0 +1,8 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'combined-status-display', + templateUrl: './combined-status-display.component.html', + styleUrls: ['./combined-status-display.component.css'] +}) +export default class CombinedStatusDisplay {} diff --git a/angular-client/src/pages/charging-page/components/combined-status-display/mobile-view/combined-status-display.component.css b/angular-client/src/pages/charging-page/components/combined-status-display/mobile-view/combined-status-display.component.css new file mode 100644 index 00000000..2783a6a3 --- /dev/null +++ b/angular-client/src/pages/charging-page/components/combined-status-display/mobile-view/combined-status-display.component.css @@ -0,0 +1,7 @@ +.connection-dot { + background-color: #2c2c2c; + border: 3px solid; + width: 40px; + height: 40px; + border-radius: 50%; +} diff --git a/angular-client/src/pages/charging-page/components/combined-status-display/mobile-view/combined-status-display.component.html b/angular-client/src/pages/charging-page/components/combined-status-display/mobile-view/combined-status-display.component.html new file mode 100644 index 00000000..e06618ec --- /dev/null +++ b/angular-client/src/pages/charging-page/components/combined-status-display/mobile-view/combined-status-display.component.html @@ -0,0 +1,8 @@ +
+ + + + + + +
diff --git a/angular-client/src/pages/charging-page/components/combined-status-display/mobile-view/combined-status-display.component.ts b/angular-client/src/pages/charging-page/components/combined-status-display/mobile-view/combined-status-display.component.ts new file mode 100644 index 00000000..562a046e --- /dev/null +++ b/angular-client/src/pages/charging-page/components/combined-status-display/mobile-view/combined-status-display.component.ts @@ -0,0 +1,8 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'combined-status-mobile', + templateUrl: './combined-status-mobile.component.html', + styleUrls: ['./combined-status-mobile.component.css'] +}) +export default class CombinedStatusMobile {}