diff --git a/src/client/components/Input.js b/src/client/components/Input.js
index 12506b0..adb52df 100644
--- a/src/client/components/Input.js
+++ b/src/client/components/Input.js
@@ -29,6 +29,11 @@ export default class Input extends React.PureComponent {
this.submit()
}
}
+ handleSmileClick = e => {
+ this.setState({
+ message: this.textArea.value + e.currentTarget.innerHTML
+ })
+ }
submit = () => {
const { videos, notify, sendMessage } = this.props
const { message } = this.state
@@ -72,11 +77,31 @@ export default class Input extends React.PureComponent {
onKeyPress={this.handleKeyPress}
placeholder="Type a message"
value={message}
+ ref={node => { this.textArea = node }}
/>
-
+
+
+
+
+
+
+
π
+
π
+
π
+
π
+
πͺ
+
+
+
+
)
diff --git a/src/client/components/__tests__/Input-test.js b/src/client/components/__tests__/Input-test.js
index 42161f1..af5ccda 100644
--- a/src/client/components/__tests__/Input-test.js
+++ b/src/client/components/__tests__/Input-test.js
@@ -63,6 +63,14 @@ describe('components/Input', () => {
})
})
+ describe('handleSmileClick', () => {
+ it('adds smile to message', () => {
+ const div = node.querySelector('.chat-controls-buttons-smile')
+ TestUtils.Simulate.click(div)
+ expect(input.value).toBe('test messageπ')
+ })
+ })
+
})
})
diff --git a/src/res/fonts/icons.eot b/src/res/fonts/icons.eot
index 5329ad7..5b83724 100755
Binary files a/src/res/fonts/icons.eot and b/src/res/fonts/icons.eot differ
diff --git a/src/res/fonts/icons.svg b/src/res/fonts/icons.svg
index d25d1c1..aa92479 100755
--- a/src/res/fonts/icons.svg
+++ b/src/res/fonts/icons.svg
@@ -16,6 +16,9 @@
+
+
+
\ No newline at end of file
diff --git a/src/res/fonts/icons.ttf b/src/res/fonts/icons.ttf
index 2091dd6..ae2d611 100755
Binary files a/src/res/fonts/icons.ttf and b/src/res/fonts/icons.ttf differ
diff --git a/src/res/fonts/icons.woff b/src/res/fonts/icons.woff
index 957f27e..e2bfc02 100755
Binary files a/src/res/fonts/icons.woff and b/src/res/fonts/icons.woff differ
diff --git a/src/scss/_chat.scss b/src/scss/_chat.scss
index d6ab437..38ac9dd 100644
--- a/src/scss/_chat.scss
+++ b/src/scss/_chat.scss
@@ -123,7 +123,7 @@
color: #000;
}
- .icon-schedule:before {
+ .icon:before {
color: #999;
font-size: 11px;
margin: 0 2px;
@@ -213,10 +213,6 @@
display: flex;
justify-content: space-between;
- .chat-controls-buttons-wrapper {
- display: flex;
- }
-
.chat-controls-buttons-send {
padding: 0 15px;
background: #407cf7;
@@ -232,5 +228,45 @@
outline: none;
}
}
+
+ .chat-controls-buttons-wrapper {
+ display: flex;
+ }
+ }
+}
+
+.emoji {
+ display: flex;
+
+ .chat-controls-buttons-smiles {
+ cursor: pointer;
+ display: flex;
+ align-items: center;
+ position: relative;
+
+ .icon {
+ color: #777;
+ z-index: 1;
+ }
+
+ .chat-controls-buttons-smiles-menu {
+ background-color: #fff;
+ display: none;
+ position: absolute;
+ width: 140px;
+ height: 50px;
+ line-height: 50px;
+
+ .chat-controls-buttons-smile {
+ margin-left: 5px;
+ }
+ }
+
+ &:hover {
+ .chat-controls-buttons-smiles-menu {
+ display: flex;
+ right: 10px;
+ }
+ }
}
}
diff --git a/src/scss/_fonts.scss b/src/scss/_fonts.scss
index e745b11..2a00340 100755
--- a/src/scss/_fonts.scss
+++ b/src/scss/_fonts.scss
@@ -1,10 +1,10 @@
@font-face {
font-family: 'icons';
- src: url('../res/fonts/icons.eot?sd4p99');
- src: url('../res/fonts/icons.eot?sd4p99#iefix') format('embedded-opentype'),
- url('../res/fonts/icons.woff?sd4p99') format('woff'),
- url('../res/fonts/icons.ttf?sd4p99') format('truetype'),
- url('../res/fonts/icons.svg?sd4p99#icons') format('svg');
+ src: url('../res/fonts/icons.eot?tcgv6b');
+ src: url('../res/fonts/icons.eot?tcgv6b#iefix') format('embedded-opentype'),
+ url('../res/fonts/icons.woff?tcgv6b') format('woff'),
+ url('../res/fonts/icons.ttf?tcgv6b') format('truetype'),
+ url('../res/fonts/icons.svg?tcgv6b#icons') format('svg');
font-weight: normal;
font-style: normal;
}
@@ -14,7 +14,7 @@
// @media screen and (-webkit-min-device-pixel-ratio:0) {
// @font-face {
// font-family: 'icons';
-// src: url('./fonts/icons.svg?sd4p99#icons') format('svg');
+// src: url('./fonts/icons.svg?tcgv6b#icons') format('svg');
// }
// }
@@ -56,6 +56,9 @@
.icon-call_end:before {
content: "\e0b1";
}
+.icon-face:before {
+ content: "\e87c";
+}
.icon-question_answer:before {
content: "\e8af";
}
@@ -65,6 +68,9 @@
.icon-fullscreen_exit:before {
content: "\e5d1";
}
+.icon-room:before {
+ content: "\e8b4";
+}
.icon-mic:before {
content: "\e029";
}
@@ -74,6 +80,9 @@
.icon-more_vert:before {
content: "\e5d4";
}
+.icon-sentiment_satisfied:before {
+ content: "\e813";
+}
.icon-videocam:before {
content: "\e04b";
}