mirror of https://github.com/vector-im/riot-web
[WEBLATE] fix merge issue
commit
fb523fd613
|
@ -12,5 +12,8 @@
|
||||||
/.npmrc
|
/.npmrc
|
||||||
.DS_Store
|
.DS_Store
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
|
electron/dist
|
||||||
|
electron/pub
|
||||||
|
/.idea
|
||||||
/config.json
|
/config.json
|
||||||
/src/component-index.js
|
/src/component-index.js
|
||||||
|
|
|
@ -16,14 +16,14 @@ limitations under the License.
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var React = require('react');
|
const React = require('react');
|
||||||
|
|
||||||
var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg');
|
const MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg');
|
||||||
var dis = require('matrix-react-sdk/lib/dispatcher');
|
const dis = require('matrix-react-sdk/lib/dispatcher');
|
||||||
var sdk = require('matrix-react-sdk');
|
const sdk = require('matrix-react-sdk');
|
||||||
import { _t } from 'matrix-react-sdk/lib/languageHandler';
|
import { _t } from 'matrix-react-sdk/lib/languageHandler';
|
||||||
var Modal = require('matrix-react-sdk/lib/Modal');
|
const Modal = require('matrix-react-sdk/lib/Modal');
|
||||||
var Resend = require("matrix-react-sdk/lib/Resend");
|
const Resend = require("matrix-react-sdk/lib/Resend");
|
||||||
import * as UserSettingsStore from 'matrix-react-sdk/lib/UserSettingsStore';
|
import * as UserSettingsStore from 'matrix-react-sdk/lib/UserSettingsStore';
|
||||||
|
|
||||||
module.exports = React.createClass({
|
module.exports = React.createClass({
|
||||||
|
@ -46,7 +46,7 @@ module.exports = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
onViewSourceClick: function() {
|
onViewSourceClick: function() {
|
||||||
var ViewSource = sdk.getComponent('structures.ViewSource');
|
const ViewSource = sdk.getComponent('structures.ViewSource');
|
||||||
Modal.createDialog(ViewSource, {
|
Modal.createDialog(ViewSource, {
|
||||||
content: this.props.mxEvent.event,
|
content: this.props.mxEvent.event,
|
||||||
}, 'mx_Dialog_viewsource');
|
}, 'mx_Dialog_viewsource');
|
||||||
|
@ -71,9 +71,9 @@ module.exports = React.createClass({
|
||||||
MatrixClientPeg.get().redactEvent(
|
MatrixClientPeg.get().redactEvent(
|
||||||
this.props.mxEvent.getRoomId(), this.props.mxEvent.getId()
|
this.props.mxEvent.getRoomId(), this.props.mxEvent.getId()
|
||||||
).catch(function(e) {
|
).catch(function(e) {
|
||||||
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||||
// display error message stating you couldn't delete this.
|
// display error message stating you couldn't delete this.
|
||||||
var code = e.errcode || e.statusCode;
|
const code = e.errcode || e.statusCode;
|
||||||
Modal.createDialog(ErrorDialog, {
|
Modal.createDialog(ErrorDialog, {
|
||||||
title: _t('Error'),
|
title: _t('Error'),
|
||||||
description: _t('You cannot delete this message. (%(code)s)', {code: code})
|
description: _t('You cannot delete this message. (%(code)s)', {code: code})
|
||||||
|
@ -89,6 +89,14 @@ module.exports = React.createClass({
|
||||||
if (this.props.onFinished) this.props.onFinished();
|
if (this.props.onFinished) this.props.onFinished();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onForwardClick: function() {
|
||||||
|
dis.dispatch({
|
||||||
|
action: 'forward_event',
|
||||||
|
content: this.props.mxEvent,
|
||||||
|
});
|
||||||
|
this.closeMenu();
|
||||||
|
},
|
||||||
|
|
||||||
closeMenu: function() {
|
closeMenu: function() {
|
||||||
if (this.props.onFinished) this.props.onFinished();
|
if (this.props.onFinished) this.props.onFinished();
|
||||||
},
|
},
|
||||||
|
@ -100,7 +108,7 @@ module.exports = React.createClass({
|
||||||
if (this.props.onFinished) this.props.onFinished();
|
if (this.props.onFinished) this.props.onFinished();
|
||||||
},
|
},
|
||||||
|
|
||||||
onQuoteClick: function () {
|
onQuoteClick: function() {
|
||||||
console.log(this.props.mxEvent);
|
console.log(this.props.mxEvent);
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
action: 'quote',
|
action: 'quote',
|
||||||
|
@ -109,15 +117,16 @@ module.exports = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
var eventStatus = this.props.mxEvent.status;
|
const eventStatus = this.props.mxEvent.status;
|
||||||
var resendButton;
|
let resendButton;
|
||||||
var viewSourceButton;
|
let redactButton;
|
||||||
var viewClearSourceButton;
|
let cancelButton;
|
||||||
var redactButton;
|
let forwardButton;
|
||||||
var cancelButton;
|
let viewSourceButton;
|
||||||
var permalinkButton;
|
let viewClearSourceButton;
|
||||||
var unhidePreviewButton;
|
let unhidePreviewButton;
|
||||||
var externalURLButton;
|
let permalinkButton;
|
||||||
|
let externalURLButton;
|
||||||
|
|
||||||
if (eventStatus === 'not_sent') {
|
if (eventStatus === 'not_sent') {
|
||||||
resendButton = (
|
resendButton = (
|
||||||
|
@ -143,6 +152,17 @@ module.exports = React.createClass({
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!eventStatus && this.props.mxEvent.getType() === 'm.room.message') {
|
||||||
|
const content = this.props.mxEvent.getContent();
|
||||||
|
if (content.msgtype && content.msgtype !== 'm.bad.encrypted' && content.hasOwnProperty('body')) {
|
||||||
|
forwardButton = (
|
||||||
|
<div className="mx_MessageContextMenu_field" onClick={this.onForwardClick}>
|
||||||
|
Forward Message
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
viewSourceButton = (
|
viewSourceButton = (
|
||||||
<div className="mx_MessageContextMenu_field" onClick={this.onViewSourceClick}>
|
<div className="mx_MessageContextMenu_field" onClick={this.onViewSourceClick}>
|
||||||
{ _t('View Source') }
|
{ _t('View Source') }
|
||||||
|
@ -163,7 +183,7 @@ module.exports = React.createClass({
|
||||||
<div className="mx_MessageContextMenu_field" onClick={this.onUnhidePreviewClick}>
|
<div className="mx_MessageContextMenu_field" onClick={this.onUnhidePreviewClick}>
|
||||||
{ _t('Unhide Preview') }
|
{ _t('Unhide Preview') }
|
||||||
</div>
|
</div>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,6 +217,7 @@ module.exports = React.createClass({
|
||||||
{resendButton}
|
{resendButton}
|
||||||
{redactButton}
|
{redactButton}
|
||||||
{cancelButton}
|
{cancelButton}
|
||||||
|
{forwardButton}
|
||||||
{viewSourceButton}
|
{viewSourceButton}
|
||||||
{viewClearSourceButton}
|
{viewClearSourceButton}
|
||||||
{unhidePreviewButton}
|
{unhidePreviewButton}
|
||||||
|
@ -205,5 +226,5 @@ module.exports = React.createClass({
|
||||||
{externalURLButton}
|
{externalURLButton}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -1 +1,6 @@
|
||||||
{}
|
{
|
||||||
|
"Add an email address above to configure email notifications": "Voeg een email adres toe om email notificaties te ontvangen",
|
||||||
|
"Advanced notification settings": "Geavanceerde notificatie instellingen",
|
||||||
|
"All messages": "Alle berichten",
|
||||||
|
"All messages (loud)": "Alle berichten (luid)"
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue