Merge branch 'develop' into forward_message
This commit is contained in:
commit
7676fd960e
|
@ -13,4 +13,4 @@ npm-debug.log
|
||||||
electron/dist
|
electron/dist
|
||||||
electron/pub
|
electron/pub
|
||||||
/.idea
|
/.idea
|
||||||
config.json
|
/config.json
|
||||||
|
|
|
@ -171,6 +171,7 @@ const shouldQuit = electron.app.makeSingleInstance((commandLine, workingDirector
|
||||||
});
|
});
|
||||||
|
|
||||||
if (shouldQuit) {
|
if (shouldQuit) {
|
||||||
|
console.log("Other instance detected: exiting");
|
||||||
electron.app.quit()
|
electron.app.quit()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -548,7 +548,7 @@ module.exports = React.createClass({
|
||||||
const DirectorySearchBox = sdk.getComponent('elements.DirectorySearchBox');
|
const DirectorySearchBox = sdk.getComponent('elements.DirectorySearchBox');
|
||||||
return (
|
return (
|
||||||
<div className="mx_RoomDirectory">
|
<div className="mx_RoomDirectory">
|
||||||
<SimpleRoomHeader title="Directory" />
|
<SimpleRoomHeader title="Directory" icon="img/icons-directory.svg"/>
|
||||||
<div className="mx_RoomDirectory_list">
|
<div className="mx_RoomDirectory_list">
|
||||||
<div className="mx_RoomDirectory_listheader">
|
<div className="mx_RoomDirectory_listheader">
|
||||||
<DirectorySearchBox
|
<DirectorySearchBox
|
||||||
|
|
|
@ -25,7 +25,7 @@ module.exports = React.createClass({
|
||||||
render: function() {
|
render: function() {
|
||||||
var date = new Date(this.props.ts);
|
var date = new Date(this.props.ts);
|
||||||
return (
|
return (
|
||||||
<span className="mx_MessageTimestamp">
|
<span className="mx_MessageTimestamp" title={ DateUtils.formatDate(date) }>
|
||||||
{ DateUtils.formatTime(date) }
|
{ DateUtils.formatTime(date) }
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
|
|
@ -22,13 +22,6 @@ module.exports = React.createClass({
|
||||||
displayName: 'RoomDropTarget',
|
displayName: 'RoomDropTarget',
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
if (this.props.placeholder) {
|
|
||||||
return (
|
|
||||||
<div className="mx_RoomDropTarget mx_RoomDropTarget_placeholder">
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return (
|
return (
|
||||||
<div className="mx_RoomDropTarget">
|
<div className="mx_RoomDropTarget">
|
||||||
<div className="mx_RoomDropTarget_label">
|
<div className="mx_RoomDropTarget_label">
|
||||||
|
@ -37,5 +30,4 @@ module.exports = React.createClass({
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -176,6 +176,15 @@ limitations under the License.
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mx_UserSettings_phoneSection {
|
||||||
|
display:table;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mx_UserSettings_phoneCountry {
|
||||||
|
width: 70px;
|
||||||
|
display: table-cell;
|
||||||
|
}
|
||||||
|
|
||||||
input.mx_UserSettings_phoneNumberField {
|
input.mx_UserSettings_phoneNumberField {
|
||||||
margin-left: 3px;
|
margin-left: 3px;
|
||||||
width: 172px;
|
width: 172px;
|
||||||
|
|
|
@ -179,11 +179,11 @@ limitations under the License.
|
||||||
align-self: flex-end;
|
align-self: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_Login_username_group {
|
.mx_Login_field_group {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_Login_username_prefix {
|
.mx_Login_field_prefix {
|
||||||
height: 33px;
|
height: 33px;
|
||||||
padding: 0px 5px;
|
padding: 0px 5px;
|
||||||
line-height: 33px;
|
line-height: 33px;
|
||||||
|
@ -196,7 +196,7 @@ limitations under the License.
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_Login_username_suffix {
|
.mx_Login_field_suffix {
|
||||||
height: 33px;
|
height: 33px;
|
||||||
padding: 0px 5px;
|
padding: 0px 5px;
|
||||||
line-height: 33px;
|
line-height: 33px;
|
||||||
|
@ -214,7 +214,9 @@ limitations under the License.
|
||||||
flex-shrink: 1;
|
flex-shrink: 1;
|
||||||
min-width: 0px;
|
min-width: 0px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
/* The "@" is always prefixed, so no rounded corners */
|
}
|
||||||
|
|
||||||
|
.mx_Login_field_has_prefix {
|
||||||
border-top-left-radius: 0px;
|
border-top-left-radius: 0px;
|
||||||
border-bottom-left-radius: 0px;
|
border-bottom-left-radius: 0px;
|
||||||
}
|
}
|
||||||
|
@ -224,13 +226,8 @@ limitations under the License.
|
||||||
border-bottom-right-radius: 0px;
|
border-bottom-right-radius: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_Login_phoneSection {
|
|
||||||
display: table;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_Login_phoneCountry {
|
.mx_Login_phoneCountry {
|
||||||
display: table-cell;
|
margin-bottom: 14px;
|
||||||
width: 70px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_Login_phoneCountry .mx_Dropdown_option {
|
.mx_Login_phoneCountry .mx_Dropdown_option {
|
||||||
|
@ -246,8 +243,3 @@ limitations under the License.
|
||||||
margin: 4px;
|
margin: 4px;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_Login_phoneNumberField {
|
|
||||||
width: 210px;
|
|
||||||
margin-left: 3px;
|
|
||||||
}
|
|
||||||
|
|
|
@ -31,6 +31,11 @@ limitations under the License.
|
||||||
border-color: $accent-color;
|
border-color: $accent-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Disable dropdown highlight on focus */
|
||||||
|
.mx_Dropdown_input.mx_AccessibleButton:focus {
|
||||||
|
filter: none;
|
||||||
|
}
|
||||||
|
|
||||||
.mx_Dropdown_arrow {
|
.mx_Dropdown_arrow {
|
||||||
border-color: $primary-fg-color transparent transparent;
|
border-color: $primary-fg-color transparent transparent;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
|
|
|
@ -218,8 +218,8 @@ limitations under the License.
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_EventTile_continuation .mx_EventTile_readAvatars,
|
.mx_EventTile_continuation .mx_EventTile_readAvatars,
|
||||||
.mx_EventTile_info .mx_EventTile_readAvatars
|
.mx_EventTile_info .mx_EventTile_readAvatars,
|
||||||
{
|
.mx_EventTile_emote .mx_EventTile_readAvatars {
|
||||||
top: 7px;
|
top: 7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -331,6 +331,14 @@ limitations under the License.
|
||||||
font-family: inherit ! important;
|
font-family: inherit ! important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Make h1 and h2 the same size as h3. */
|
||||||
|
.mx_EventTile_content .markdown-body h1,
|
||||||
|
.mx_EventTile_content .markdown-body h2
|
||||||
|
{
|
||||||
|
font-size: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
.mx_EventTile_content .markdown-body a {
|
.mx_EventTile_content .markdown-body a {
|
||||||
color: $accent-color;
|
color: $accent-color;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@ limitations under the License.
|
||||||
margin-left: -2px;
|
margin-left: -2px;
|
||||||
order: 1;
|
order: 1;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_RoomHeader_spinner {
|
.mx_RoomHeader_spinner {
|
||||||
|
@ -95,6 +96,12 @@ limitations under the License.
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mx_RoomHeader_simpleHeader .mx_RoomHeader_icon {
|
||||||
|
margin-left: 14px;
|
||||||
|
margin-right: 24px;
|
||||||
|
vertical-align: -4px;
|
||||||
|
}
|
||||||
|
|
||||||
.mx_RoomHeader_name {
|
.mx_RoomHeader_name {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
@ -21,12 +21,17 @@ limitations under the License.
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
color: $primary-fg-color;
|
color: $primary-fg-color;
|
||||||
|
word-break: break-word;
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mx_RoomDirectory .mx_RoomHeader_simpleHeader {
|
||||||
|
margin-left: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
.mx_RoomDirectory_list {
|
.mx_RoomDirectory_list {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
||||||
|
|
|
@ -33,11 +33,6 @@ limitations under the License.
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_RoomDropTarget_placeholder {
|
|
||||||
padding-top: 1px;
|
|
||||||
padding-bottom: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_RoomDropTarget_label {
|
.mx_RoomDropTarget_label {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: 3px;
|
margin-top: 3px;
|
||||||
|
|
|
@ -24,12 +24,12 @@ import q from 'q';
|
||||||
const electron = require('electron');
|
const electron = require('electron');
|
||||||
const remote = electron.remote;
|
const remote = electron.remote;
|
||||||
|
|
||||||
electron.remote.autoUpdater.on('update-downloaded', onUpdateDownloaded);
|
remote.autoUpdater.on('update-downloaded', onUpdateDownloaded);
|
||||||
|
|
||||||
function onUpdateDownloaded(ev, releaseNotes, ver, date, updateURL) {
|
function onUpdateDownloaded(ev, releaseNotes, ver, date, updateURL) {
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
action: 'new_version',
|
action: 'new_version',
|
||||||
currentVersion: electron.remote.app.getVersion(),
|
currentVersion: remote.app.getVersion(),
|
||||||
newVersion: ver,
|
newVersion: ver,
|
||||||
releaseNotes: releaseNotes,
|
releaseNotes: releaseNotes,
|
||||||
});
|
});
|
||||||
|
@ -68,7 +68,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||||
try {
|
try {
|
||||||
remote.app.setBadgeCount(count);
|
remote.app.setBadgeCount(count);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("Failed to set notification count", e);
|
console.error('Failed to set notification count', e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||||
// we only have to strip out < and > as the spec doesn't include anything about things like &
|
// we only have to strip out < and > as the spec doesn't include anything about things like &
|
||||||
// so we shouldn't assume that all implementations will treat those properly. Very basic tag parsing is done.
|
// so we shouldn't assume that all implementations will treat those properly. Very basic tag parsing is done.
|
||||||
if (window.process.platform === 'linux') {
|
if (window.process.platform === 'linux') {
|
||||||
msg = msg.replace(/</g, "<").replace(/>/g, ">");
|
msg = msg.replace(/</g, '<').replace(/>/g, '>');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notifications in Electron use the HTML5 notification API
|
// Notifications in Electron use the HTML5 notification API
|
||||||
|
@ -98,7 +98,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||||
{
|
{
|
||||||
body: msg,
|
body: msg,
|
||||||
icon: avatarUrl,
|
icon: avatarUrl,
|
||||||
tag: "vector",
|
tag: 'vector',
|
||||||
silent: true, // we play our own sounds
|
silent: true, // we play our own sounds
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -106,13 +106,14 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||||
notification.onclick = function() {
|
notification.onclick = function() {
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
action: 'view_room',
|
action: 'view_room',
|
||||||
room_id: room.roomId
|
room_id: room.roomId,
|
||||||
});
|
});
|
||||||
global.focus();
|
global.focus();
|
||||||
const currentWin = electron.remote.getCurrentWindow();
|
const win = remote.getCurrentWindow();
|
||||||
currentWin.show();
|
|
||||||
currentWin.restore();
|
if (win.isMinimized()) win.restore();
|
||||||
currentWin.focus();
|
else if (!win.isVisible()) win.show();
|
||||||
|
else win.focus();
|
||||||
};
|
};
|
||||||
|
|
||||||
return notification;
|
return notification;
|
||||||
|
@ -123,7 +124,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||||
}
|
}
|
||||||
|
|
||||||
getAppVersion() {
|
getAppVersion() {
|
||||||
return q(electron.remote.app.getVersion());
|
return q(remote.app.getVersion());
|
||||||
}
|
}
|
||||||
|
|
||||||
pollForUpdate() {
|
pollForUpdate() {
|
||||||
|
@ -140,7 +141,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||||
}
|
}
|
||||||
|
|
||||||
getDefaultDeviceDisplayName() {
|
getDefaultDeviceDisplayName() {
|
||||||
return "Riot Desktop on " + platformFriendlyName();
|
return 'Riot Desktop on ' + platformFriendlyName();
|
||||||
}
|
}
|
||||||
|
|
||||||
screenCaptureErrorString() {
|
screenCaptureErrorString() {
|
||||||
|
@ -152,6 +153,6 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||||
}
|
}
|
||||||
|
|
||||||
reload() {
|
reload() {
|
||||||
electron.remote.getCurrentWebContents().reload();
|
remote.getCurrentWebContents().reload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue