Merge branch 'develop' into travis/presence

This commit is contained in:
Travis Ralston 2017-10-14 17:27:18 -06:00
commit 6f968522f5
8 changed files with 76 additions and 3 deletions

View File

@ -150,7 +150,21 @@ export default class NetworkDropdown extends React.Component {
if (this.props.protocols) { if (this.props.protocols) {
for (const proto of Object.keys(this.props.protocols)) { for (const proto of Object.keys(this.props.protocols)) {
if (!this.props.protocols[proto].instances) continue; if (!this.props.protocols[proto].instances) continue;
for (const instance of this.props.protocols[proto].instances) {
const sortedInstances = this.props.protocols[proto].instances;
sortedInstances.sort(function(x, y) {
const a = x.desc
const b = y.desc
if (a < b) {
return -1;
} else if (a > b) {
return 1;
} else {
return 0;
}
});
for (const instance of sortedInstances) {
if (!instance.instance_id) continue; if (!instance.instance_id) continue;
options.push(this._makeMenuOption(server, instance, false)); options.push(this._makeMenuOption(server, instance, false));
} }

View File

@ -150,8 +150,16 @@ module.exports = React.createClass({
var eventMeta; var eventMeta;
if(showEventMeta) { if(showEventMeta) {
// Figure out the sender, defaulting to mxid
let sender = this.props.mxEvent.getSender();
const room = MatrixClientPeg.get().getRoom(this.props.mxEvent.getRoomId());
if (room) {
const member = room.getMember(sender);
if (member) sender = member.name;
}
eventMeta = (<div className="mx_ImageView_metadata"> eventMeta = (<div className="mx_ImageView_metadata">
{ _t('Uploaded on %(date)s by %(user)s', {date: DateUtils.formatDate(new Date(this.props.mxEvent.getTs())), user: this.props.mxEvent.getSender()}) } { _t('Uploaded on %(date)s by %(user)s', {date: DateUtils.formatDate(new Date(this.props.mxEvent.getTs())), user: sender}) }
</div>); </div>);
} }

View File

@ -116,6 +116,11 @@ module.exports = React.createClass({
UserSettingsStore.setEnableNotifications(event.target.checked); UserSettingsStore.setEnableNotifications(event.target.checked);
}, },
onEnableDesktopNotificationBodyChange: function(event) {
UserSettingsStore.setEnableNotificationBody(event.target.checked);
this.forceUpdate();
},
onEnableEmailNotificationsChange: function(address, event) { onEnableEmailNotificationsChange: function(address, event) {
var emailPusherPromise; var emailPusherPromise;
if (event.target.checked) { if (event.target.checked) {
@ -831,6 +836,21 @@ module.exports = React.createClass({
</div> </div>
</div> </div>
<div className="mx_UserNotifSettings_tableRow">
<div className="mx_UserNotifSettings_inputCell">
<input id="enableDesktopNotificationBody"
ref="enableDesktopNotificationBody"
type="checkbox"
checked={ UserSettingsStore.getEnableNotificationBody() }
onChange={ this.onEnableDesktopNotificationBodyChange } />
</div>
<div className="mx_UserNotifSettings_labelCell">
<label htmlFor="enableDesktopNotificationBody">
{ _t('Show message in desktop notification') }
</label>
</div>
</div>
<div className="mx_UserNotifSettings_tableRow"> <div className="mx_UserNotifSettings_tableRow">
<div className="mx_UserNotifSettings_inputCell"> <div className="mx_UserNotifSettings_inputCell">
<input id="enableDesktopAudioNotifications" <input id="enableDesktopAudioNotifications"

View File

@ -33,6 +33,7 @@
"Download this file": "Download this file", "Download this file": "Download this file",
"Enable audible notifications in web client": "Enable audible notifications in web client", "Enable audible notifications in web client": "Enable audible notifications in web client",
"Enable desktop notifications": "Enable desktop notifications", "Enable desktop notifications": "Enable desktop notifications",
"Show message in desktop notification": "Show message in desktop notification",
"Enable email notifications": "Enable email notifications", "Enable email notifications": "Enable email notifications",
"Enable notifications for this account": "Enable notifications for this account", "Enable notifications for this account": "Enable notifications for this account",
"Enable them now": "Enable them now", "Enable them now": "Enable them now",

View File

@ -150,6 +150,16 @@ limitations under the License.
display: block; display: block;
} }
.mx_RoomStatusBar_isAlone {
height: 50px;
line-height: 50px;
color: $primary-fg-color;
opacity: 0.5;
overflow-y: hidden;
display: block;
}
.mx_MatrixChat_useCompactLayout { .mx_MatrixChat_useCompactLayout {
.mx_RoomStatusBar { .mx_RoomStatusBar {
min-height: 40px; min-height: 40px;

View File

@ -252,6 +252,16 @@ input.mx_UserSettings_phoneNumberField {
display: none; display: none;
} }
.mx_UserSettings_avatarPicker_imgContainer {
display: inline-block;
}
.mx_UserSettings_avatarPicker_remove {
display: inline-block;
float: right;
margin-right: -15px;
}
.mx_UserSettings_advanced_spoiler, .mx_UserSettings_advanced_spoiler,
.mx_UserSettings_link { .mx_UserSettings_link {
cursor: pointer; cursor: pointer;

View File

@ -138,10 +138,17 @@ limitations under the License.
.mx_RoomHeader_name, .mx_RoomHeader_name,
.mx_RoomHeader_avatar, .mx_RoomHeader_avatar,
.mx_RoomHeader_avatarPicker, .mx_RoomHeader_avatarPicker,
.mx_RoomHeader_avatarPicker_edit { .mx_RoomHeader_avatarPicker_edit,
.mx_RoomHeader_avatarPicker_remove {
cursor: pointer; cursor: pointer;
} }
.mx_RoomHeader_avatarPicker_remove {
position: absolute;
top: 10px;
left: 45px;
}
.mx_RoomHeader_name:hover div:not(.mx_RoomHeader_editable) { .mx_RoomHeader_name:hover div:not(.mx_RoomHeader_editable) {
color: $accent-color; color: $accent-color;
} }

View File

@ -131,6 +131,9 @@ $progressbar-color: #000;
} }
// markdown overrides: // markdown overrides:
.mx_EventTile_content .markdown-body pre:hover {
border-color: #808080 !important; // inverted due to rules below
}
.mx_EventTile_content .markdown-body { .mx_EventTile_content .markdown-body {
pre, code { pre, code {
filter: invert(1); filter: invert(1);