Skip to content

Commit d6a324e

Browse files
committed
Formatting toggle, markdown indicator, quoting
1 parent b8610ab commit d6a324e

File tree

12 files changed

+127
-6
lines changed

12 files changed

+127
-6
lines changed

src/components/views/context_menus/MessageContextMenu.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,14 @@ module.exports = React.createClass({
8484
if (this.props.onFinished) this.props.onFinished();
8585
},
8686

87+
onQuoteClick: function () {
88+
console.log(this.props.mxEvent);
89+
dis.dispatch({
90+
action: 'quote',
91+
event: this.props.mxEvent,
92+
});
93+
},
94+
8795
render: function() {
8896
var eventStatus = this.props.mxEvent.status;
8997
var resendButton;
@@ -141,6 +149,12 @@ module.exports = React.createClass({
141149
</div>
142150
);
143151

152+
const quoteButton = (
153+
<div className="mx_MessageContextMenu_field" onClick={this.onQuoteClick}>
154+
Quote
155+
</div>
156+
);
157+
144158
return (
145159
<div>
146160
{resendButton}
@@ -149,6 +163,7 @@ module.exports = React.createClass({
149163
{viewSourceButton}
150164
{unhidePreviewButton}
151165
{permalinkButton}
166+
{quoteButton}
152167
</div>
153168
);
154169
}

src/skins/vector/css/matrix-react-sdk/views/rooms/MessageComposer.css

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,10 @@ limitations under the License.
5757
.mx_MessageComposer_input {
5858
flex: 1;
5959
vertical-align: middle;
60-
min-height: 60px;
61-
max-height: 120px;
6260
display: flex;
63-
align-items: center;
64-
overflow: auto;
61+
flex-direction: column;
62+
min-height: 60px;
63+
align-items: flex-start;
6564
font-size: 14px;
6665
margin-right: 6px;
6766
}
@@ -71,7 +70,17 @@ limitations under the License.
7170
}
7271

7372
.mx_MessageComposer_input .DraftEditor-root {
73+
width: 100%;
7474
flex: 1;
75+
max-height: 120px;
76+
overflow: auto;
77+
}
78+
79+
.mx_MessageComposer_input blockquote {
80+
color: rgb(119, 119, 119);
81+
margin: 0 0 16px;
82+
padding: 0 15px;
83+
border-left: 4px solid rgb(221, 221, 221);
7584
}
7685

7786
.mx_MessageComposer_input textarea {
@@ -89,7 +98,8 @@ limitations under the License.
8998
color: #454545;
9099
background-color: #fff;
91100
font-size: 14px;
92-
101+
max-height: 120px;
102+
overflow: auto;
93103
/* needed for FF */
94104
font-family: 'Open Sans', Arial, Helvetica, Sans-Serif;
95105
}
@@ -123,6 +133,11 @@ limitations under the License.
123133
pointer-events: none;
124134
}
125135

136+
.mx_MessageComposer_formatting {
137+
cursor: pointer;
138+
margin: 0 11px;
139+
}
140+
126141
.mx_MessageComposer_formatbar {
127142
display: flex;
128143

@@ -142,6 +157,21 @@ limitations under the License.
142157
margin-right: 4px;
143158
}
144159

145-
.mx_MessageComposer_format_button {
160+
.mx_MessageComposer_format_button,
161+
.mx_MessageComposer_formatbar_cancel,
162+
.mx_MessageComposer_formatbar_markdown {
146163
cursor: pointer;
147164
}
165+
166+
.mx_MessageComposer_formatbar_cancel {
167+
margin-right: 22px;
168+
}
169+
170+
.mx_MessageComposer_formatbar_markdown {
171+
margin-right: 64px;
172+
}
173+
174+
.mx_MessageComposer_input_markdownIndicator {
175+
padding: 4px 4px 4px 0;
176+
opacity: 0.8;
177+
}
569 Bytes
Loading
Lines changed: 29 additions & 0 deletions
Loading
1.06 KB
Loading
1.51 KB
Loading
483 Bytes
Loading
Lines changed: 14 additions & 0 deletions
Loading
906 Bytes
Loading
1.17 KB
Loading
Lines changed: 18 additions & 0 deletions
Loading
Lines changed: 15 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)