[AGS] Battery: Design complete
This commit is contained in:
		| @@ -23,6 +23,7 @@ export const BatteryBox = () => { | |||||||
|                 label={bind(battery, "percentage").as( |                 label={bind(battery, "percentage").as( | ||||||
|                     p => ` ${Math.round(p * 100)}%`, |                     p => ` ${Math.round(p * 100)}%`, | ||||||
|                 )} |                 )} | ||||||
|  |                 marginEnd={3} | ||||||
|             /> |             /> | ||||||
|             <label |             <label | ||||||
|                 cssClasses={["battery-time"]} |                 cssClasses={["battery-time"]} | ||||||
| @@ -47,8 +48,8 @@ const toTime = (time: number) => { | |||||||
|     const hours = Math.round(time / HOUR); |     const hours = Math.round(time / HOUR); | ||||||
|     const minutes = Math.round((time - hours * HOUR) / MINUTE); |     const minutes = Math.round((time - hours * HOUR) / MINUTE); | ||||||
|  |  | ||||||
|     const hoursDisplay = hours > 0 ? `${hours}h ` : ""; |     const hoursDisplay = hours > 0 ? `${hours}h` : ""; | ||||||
|     const minutesDisplay = minutes > 0 ? `${minutes}m ` : ""; |     const minutesDisplay = minutes > 0 ? `${minutes}m` : ""; | ||||||
|  |  | ||||||
|     return `${hoursDisplay}${minutesDisplay}`; |     return `${hoursDisplay}${minutesDisplay}`; | ||||||
| }; | }; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user