UI: Add "Confirm OTA Update" title to OTA update confirmation dialog
This commit is contained in:
parent
eddd329772
commit
2dadf7207c
@ -129,15 +129,16 @@ export class OtaPackageService {
|
|||||||
}
|
}
|
||||||
return forkJoin(tasks).pipe(
|
return forkJoin(tasks).pipe(
|
||||||
mergeMap(([deviceFirmwareUpdate, deviceSoftwareUpdate]) => {
|
mergeMap(([deviceFirmwareUpdate, deviceSoftwareUpdate]) => {
|
||||||
let text = '';
|
const lines: string[] = [];
|
||||||
if (deviceFirmwareUpdate > 0) {
|
if (deviceFirmwareUpdate > 0) {
|
||||||
text += this.translate.instant('ota-update.change-firmware', {count: deviceFirmwareUpdate});
|
lines.push(this.translate.instant('ota-update.change-firmware', {count: deviceFirmwareUpdate}));
|
||||||
}
|
}
|
||||||
if (deviceSoftwareUpdate > 0) {
|
if (deviceSoftwareUpdate > 0) {
|
||||||
text += text.length ? ' ' : '';
|
lines.push(this.translate.instant('ota-update.change-software', {count: deviceSoftwareUpdate}));
|
||||||
text += this.translate.instant('ota-update.change-software', {count: deviceSoftwareUpdate});
|
|
||||||
}
|
}
|
||||||
return text !== '' ? this.dialogService.confirm('', text, null, this.translate.instant('common.proceed')) : of(true);
|
return lines.length
|
||||||
|
? this.dialogService.confirm(this.translate.instant('ota-update.change-ota-setting-title'), lines.join('<br/>'), null, this.translate.instant('common.proceed'))
|
||||||
|
: of(true);
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4167,6 +4167,7 @@
|
|||||||
"checksum-copied-message": "Package checksum has been copied to clipboard",
|
"checksum-copied-message": "Package checksum has been copied to clipboard",
|
||||||
"change-firmware": "Change of the firmware may cause update of { count, plural, =1 {1 device} other {# devices} }.",
|
"change-firmware": "Change of the firmware may cause update of { count, plural, =1 {1 device} other {# devices} }.",
|
||||||
"change-software": "Change of the software may cause update of { count, plural, =1 {1 device} other {# devices} }.",
|
"change-software": "Change of the software may cause update of { count, plural, =1 {1 device} other {# devices} }.",
|
||||||
|
"change-ota-setting-title": "Are you sure you want to change OTA settings?",
|
||||||
"chose-compatible-device-profile": "The uploaded package will be available only for devices with the chosen profile.",
|
"chose-compatible-device-profile": "The uploaded package will be available only for devices with the chosen profile.",
|
||||||
"chose-firmware-distributed-device": "Choose firmware that will be distributed to the devices",
|
"chose-firmware-distributed-device": "Choose firmware that will be distributed to the devices",
|
||||||
"chose-software-distributed-device": "Choose software that will be distributed to the devices",
|
"chose-software-distributed-device": "Choose software that will be distributed to the devices",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user