|
|
|
@ -129,15 +129,16 @@ export class OtaPackageService { |
|
|
|
} |
|
|
|
return forkJoin(tasks).pipe( |
|
|
|
mergeMap(([deviceFirmwareUpdate, deviceSoftwareUpdate]) => { |
|
|
|
let text = ''; |
|
|
|
const lines: string[] = []; |
|
|
|
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) { |
|
|
|
text += text.length ? ' ' : ''; |
|
|
|
text += this.translate.instant('ota-update.change-software', {count: deviceSoftwareUpdate}); |
|
|
|
lines.push(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); |
|
|
|
}) |
|
|
|
); |
|
|
|
} |
|
|
|
|