-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from first87/feature/message-input-stage1
Implement message-input feature [STAGE1]
- Loading branch information
Showing
8 changed files
with
83 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
.message-input-container { | ||
position: fixed; | ||
bottom: 0; | ||
margin: 0; | ||
padding: 0; | ||
width: calc(100% - 320px); | ||
border: none; | ||
background: var(--app-color-body); | ||
} | ||
|
||
.message-input-card { | ||
width: 95%; | ||
margin: 1% 2%; | ||
padding: 0.5em 1em; | ||
box-shadow: 0px 0px 12px 0px var(--primary-color); | ||
} | ||
|
||
.message-input-field { | ||
--paper-input-container-input-color: var(--app-color-green); | ||
--paper-input-container-underline: { | ||
display: none; | ||
} | ||
--paper-input-container-underline-focus: { | ||
display: none; | ||
} | ||
@apply --app-word-wrapping; | ||
} |
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,12 @@ | ||
<div class="message-input-container"> | ||
<paper-card class="message-input-card"> | ||
<paper-textarea class="form-control message-input-field" | ||
id="newMessage" | ||
label="Input a message to send" | ||
no-label-float | ||
max-rows="3" | ||
auto-validate="false" | ||
(keypress)="messageInputKeyPressed($event)"> | ||
</paper-textarea> | ||
</paper-card> | ||
</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,18 @@ | ||
import {Component, Input} from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'message-input', | ||
templateUrl: 'message-input.component.html', | ||
styleUrls: ['message-input.component.css'] | ||
}) | ||
export class MessageInputComponent { | ||
public sendMessage() { | ||
} | ||
|
||
public messageInputKeyPressed(e: any): void { | ||
if (e.keyCode === 13 && e.code === 'Enter' || e.code === 'NumpadEnter') { | ||
this.sendMessage(); | ||
e.preventDefault(); | ||
} | ||
} | ||
} |
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