|
|
|
@ -2608,7 +2608,8 @@ export class TbDeviceInstallDialogComponent extends DialogComponent<TbDeviceInst |
|
|
|
|
|
|
|
/** |
|
|
|
* The key of the step's install state: its id, or else its type and name, so that two steps of an install method |
|
|
|
* never share it. A form keeps its name: it records no entity, and no entity step's key equals it. |
|
|
|
* never share it. A form without an id keeps its name, which no entity step's type-and-name key equals; a step id |
|
|
|
* equal to a form's name is caught by the duplicate check. |
|
|
|
* The server keys the steps of an update the same way. |
|
|
|
*/ |
|
|
|
private stateKeyOf(step: DeviceInstallStep): string { |
|
|
|
@ -2616,13 +2617,13 @@ export class TbDeviceInstallDialogComponent extends DialogComponent<TbDeviceInst |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* A key two entity steps of the install method share, so one's install state would overwrite the other's; null when |
|
|
|
* none. Forms are left out: their values are merged, so a shared form key loses nothing. |
|
|
|
* A key two steps of the install method share (forms included: a form's values are saved under its key too), so one's |
|
|
|
* install state would overwrite the other's; null when none. |
|
|
|
*/ |
|
|
|
private duplicateStateKey(): string | null { |
|
|
|
const keys = new Set<string>(); |
|
|
|
for (const step of this.packageInfo.installSteps[this.selectedInstallMethod] ?? []) { |
|
|
|
if (!ENTITY_STEP_TYPES.has(step.type)) { |
|
|
|
if (step.type !== InstallStepType.SHOW_FORM && !ENTITY_STEP_TYPES.has(step.type)) { |
|
|
|
continue; |
|
|
|
} |
|
|
|
const key = this.stateKeyOf(step); |
|
|
|
|