Skip to content

Commit

Permalink
feat: add modal starter designs
Browse files Browse the repository at this point in the history
  • Loading branch information
LemmyMwaura committed Apr 26, 2024
1 parent b1b7b9b commit 4cbf99a
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 4 deletions.
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>
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;
}
}
}
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>) {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
Sometimes, your users might get stuck or ask something you didn’t foresee. Through this feature you can use the
power of AI to control where to route them for optima learner satisfaction!
</div>

<button class="btn" (click)="openModal()">OpenModal</button>
</section>
</convl-page>
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,9 @@
color: #101010;
font-size: 2rem;
font-weight: 400;
}
}

.btn {
max-width: 100px;
max-height: 30px;
}
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',
});
}
}
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],
});
}

0 comments on commit 4cbf99a

Please sign in to comment.