Skip to content

Commit 63ab279

Browse files
Diede Kerkhofkodiakhq[bot]
Diede Kerkhof
authored andcommitted
fix: apply requested changes
sneak in change title hover for delete node attributes
1 parent 178bab4 commit 63ab279

File tree

4 files changed

+21
-25
lines changed

4 files changed

+21
-25
lines changed

frank-flow/src/frontend/src/app/flow/options/options.component.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,10 @@ <h2>Attributes</h2>
9292
(ngModelChange)="changeAttribute(attribute.key, $event)"
9393
[ngModel]="attributes[attribute.key].value"
9494
type="text"
95+
title="Delete attribute"
9596
/>
9697
<app-button (click)="deleteAttribute(attribute.key)">
97-
<fa-icon
98-
[icon]="['fas', 'trash']"
99-
title="Delete attribute"
100-
></fa-icon>
98+
<fa-icon [icon]="['fas', 'trash']"></fa-icon>
10199
</app-button>
102100
</div>
103101
<ng-template #inputOnly>

frank-flow/src/frontend/src/app/header/configuration-settings/configuration-settings.component.html

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ <h1>Flow settings</h1>
1919
<div *ngIf="flowSettings">
2020
<div class="input-row">
2121
<label
22-
for="edit-mode"
22+
for="grid-configuration"
2323
title="Automatically snap a node to a defined grid for easy layout"
2424
>Snap to grid</label
2525
>
@@ -49,17 +49,15 @@ <h1>Flow settings</h1>
4949
<app-button
5050
*ngIf="flowSettings.gridSize !== undefined"
5151
(click)="deleteConfigurationSetting('gridSize')"
52+
title="Delete setting from configuration"
5253
>
53-
<fa-icon
54-
[icon]="['fas', 'trash']"
55-
title="Delete attribute"
56-
></fa-icon>
54+
<fa-icon [icon]="['fas', 'trash']"></fa-icon>
5755
</app-button>
5856
</div>
5957
</div>
6058
<div class="input-row">
6159
<label
62-
for="edit-mode"
60+
for="grid-configuration"
6361
title="The style of the connections between nodes"
6462
>Forward style</label
6563
>
@@ -96,17 +94,15 @@ <h1>Flow settings</h1>
9694
<app-button
9795
*ngIf="flowSettings.forwardStyle"
9896
(click)="deleteConfigurationSetting('forwardStyle')"
97+
title="Delete setting from configuration"
9998
>
100-
<fa-icon
101-
[icon]="['fas', 'trash']"
102-
title="Delete attribute"
103-
></fa-icon>
99+
<fa-icon [icon]="['fas', 'trash']"></fa-icon>
104100
</app-button>
105101
</div>
106102
</div>
107103
<div class="input-row">
108104
<label
109-
for="edit-mode"
105+
for="grid-configuration"
110106
title="The direction will change the location of the anchor-points on the nodes"
111107
>Flow direction</label
112108
>
@@ -137,17 +133,17 @@ <h1>Flow settings</h1>
137133
<app-button
138134
*ngIf="flowSettings.direction"
139135
(click)="deleteConfigurationSetting('direction')"
136+
title="Delete setting from configuration"
140137
>
141-
<fa-icon
142-
[icon]="['fas', 'trash']"
143-
title="Delete attribute"
144-
></fa-icon>
138+
<fa-icon [icon]="['fas', 'trash']"></fa-icon>
145139
</app-button>
146140
</div>
147141
</div>
148142
</div>
149143
<div *ngIf="!flowSettings">
150-
Please wait with editing until the configuration is loaded
144+
No configuration element has been found. Please make shure the
145+
configuration file includes either &lt;Configuration&gt; or
146+
&lt;Module&gt;.
151147
</div>
152148
</div>
153149
</ngx-smart-modal>

frank-flow/src/frontend/src/app/header/header.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*ngIf="currentFile?.type === fileType.CONFIGURATION"
3030
(click)="openConfigurationSettings()"
3131
color="dark"
32-
title="Modify configuration settings"
32+
title="Modify flow settings"
3333
>
3434
<fa-icon icon="cogs"></fa-icon>
3535
</app-button>

frank-flow/src/frontend/src/app/shared/services/flow-structure.service.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,11 @@ export class FlowStructureService {
403403
}
404404

405405
deleteFlowSetting(deleteFlowSetting: string) {
406-
const configurationAttributes =
407-
this.flowStructure.configuration!.attributes;
406+
if (this.flowStructure.configuration == undefined) {
407+
return;
408+
}
409+
const configurationAttributes = this.flowStructure.configuration.attributes;
410+
408411
this.deleteAttribute(deleteFlowSetting, configurationAttributes, true);
409412
}
410413

@@ -478,8 +481,7 @@ export class FlowStructureService {
478481
| monaco.editor.IIdentifiedSingleEditOperation[]
479482
| void {
480483
for (const [nodeId, editAttributes] of this.editAttributeQueue.entries()) {
481-
let node: FlowStructureNode | undefined;
482-
node = this.currentFile.flowStructure?.nodes.find(
484+
const node = this.currentFile.flowStructure?.nodes.find(
483485
(node: FlowStructureNode) => node.uid === nodeId
484486
);
485487
const editOperations: monaco.editor.IIdentifiedSingleEditOperation[] = [];

0 commit comments

Comments
 (0)