Spaces:
Building
Building
Update flare-ui/src/app/dialogs/intent-edit-dialog/intent-edit-dialog.component.html
Browse files
flare-ui/src/app/dialogs/intent-edit-dialog/intent-edit-dialog.component.html
CHANGED
@@ -75,43 +75,47 @@
|
|
75 |
<mat-tab label="Examples">
|
76 |
<div class="tab-content">
|
77 |
<div class="examples-section">
|
78 |
-
<
|
79 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
|
81 |
<div class="add-example">
|
82 |
<mat-form-field appearance="outline" class="example-input">
|
83 |
<mat-label>New Example</mat-label>
|
84 |
-
<input matInput
|
85 |
-
|
86 |
-
|
87 |
-
(keyup.enter)="addExample()"
|
88 |
-
placeholder="e.g., I want to book a flight">
|
89 |
</mat-form-field>
|
90 |
-
<button mat-raised-button color="
|
91 |
-
(click)="addExample()"
|
92 |
-
[disabled]="!newExample || !newExample.trim()">
|
93 |
<mat-icon>add</mat-icon>
|
94 |
-
Add
|
95 |
</button>
|
96 |
</div>
|
97 |
|
98 |
-
<mat-list class="examples-list" *ngIf="
|
99 |
-
<mat-list-item *ngFor="let example of
|
100 |
-
|
101 |
-
<
|
102 |
-
<button mat-icon-button matListItemMeta (click)="removeExample(i)">
|
103 |
<mat-icon>delete</mat-icon>
|
104 |
</button>
|
105 |
</mat-list-item>
|
106 |
</mat-list>
|
107 |
|
108 |
-
<div class="empty-state" *ngIf="
|
109 |
-
<
|
|
|
110 |
</div>
|
111 |
</div>
|
112 |
</div>
|
113 |
</mat-tab>
|
114 |
-
|
115 |
<!-- Parameters Tab -->
|
116 |
<mat-tab label="Parameters">
|
117 |
<div class="tab-content">
|
|
|
75 |
<mat-tab label="Examples">
|
76 |
<div class="tab-content">
|
77 |
<div class="examples-section">
|
78 |
+
<div class="examples-header">
|
79 |
+
<h4>Examples for</h4>
|
80 |
+
<mat-form-field appearance="outline" class="locale-selector">
|
81 |
+
<mat-select [(value)]="selectedExampleLocale">
|
82 |
+
<mat-option *ngFor="let locale of supportedLocales" [value]="locale">
|
83 |
+
{{ getLocaleName(locale) }}
|
84 |
+
</mat-option>
|
85 |
+
</mat-select>
|
86 |
+
</mat-form-field>
|
87 |
+
</div>
|
88 |
|
89 |
<div class="add-example">
|
90 |
<mat-form-field appearance="outline" class="example-input">
|
91 |
<mat-label>New Example</mat-label>
|
92 |
+
<input matInput [(ngModel)]="newExample" [ngModelOptions]="{standalone: true}"
|
93 |
+
placeholder="e.g., I want to book a flight from Istanbul to Ankara"
|
94 |
+
(keyup.enter)="addExample()">
|
|
|
|
|
95 |
</mat-form-field>
|
96 |
+
<button mat-raised-button color="accent" (click)="addExample()" [disabled]="!newExample.trim()">
|
|
|
|
|
97 |
<mat-icon>add</mat-icon>
|
98 |
+
Add Example
|
99 |
</button>
|
100 |
</div>
|
101 |
|
102 |
+
<mat-list class="examples-list" *ngIf="getExamplesForCurrentLocale().length > 0">
|
103 |
+
<mat-list-item *ngFor="let example of getExamplesForCurrentLocale()">
|
104 |
+
{{ example.example }}
|
105 |
+
<button mat-icon-button matListItemMeta (click)="removeExample(example)">
|
|
|
106 |
<mat-icon>delete</mat-icon>
|
107 |
</button>
|
108 |
</mat-list-item>
|
109 |
</mat-list>
|
110 |
|
111 |
+
<div class="empty-state" *ngIf="getExamplesForCurrentLocale().length === 0">
|
112 |
+
<mat-icon>format_list_bulleted</mat-icon>
|
113 |
+
<p>No examples for {{ getLocaleName(selectedExampleLocale) }} yet.</p>
|
114 |
</div>
|
115 |
</div>
|
116 |
</div>
|
117 |
</mat-tab>
|
118 |
+
|
119 |
<!-- Parameters Tab -->
|
120 |
<mat-tab label="Parameters">
|
121 |
<div class="tab-content">
|