Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}).catch(function(err) {
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
console.error("Failed to remove tag " + prevTag + " from room: " + err);
Modal.createTrackedDialog('Failed to remove tag from room', '', ErrorDialog, {
title: _t('Failed to remove tag %(tagName)s from room', {tagName: prevTag}),
description: ((err && err.message) ? err.message : _t('Operation failed')),
});
});
}
body = body.replace(/_t\(['"]([\s\S]*?)['"]\)/mg, (match, g1)=>{ return sanitizeHtml(_t(g1)) });
this.setState({ page: body });
const MemberAvatar = sdk.getComponent("views.avatars.MemberAvatar");
const sender = this.props.mxRoom.getMember(this.props.mxEvent.getSender());
const avatarSize = 40;
let unpinButton = null;
if (this._canUnpin()) {
unpinButton = <img title="{_t('Unpin" alt="{_t('Unpin" height="8" width="8" src="img/cancel-red.svg">;
}
return (
<div>
<div>
{ _t("Jump to message") }
{ unpinButton }
</div>
<span>
{sender.name}
</span>
</div>
);
}
});
module.exports = ({onFinished}) => {
return (
<div>
<div>
{ _t('Custom Server Options') }
</div>
<div>
<p>{_t(
"You can use the custom server options to sign into other " +
"Matrix servers by specifying a different homeserver URL. This " +
"allows you to use Riot with an existing Matrix account on a " +
"different homeserver.",
)}</p>
</div>
<div>
<button>
{ _t('Dismiss') }
</button>
</div>
</div>
);
getDefaultDeviceDisplayName(): string {
return _t("Unknown device");
}
}
function getdaysArray() {
return [
_t('Sunday'),
_t('Monday'),
_t('Tuesday'),
_t('Wednesday'),
_t('Thursday'),
_t('Friday'),
_t('Saturday'),
];
}
render: function() {
let tiles = <div>{ _t("Loading...") }</div>;
if (this.state && !this.state.loading) {
tiles = this._getPinnedTiles();
}
return (
<div>
<div>
<img height="18" width="18" src="img/cancel.svg">
<h3>{_t("Pinned Messages")}</h3>
{ tiles }
</div>
</div>
);
}
});
render() {
if (this.state.message) {
return <div>
<div>
{ this.state.message }
</div>
{ this._buttons() }
</div>;
}
return <div>
<div>
{ this.textInput('eventType', _t('Event Type')) }
{ this.state.isStateEvent && this.textInput('stateKey', _t('State Key')) }
<br>
<div>
<label> { _t('Event Content') } </label>
</div>
<div>
<textarea rows="5" cols="63" value="{this.state.evContent}" id="evContent"> </div>
</div>
<div className="mx_Dialog_buttons">
<button onClick={this.onBack}>{ _t('Back') }</button>
{ !this.state.message && <button onClick={this._send}>{ _t('Send') }</button> }
{ !this.state.message && !this.props.forceStateEvent && <div style={{float: "right"}}>
<input id="isStateEvent" className="mx_DevTools_tgl mx_DevTools_tgl-flip" type="checkbox" onChange={this._onChange} checked={this.state.isStateEvent} /></textarea></div></div></div>
<div>
{ this.state.message }
</div>
{ this._buttons() }
;
}
return <div>
<div>
{ this.textInput('eventType', _t('Event Type')) }
{ this.state.isStateEvent && this.textInput('stateKey', _t('State Key')) }
<br>
<div>
<label> { _t('Event Content') } </label>
</div>
<div>
<textarea rows="5" cols="63" value="{this.state.evContent}" id="evContent"> </div>
</div>
<div className="mx_Dialog_buttons">
<button onClick={this.onBack}>{ _t('Back') }</button>
{ !this.state.message && <button onClick={this._send}>{ _t('Send') }</button> }
{ !this.state.message && !this.props.forceStateEvent && <div style={{float: "right"}}>
<input id="isStateEvent" className="mx_DevTools_tgl mx_DevTools_tgl-flip" type="checkbox" onChange={this._onChange} checked={this.state.isStateEvent} />
<label className="mx_DevTools_tgl-btn" data-tg-off="Event" data-tg-on="State Event" htmlFor="isStateEvent" />
</div> }
</div>
</div>;
}
}</textarea></div></div></div>
static getLabel() { return _t('Explore Account Data'); }