added platform description to the firmware upgrade dialog

This commit is contained in:
csawatzky 2025-10-10 16:45:26 -06:00
parent e535ec3c8b
commit b3a50db873
2 changed files with 30 additions and 1 deletions

View file

@ -270,7 +270,7 @@ export default function UpgradeDevice(props: Props) {
<Divider /> <Divider />
<DialogContent className={classes.dialogContent}> <DialogContent className={classes.dialogContent}>
<DialogContentText id="alert-dialog-slide-description"> <DialogContentText id="alert-dialog-slide-description">
Upgrading from {currentFirmware()} to {latestFirmware()} Upgrading {device.platformName()} from {currentFirmware()} to {latestFirmware()}
<br /> <br />
<br /> <br />
It is recommended that the device be plugged in during the upgrade as it will take It is recommended that the device be plugged in during the upgrade as it will take

View file

@ -109,6 +109,35 @@ export class Device {
return m; return m;
} }
public platformName(): string {
switch (this.settings.platform) {
case pond.DevicePlatform.DEVICE_PLATFORM_PHOTON:
return "Photon"
case pond.DevicePlatform.DEVICE_PLATFORM_ELECTRON:
return "Electron"
case pond.DevicePlatform.DEVICE_PLATFORM_V2_CELLULAR:
return "V2 Cellular"
case pond.DevicePlatform.DEVICE_PLATFORM_V2_WIFI:
return "V2 Wifi"
case pond.DevicePlatform.DEVICE_PLATFORM_V2_WIFI_S3:
return "V2 Wifi S3"
case pond.DevicePlatform.DEVICE_PLATFORM_V2_CELLULAR_S3:
return "V2 Cellular S3"
case pond.DevicePlatform.DEVICE_PLATFORM_V2_CELLULAR_BLACK:
return "V2 Cellular Black"
case pond.DevicePlatform.DEVICE_PLATFORM_V2_CELLULAR_GREEN:
return "V2 Callular Green"
case pond.DevicePlatform.DEVICE_PLATFORM_V2_WIFI_BLUE:
return "V2 Wifi Blue"
case pond.DevicePlatform.DEVICE_PLATFORM_V2_CELLULAR_BLUE:
return "V2 Cellular Blue"
case pond.DevicePlatform.DEVICE_PLATFORM_V2_ETHERNET_BLUE:
return "V2 Ethernet Blue"
default:
return "";
}
}
public featureSupported(feature: string): boolean { public featureSupported(feature: string): boolean {
let versions = featureVersions.get(feature); let versions = featureVersions.get(feature);
if (!versions) { if (!versions) {