forked from italanta/elewa
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b1b7b9b
commit 4cbf99a
Showing
7 changed files
with
86 additions
and
4 deletions.
There are no files selected for viewing
31 changes: 30 additions & 1 deletion
31
.../features/convs-mgr/fallbacks/src/lib/modals/fallback-modal/fallback-modal.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,30 @@ | ||
<p>fallback-modal works!</p> | ||
<div class="main"> | ||
<div class="title-section"> | ||
<span class="title">Configure fallback - Global - “Hi”</span> | ||
<div class="text">Fallbacks are configured using a concept called “Intent analysis”. Our AI will classify what a user is trying | ||
to do and react accordingly. In this section, you can define one of these intents and how the system should react. | ||
</div> | ||
</div> | ||
|
||
<div class="input-analysis"> | ||
<span class="title">Input analysis</span> | ||
<div class="text">List the keywords you wish to group together under one “intent”. Don’t worry, our AI will expand | ||
your list to include all similar words in different languages. | ||
</div> | ||
</div> | ||
|
||
<div class="action"> | ||
<div>What should the bot do when a user expresses this intent?</div> | ||
</div> | ||
|
||
<div class="action-details"> | ||
<div> | ||
<span>Story</span> | ||
<span>Block</span> | ||
</div> | ||
</div> | ||
|
||
<div> | ||
<button class="btn">Update</button> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.main { | ||
padding: 2rem; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 2rem; | ||
|
||
.title-section, | ||
.input-analysis { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 0.5rem; | ||
|
||
.title { | ||
font-weight: 500; | ||
} | ||
|
||
.text { | ||
font-size: 0.9rem; | ||
} | ||
} | ||
} |
5 changes: 4 additions & 1 deletion
5
libs/features/convs-mgr/fallbacks/src/lib/modals/fallback-modal/fallback-modal.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
import { Component } from '@angular/core'; | ||
import { MatDialogRef } from '@angular/material/dialog'; | ||
|
||
@Component({ | ||
selector: 'app-fallback-modal', | ||
templateUrl: './fallback-modal.component.html', | ||
styleUrls: ['./fallback-modal.component.scss'], | ||
}) | ||
export class FallbackModalComponent {} | ||
export class FallbackModalComponent { | ||
constructor(public dialogRef: MatDialogRef<FallbackModalComponent>) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,9 @@ | |
color: #101010; | ||
font-size: 2rem; | ||
font-weight: 400; | ||
} | ||
} | ||
|
||
.btn { | ||
max-width: 100px; | ||
max-height: 30px; | ||
} |
14 changes: 13 additions & 1 deletion
14
...ures/convs-mgr/fallbacks/src/lib/pages/fallback-main-page/fallback-main-page.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,20 @@ | ||
import { Component } from '@angular/core'; | ||
import { MatDialog } from '@angular/material/dialog'; | ||
|
||
import { FallbackModalComponent } from '../../modals/fallback-modal/fallback-modal.component'; | ||
|
||
@Component({ | ||
selector: 'app-fallback-main-page', | ||
templateUrl: './fallback-main-page.component.html', | ||
styleUrls: ['./fallback-main-page.component.scss'], | ||
}) | ||
export class FallbackMainPageComponent {} | ||
export class FallbackMainPageComponent { | ||
constructor(public dialog: MatDialog) {} | ||
|
||
openModal() { | ||
this.dialog.open(FallbackModalComponent, { | ||
height: '600px', | ||
width: '600px', | ||
}); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
libs/features/convs-mgr/fallbacks/src/lib/utils/fallback-forms.models.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { FormBuilder } from '@angular/forms'; | ||
|
||
export function initFallBackFormGroup(_fb: FormBuilder, fallbackForm: any) { | ||
return _fb.group({ | ||
id: ['' ?? fallbackForm.id], | ||
userSays: ['' ?? fallbackForm.userSays], | ||
actions: ['' ?? fallbackForm.actions], | ||
actionDelays: ['' ?? fallbackForm.actionDelays], | ||
}); | ||
} |