10000 feat(ui): add pencil right after the step name in edition mode (#3264) · ovh/cds@ab478b3 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit ab478b3

Browse files
bnjjjyesnault
authored andcommitted
feat(ui): add pencil right after the step name in edition mode (#3264)
close #3262 Signed-off-by: Benjamin Coenen <benjamin.coenen@corp.ovh.com>
1 parent a209ade commit ab478b3

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

ui/src/app/shared/action/step/step.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export class ActionStepComponent {
4747
@Output() removeEvent = new EventEmitter<StepEvent>();
4848

4949
originalParam = new Map<string, Parameter>();
50+
editStepName = false;
5051
constructor() {
5152
this.collapsed = true;
5253
}

ui/src/app/shared/action/step/step.html

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,26 @@
66
<i class="caret right icon" *ngIf="!collapsed"></i>
77
</span>
88
<div class="four wide inline field inputStepname" *ngIf="edit">
9-
<input class="inline" type="text" name="stepName" [(ngModel)]="step.step_name" (keydown)="action.hasChanged = true">
9+
<input *ngIf="editStepName"
10+
class="inline"
11+
type="text"
12+
name="stepName"
13+
[(ngModel)]="step.step_name"
14+
(keydown)="action.hasChanged = true">
15+
<span *ngIf="!editStepName">
16+
{{step.step_name}}
17+
<i class="stepname" *ngIf="step.step_name !== step.name">({{step.name}})</i>
18+
</span>
19+
<a class="inline pointing ml5" (click)="editStepName = true" *ngIf="!editStepName">
20+
<i class="pencil icon float"></i>
21+
</a>
1022
</div>
1123
<div class="{{edit ? 'four' : 'eight'}} wide inline field">
1224
<span class="pointing" (click)="collapsed = !collapsed">
1325
<span *ngIf="!edit">
1426
{{step.step_name}}
1527
</span>
16-
<i class="stepname">({{step.name}})</i>
28+
<i class="stepname" *ngIf="!edit || editStepName">({{step.name}})</i>
1729
</span>
1830
<span class="textOrange" *ngIf="action.deprecated">
1931
<i class="warning orange sign icon"></i>{{'common_deprecated' | translate}}

0 commit comments

Comments
 (0)
0