diff --git a/src/components/views/context_menus/MessageContextMenu.js b/src/components/views/context_menus/MessageContextMenu.js index 737b7faa..ff6ace61 100644 --- a/src/components/views/context_menus/MessageContextMenu.js +++ b/src/components/views/context_menus/MessageContextMenu.js @@ -84,6 +84,14 @@ module.exports = React.createClass({ if (this.props.onFinished) this.props.onFinished(); }, + onQuoteClick: function () { + console.log(this.props.mxEvent); + dis.dispatch({ + action: 'quote', + event: this.props.mxEvent, + }); + }, + render: function() { var eventStatus = this.props.mxEvent.status; var resendButton; @@ -141,6 +149,12 @@ module.exports = React.createClass({ ); + const quoteButton = ( +
+ Quote +
+ ); + return (
{resendButton} @@ -149,6 +163,7 @@ module.exports = React.createClass({ {viewSourceButton} {unhidePreviewButton} {permalinkButton} + {quoteButton}
); } diff --git a/src/skins/vector/css/matrix-react-sdk/views/elements/RichText.css b/src/skins/vector/css/matrix-react-sdk/views/elements/RichText.css index 171482a3..f0b3c046 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/elements/RichText.css +++ b/src/skins/vector/css/matrix-react-sdk/views/elements/RichText.css @@ -20,3 +20,20 @@ .mx_Markdown_ITALIC { font-style: italic; } + +.mx_Markdown_CODE { + padding: .2em 0; + margin: 0; + font-size: 85%; + background-color: rgba(0,0,0,.04); + border-radius: 3px; +} + +.mx_Markdown_HR { + display: block; + background: #e7e7e7; +} + +.mx_Markdown_STRIKETHROUGH { + text-decoration: line-through; +} diff --git a/src/skins/vector/css/matrix-react-sdk/views/rooms/MessageComposer.css b/src/skins/vector/css/matrix-react-sdk/views/rooms/MessageComposer.css index 9dd93b80..45bc39cf 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/rooms/MessageComposer.css +++ b/src/skins/vector/css/matrix-react-sdk/views/rooms/MessageComposer.css @@ -57,20 +57,31 @@ limitations under the License. .mx_MessageComposer_input { flex: 1; vertical-align: middle; - min-height: 60px; - max-height: 120px; display: flex; - align-items: center; - overflow: auto; + flex-direction: column; + min-height: 60px; + justify-content: center; + align-items: flex-start; font-size: 14px; margin-right: 6px; } -.mx_MessageComposer_input_rte { - border-top: 2px solid #76cfa6; /* placeholder RTE indicator */ + +.mx_MessageComposer_input_empty .public-DraftEditorPlaceholder-root { + display: none; } .mx_MessageComposer_input .DraftEditor-root { + width: 100%; flex: 1; + max-height: 120px; + overflow: auto; +} + +.mx_MessageComposer_input blockquote { + color: rgb(119, 119, 119); + margin: 0 0 16px; + padding: 0 15px; + border-left: 4px solid rgb(221, 221, 221); } .mx_MessageComposer_input textarea { @@ -88,7 +99,8 @@ limitations under the License. color: #454545; background-color: #fff; font-size: 14px; - + max-height: 120px; + overflow: auto; /* needed for FF */ font-family: 'Open Sans', Arial, Helvetica, Sans-Serif; } @@ -122,3 +134,59 @@ limitations under the License. pointer-events: none; } +.mx_MessageComposer_formatting { + cursor: pointer; + margin: 0 11px; +} + +.mx_MessageComposer_formatbar_wrapper { + width: 100%; + background-color: #f7f7f7; + box-shadow: inset 0 1px 0 0 rgba(0, 0, 0, 0.08); +} + +.mx_MessageComposer_formatbar { + margin: auto; + max-width: 960px; + display: flex; + + height: 30px; + + box-sizing: border-box; + padding-left: 62px; + + flex-direction: row; + align-items: center; + font-size: 10px; + color: #888; +} + +.mx_MessageComposer_formatbar * { + margin-right: 4px; +} + +.mx_MessageComposer_format_button, +.mx_MessageComposer_formatbar_cancel, +.mx_MessageComposer_formatbar_markdown { + cursor: pointer; +} + +.mx_MessageComposer_format_button_disabled { + cursor: not-allowed; + opacity: 0.5; +} + +.mx_MessageComposer_formatbar_cancel { + margin-right: 22px; +} + +.mx_MessageComposer_formatbar_markdown { + margin-right: 64px; +} + +.mx_MessageComposer_input_markdownIndicator { + cursor: pointer; + height: 10px; + padding: 4px 4px 4px 0; + opacity: 0.8; +} diff --git a/src/skins/vector/img/button-md-false.png b/src/skins/vector/img/button-md-false.png new file mode 100644 index 00000000..6debbccc Binary files /dev/null and b/src/skins/vector/img/button-md-false.png differ diff --git a/src/skins/vector/img/button-md-false.svg b/src/skins/vector/img/button-md-false.svg new file mode 100644 index 00000000..6414933d --- /dev/null +++ b/src/skins/vector/img/button-md-false.svg @@ -0,0 +1,29 @@ + + + + D335F9E8-C813-47D7-B1BE-C8DEF2C8214F + Created with sketchtool. + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/skins/vector/img/button-md-false@2x.png b/src/skins/vector/img/button-md-false@2x.png new file mode 100644 index 00000000..497f5385 Binary files /dev/null and b/src/skins/vector/img/button-md-false@2x.png differ diff --git a/src/skins/vector/img/button-md-false@3x.png b/src/skins/vector/img/button-md-false@3x.png new file mode 100644 index 00000000..1184e6b3 Binary files /dev/null and b/src/skins/vector/img/button-md-false@3x.png differ diff --git a/src/skins/vector/img/button-md-true.png b/src/skins/vector/img/button-md-true.png new file mode 100644 index 00000000..2e39c55e Binary files /dev/null and b/src/skins/vector/img/button-md-true.png differ diff --git a/src/skins/vector/img/button-md-true.svg b/src/skins/vector/img/button-md-true.svg new file mode 100644 index 00000000..2acc4f67 --- /dev/null +++ b/src/skins/vector/img/button-md-true.svg @@ -0,0 +1,14 @@ + + + + 2A63B135-4281-4FBB-A88C-012AE22E9594 + Created with sketchtool. + + + + + + + + + \ No newline at end of file diff --git a/src/skins/vector/img/button-md-true@2x.png b/src/skins/vector/img/button-md-true@2x.png new file mode 100644 index 00000000..ad9067f3 Binary files /dev/null and b/src/skins/vector/img/button-md-true@2x.png differ diff --git a/src/skins/vector/img/button-md-true@3x.png b/src/skins/vector/img/button-md-true@3x.png new file mode 100644 index 00000000..d615867d Binary files /dev/null and b/src/skins/vector/img/button-md-true@3x.png differ diff --git a/src/skins/vector/img/button-text-bold-o-n.svg b/src/skins/vector/img/button-text-bold-o-n.svg new file mode 100644 index 00000000..161e740e --- /dev/null +++ b/src/skins/vector/img/button-text-bold-o-n.svg @@ -0,0 +1,17 @@ + + + + 01F3F9B2-8F38-4BAF-A345-AECAC3D88E79 + Created with sketchtool. + + + + + + + + + + + + \ No newline at end of file diff --git a/src/skins/vector/img/button-text-bold.svg b/src/skins/vector/img/button-text-bold.svg new file mode 100644 index 00000000..0fd0baa0 --- /dev/null +++ b/src/skins/vector/img/button-text-bold.svg @@ -0,0 +1,17 @@ + + + + 9BC64A5B-F157-43FF-BCC4-02D30CDF520B + Created with sketchtool. + + + + + + + + + + + + \ No newline at end of file diff --git a/src/skins/vector/img/button-text-bullet-o-n.svg b/src/skins/vector/img/button-text-bullet-o-n.svg new file mode 100644 index 00000000..d4a40e88 --- /dev/null +++ b/src/skins/vector/img/button-text-bullet-o-n.svg @@ -0,0 +1,20 @@ + + + + 654917CF-20A4-49B6-B0A1-9875D7B733C8 + Created with sketchtool. + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/skins/vector/img/button-text-bullet.svg b/src/skins/vector/img/button-text-bullet.svg new file mode 100644 index 00000000..ae3e640d --- /dev/null +++ b/src/skins/vector/img/button-text-bullet.svg @@ -0,0 +1,20 @@ + + + + B7D94619-44BC-4184-A60A-DBC5BB54E5F9 + Created with sketchtool. + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/skins/vector/img/button-text-code-o-n.svg b/src/skins/vector/img/button-text-code-o-n.svg new file mode 100644 index 00000000..8d1439c9 --- /dev/null +++ b/src/skins/vector/img/button-text-code-o-n.svg @@ -0,0 +1,25 @@ + + + + B76754AB-42E6-48D2-9443-80CBC0DE02ED + Created with sketchtool. + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/skins/vector/img/button-text-code.svg b/src/skins/vector/img/button-text-code.svg new file mode 100644 index 00000000..24026cb7 --- /dev/null +++ b/src/skins/vector/img/button-text-code.svg @@ -0,0 +1,25 @@ + + + + 4CAFF494-61AE-4916-AFE8-D1E62F7CF0DE + Created with sketchtool. + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/skins/vector/img/button-text-formatting.svg b/src/skins/vector/img/button-text-formatting.svg new file mode 100644 index 00000000..d3fc3f5f --- /dev/null +++ b/src/skins/vector/img/button-text-formatting.svg @@ -0,0 +1,18 @@ + + + + F69CBF5F-0BEC-47E8-B1DF-125D6376C0C9 + Created with sketchtool. + + + + + + + A + a + + + + + \ No newline at end of file diff --git a/src/skins/vector/img/button-text-italic-o-n.svg b/src/skins/vector/img/button-text-italic-o-n.svg new file mode 100644 index 00000000..15fe5885 --- /dev/null +++ b/src/skins/vector/img/button-text-italic-o-n.svg @@ -0,0 +1,17 @@ + + + + 116426C2-0B55-480E-92B3-57D4B3ABAB90 + Created with sketchtool. + + + + + + + + + + + + \ No newline at end of file diff --git a/src/skins/vector/img/button-text-italic.svg b/src/skins/vector/img/button-text-italic.svg new file mode 100644 index 00000000..b5722e82 --- /dev/null +++ b/src/skins/vector/img/button-text-italic.svg @@ -0,0 +1,17 @@ + + + + 9FBC844D-96CF-4DCB-B545-FCD23727218B + Created with sketchtool. + + + + + + + + + + + + \ No newline at end of file diff --git a/src/skins/vector/img/button-text-numbullet-o-n.svg b/src/skins/vector/img/button-text-numbullet-o-n.svg new file mode 100644 index 00000000..869a2c2c --- /dev/null +++ b/src/skins/vector/img/button-text-numbullet-o-n.svg @@ -0,0 +1,20 @@ + + + + 294F929B-31AA-4D0C-98B3-9CA96764060D + Created with sketchtool. + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/skins/vector/img/button-text-numbullet.svg b/src/skins/vector/img/button-text-numbullet.svg new file mode 100644 index 00000000..8e5b8b87 --- /dev/null +++ b/src/skins/vector/img/button-text-numbullet.svg @@ -0,0 +1,20 @@ + + + + F0F58459-A13A-48C5-9332-ABFB96726F05 + Created with sketchtool. + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/skins/vector/img/button-text-quote-o-n.svg b/src/skins/vector/img/button-text-quote-o-n.svg new file mode 100644 index 00000000..f8a86125 --- /dev/null +++ b/src/skins/vector/img/button-text-quote-o-n.svg @@ -0,0 +1,17 @@ + + + + 3B24B8C7-64BE-4B3E-A748-94DB72E1210F + Created with sketchtool. + + + + + + + + + + + + \ No newline at end of file diff --git a/src/skins/vector/img/button-text-quote.svg b/src/skins/vector/img/button-text-quote.svg new file mode 100644 index 00000000..d70c261f --- /dev/null +++ b/src/skins/vector/img/button-text-quote.svg @@ -0,0 +1,17 @@ + + + + BFC0418B-9081-4789-A231-B75953157748 + Created with sketchtool. + + + + + + + + + + + + \ No newline at end of file diff --git a/src/skins/vector/img/button-text-strike-o-n.svg b/src/skins/vector/img/button-text-strike-o-n.svg new file mode 100644 index 00000000..2914fcab --- /dev/null +++ b/src/skins/vector/img/button-text-strike-o-n.svg @@ -0,0 +1,18 @@ + + + + 69B11088-0F3A-4E14-BD9F-4FEF4115E99B + Created with sketchtool. + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/skins/vector/img/button-text-strike.svg b/src/skins/vector/img/button-text-strike.svg new file mode 100644 index 00000000..5f262dc3 --- /dev/null +++ b/src/skins/vector/img/button-text-strike.svg @@ -0,0 +1,18 @@ + + + + A34F2223-34C6-46AE-AA47-38EC8984E9B3 + Created with sketchtool. + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/skins/vector/img/button-text-underline-o-n.svg b/src/skins/vector/img/button-text-underline-o-n.svg new file mode 100644 index 00000000..870be3ce --- /dev/null +++ b/src/skins/vector/img/button-text-underline-o-n.svg @@ -0,0 +1,18 @@ + + + + FD84FF7C-43E4-4312-90AB-5A59AD018377 + Created with sketchtool. + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/skins/vector/img/button-text-underline.svg b/src/skins/vector/img/button-text-underline.svg new file mode 100644 index 00000000..26f44853 --- /dev/null +++ b/src/skins/vector/img/button-text-underline.svg @@ -0,0 +1,18 @@ + + + + 13E7EE68-9B16-4A3D-8F9F-31E4BAB7E438 + Created with sketchtool. + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/skins/vector/img/icon-text-cancel.svg b/src/skins/vector/img/icon-text-cancel.svg new file mode 100644 index 00000000..ce28d128 --- /dev/null +++ b/src/skins/vector/img/icon-text-cancel.svg @@ -0,0 +1,15 @@ + + + + 28D80248-63BA-4A5F-9216-4CFE72784BAC + Created with sketchtool. + + + + + + + + + + \ No newline at end of file