-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#929] Implement the option to end chat #1508
Merged
ogbeche77
merged 3 commits into
develop
from
feature/929-implement-the-option-to-end-chat
Apr 12, 2021
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
75 changes: 75 additions & 0 deletions
75
frontend/chat-plugin/src/components/modal/index.module.scss
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,75 @@ | ||
@import '../../../../assets/scss/fonts'; | ||
@import '../../../../assets/scss/colors'; | ||
|
||
.background { | ||
position: absolute; | ||
height: 121%; | ||
right: 0; | ||
top: 0; | ||
padding: 0; | ||
z-index: 10; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
|
||
&:before { | ||
content: ''; | ||
width: 97%; | ||
height: 72%; | ||
position: absolute; | ||
top: 8px; | ||
left: 3px; | ||
padding-bottom: 6px; | ||
border-radius: 8px; | ||
background-color: var(--color-text-gray); | ||
opacity: 0.5; | ||
} | ||
} | ||
|
||
.closeButton { | ||
border: none; | ||
background-color: rgba(0, 0, 0, 0); | ||
cursor: pointer; | ||
outline: none; | ||
position: absolute; | ||
top: 8px; | ||
right: 10px; | ||
svg { | ||
width: 14px; | ||
height: 14px; | ||
path { | ||
fill: black; | ||
} | ||
} | ||
} | ||
|
||
.dialog { | ||
z-index: 1; | ||
display: flex; | ||
width: 375px; | ||
height: 350px; | ||
flex-direction: row; | ||
align-items: flex-start; | ||
padding: 0px 9px 0px 16px; | ||
} | ||
|
||
.dialogInner { | ||
width: 340px; | ||
height: 150px; | ||
background-color: white; | ||
border-radius: 8px; | ||
padding: 18px 14px 36px 10px; | ||
position: relative; | ||
} | ||
|
||
.inviteWrapper { | ||
width: 500px; | ||
p { | ||
display: flex; | ||
color: var(--color-text-gray); | ||
font-family: 'Lato', sans-serif; | ||
font-weight: 500; | ||
font-size: 18px; | ||
padding-left: 9px; | ||
} | ||
} |
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,26 @@ | ||
import React from 'react'; | ||
import styles from './index.module.scss'; | ||
import {ReactComponent as CloseIcon} from 'assets/images/icons/close.svg'; | ||
|
||
type ModalDialogueProps = { | ||
close: () => void; | ||
children: JSX.Element; | ||
}; | ||
|
||
export const ModalDialogue = ({close, children}: ModalDialogueProps) => { | ||
return ( | ||
<div className={styles.background}> | ||
<div className={styles.dialog}> | ||
<div className={styles.dialogInner}> | ||
<button onClick={close} className={styles.closeButton}> | ||
<CloseIcon title="Close dialog" /> | ||
</button> | ||
<div className={styles.inviteWrapper}> | ||
<p>Are you sure you want to end this chat?</p> | ||
</div> | ||
{children} | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; |
30 changes: 30 additions & 0 deletions
30
frontend/chat-plugin/src/components/newConversation/index.module.scss
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,30 @@ | ||
.paragraphWrapper { | ||
margin-bottom: 20px; | ||
} | ||
|
||
.newConversation { | ||
display: flex; | ||
justify-content: center; | ||
padding-left: 20px; | ||
margin: 0; | ||
font-family: 'Lato', sans-serif; | ||
color: var(--color-airy-blue); | ||
} | ||
|
||
.newConversationLine { | ||
display: flex; | ||
justify-content: center; | ||
font-family: 'Lato', sans-serif; | ||
color: var(--color-airy-blue); | ||
margin: 0; | ||
} | ||
|
||
.newConversationLink { | ||
display: flex; | ||
justify-content: center; | ||
margin-bottom: 20px; | ||
font-family: 'Lato', sans-serif; | ||
font-weight: 600; | ||
font-size: 20px; | ||
color: #1578d4; | ||
} |
25 changes: 25 additions & 0 deletions
25
frontend/chat-plugin/src/components/newConversation/index.tsx
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,25 @@ | ||
import React from 'react'; | ||
import style from './index.module.scss'; | ||
|
||
type newConversationProps = { | ||
reAuthenticate: () => void; | ||
}; | ||
|
||
const NewConversation = (props: newConversationProps) => { | ||
return ( | ||
<div> | ||
<div className={style.paragraphWrapper}> | ||
<p className={style.newConversation}>Your conversation has ended. Thank you for</p>{' '} | ||
<p className={style.newConversationLine}>chatting with us today.</p> | ||
</div> | ||
|
||
<div> | ||
<a href="" onClick={props.reAuthenticate} className={style.newConversationLink}> | ||
Click Here To Start a New Conversation | ||
</a> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default NewConversation; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this shrink properly?