Skip to content

Commit

Permalink
Merge branch 'develop' into #156-fault-page
Browse files Browse the repository at this point in the history
bracyw committed Oct 27, 2024
2 parents 485b20b + 494b8f7 commit 76c21ee
Showing 10 changed files with 66 additions and 1 deletion.
Binary file removed ArgosIOS/.DS_Store
Binary file not shown.
Binary file removed ArgosIOS/Argos/.DS_Store
Binary file not shown.
Binary file removed ArgosIOS/Argos/Components/.DS_Store
Binary file not shown.
2 changes: 2 additions & 0 deletions angular-client/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -94,6 +94,7 @@ import PackVoltageDisplay from 'src/pages/charging-page/components/pack-voltage/
import ChargingStatusComponent from 'src/pages/charging-page/components/charging-state/charging-status.component';
import { BatteryPercentageComponent } from 'src/pages/charging-page/components/battery-percentage/battery-percentage.component';
import { BatteryInfoDisplay } from 'src/pages/charging-page/components/battery-info-display/battery-info-display';
import { ToastButtonComponent } from 'src/components/toast-button/toast-button.component';
import StartingSocTimer from 'src/pages/charging-page/components/starting-soc/starting-soc-timer.component';
import CurrentTotalTimer from 'src/components/current-total-timer/current-total-timer.component';
import BalancingStatus from 'src/pages/charging-page/components/balancing-status/balancing-status.component';
@@ -188,6 +189,7 @@ import FaultBox from 'src/pages/fault-page/components/fault-display/fault-box.co
HighLowCellGraph,
PackVoltageGraph,
PackVoltageDisplay,
ToastButtonComponent,
ChargingStatusComponent,
StartingSocTimer,
CurrentTotalTimer,
Original file line number Diff line number Diff line change
@@ -17,3 +17,9 @@
-ms-user-select: none;
user-select: none;
}

.btn:hover {
transition: ease;
transition-duration: 0.2s;
background-color: #f04346b2;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.btn {
background-color: #f04346;
border: none;
color: white;
border-radius: 12px;
padding: 2px 0px;
text-align: center;
text-decoration: none;
font-size: 16px;
cursor: pointer;
display: inline-block;
font-weight: bold;
}

.btn:hover {
transition: ease;
transition-duration: 0.2s;
background-color: #f04346b2;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div id="button">
<button type="button" class="btn" (click)="handleClick()" [style]="style">{{ label }}</button>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { Component, Input } from '@angular/core';
import { MessageService } from 'primeng/api';

@Component({
selector: 'toast-button',
templateUrl: './toast-button.component.html',
styleUrls: ['./toast-button.component.css']
})
export class ToastButtonComponent {
@Input() label!: string;
@Input() onClick!: () => void;
@Input() additionalStyles?: string;
style!: string;

ngOnInit(): void {
this.style = 'width: 140px; height: 45px; ';

if (this.additionalStyles) {
this.style += this.additionalStyles;
}
}

constructor(private messageService: MessageService) {}

handleClick() {
this.onClick();
setTimeout(() => {
this.messageService.add({
severity: 'success',
summary: 'Success!',
detail: 'Your new run has started successfully.'
});
});
}
}
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@
<hstack style="width: 100%"
><typography variant="header" content="{{ time | date: 'MM/dd/yyyy' }} | {{ location }} " />
<latency-display style="width: 40%" />
<argos-button [onClick]="this.onStartNewRun" label="Start New Run"></argos-button>
<toast-button [onClick]="this.onStartNewRun" label="Start New Run"></toast-button>
</hstack>

<hstack style="width: 100%">
Binary file removed scylla-server/.DS_Store
Binary file not shown.

0 comments on commit 76c21ee

Please sign in to comment.