ciyidogan commited on
Commit
87ffafd
·
verified ·
1 Parent(s): ea92a97

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
- <h4>Example Sentences</h4>
79
- <p>Add example sentences that should trigger this intent</p>
 
 
 
 
 
 
 
 
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
- [(ngModel)]="newExample"
86
- [ngModelOptions]="{standalone: true}"
87
- (keyup.enter)="addExample()"
88
- placeholder="e.g., I want to book a flight">
89
  </mat-form-field>
90
- <button mat-raised-button color="primary"
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="examples.length > 0">
99
- <mat-list-item *ngFor="let example of examples.controls; let i = index">
100
- <mat-icon matListItemIcon>format_quote</mat-icon>
101
- <div matListItemTitle>{{ example.value }}</div>
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="examples.length === 0">
109
- <p>No examples added yet. Examples help improve intent detection accuracy.</p>
 
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">