Skip to content
This repository has been archived by the owner on Jan 7, 2025. It is now read-only.

Commit

Permalink
feat: change description for status
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinNitroG committed Dec 10, 2024
1 parent cff8de3 commit 354f1fc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ $ win-check-bat
│ 54,000 mWh │ 49,680 mWh │ 92% │ Excellent │
└─────────────────┴───────────────────────┴────────┴───────────┘
Almost like new; minimal wear and tear; delivers peak performance.
The battery is in optimal condition, exhibiting minimal degradation and maintaining near-peak performance. It retains most of its original capacity.
```

```
Expand All @@ -75,7 +75,7 @@ Design capacity: 54,000 mWh
Full charged capacity: 49,680 mWh
Battery health: 92%
Status: Excellent
Description: Almost like new; minimal wear and tear; delivers peak performance.
Description: The battery is in optimal condition, exhibiting minimal degradation and maintaining near-peak performance. It retains most of its original capacity.
```

```
Expand Down
10 changes: 5 additions & 5 deletions src/utils/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ function getStatus(health: number): Status {
function getStatusDesc(status: Status): string {
switch (status) {
case Status.excellent:
return 'Almost like new; minimal wear and tear; delivers peak performance.';
return 'The battery is in optimal condition, exhibiting minimal degradation and maintaining near-peak performance. It retains most of its original capacity.';
case Status.good:
return 'Slightly degraded but still performs well; may hold slightly less charge.';
return 'The battery demonstrates slight degradation, with a marginal reduction in its maximum capacity. Performance remains reliable, and the impact on usability is minimal.';
case Status.fair:
return 'Noticeable degradation; reduced battery life; may need charging more frequently.';
return 'The battery shows noticeable signs of wear, with a significant reduction in capacity. Users may experience shorter usage times between charges.';
case Status.poor:
return 'Significant degradation; struggles to hold charge; likely needs replacement.';
return "The battery's capacity has degraded considerably, resulting in reduced functionality and the need for more frequent charging. Replacement is recommended.";
case Status.veryBad:
return 'Severely degraded; may not last long or support normal device usage.';
return 'The battery is severely degraded, with insufficient capacity to support normal device operation. Immediate replacement is advised to ensure functionality.';
default:
throw new Error('Unknown Status');
}
Expand Down
4 changes: 2 additions & 2 deletions src/utils/statusColor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ function getStatusColor(status: Status): StatusColor {
case Status.excellent:
return 'green';
case Status.good:
return 'white';
case Status.fair:
return 'cyan';
case Status.fair:
return 'white';
case Status.poor:
return 'yellow';
case Status.veryBad:
Expand Down

0 comments on commit 354f1fc

Please sign in to comment.