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