Add copy buttons for event & room ID (#8302)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com> Co-authored-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
511965b840
commit
2b91ed1084
3 changed files with 26 additions and 9 deletions
|
@ -167,8 +167,16 @@ export default class ViewSource extends React.Component<IProps, IState> {
|
|||
return (
|
||||
<BaseDialog className="mx_ViewSource" onFinished={this.props.onFinished} title={_t("View Source")}>
|
||||
<div>
|
||||
<div>{ _t("Room ID: %(roomId)s", { roomId }) }</div>
|
||||
<div>{ _t("Event ID: %(eventId)s", { eventId }) }</div>
|
||||
<div>
|
||||
<CopyableText getTextToCopy={() => roomId} border={false}>
|
||||
{ _t("Room ID: %(roomId)s", { roomId }) }
|
||||
</CopyableText>
|
||||
</div>
|
||||
<div>
|
||||
<CopyableText getTextToCopy={() => eventId} border={false}>
|
||||
{ _t("Event ID: %(eventId)s", { eventId }) }
|
||||
</CopyableText>
|
||||
</div>
|
||||
<div className="mx_ViewSource_separator" />
|
||||
{ isEditing ? this.editSourceContent() : this.viewSourceContent() }
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue