Make aspects of the HTML easier to style

pull/690/head
Ryan Tharp 6 years ago
parent 0281338a39
commit 2761e89732

@ -124,14 +124,16 @@ export class AddModeratorsDialog extends React.Component<Props, State> {
public render() { public render() {
const i18n = window.i18n; const i18n = window.i18n;
const titleText = `${i18n('addModerators')} ${this.props.chatName}`;
const hasFriends = this.state.friendList.length !== 0; const hasFriends = this.state.friendList.length !== 0;
return ( return (
<div className="content"> <div className="content">
<p className="titleText">{titleText}</p> <p className="titleText">
Add Moderator: ${i18n('addModerators')} <span>${this.props.chatName}</span>
</p>
<div className="addModeratorBox">
<p>Add Moderator:</p>
<input <input
type="text" type="text"
ref={this.inputRef} ref={this.inputRef}
@ -143,7 +145,9 @@ export class AddModeratorsDialog extends React.Component<Props, State> {
<button className="add" tabIndex={0} onClick={this.add}> <button className="add" tabIndex={0} onClick={this.add}>
{i18n('add')} {i18n('add')}
</button> </button>
From friends: </div>
<div className="moderatorList">
<p>From friends:</p>
<div className="friend-selection-list"> <div className="friend-selection-list">
<MemberList <MemberList
members={this.state.friendList} members={this.state.friendList}
@ -155,6 +159,7 @@ export class AddModeratorsDialog extends React.Component<Props, State> {
{hasFriends ? null : ( {hasFriends ? null : (
<p className="no-friends">{i18n('noFriendsToAdd')}</p> <p className="no-friends">{i18n('noFriendsToAdd')}</p>
)} )}
</div>
<div className="buttons"> <div className="buttons">
<button className="cancel" tabIndex={0} onClick={this.closeDialog}> <button className="cancel" tabIndex={0} onClick={this.closeDialog}>
{i18n('cancel')} {i18n('cancel')}

@ -58,14 +58,15 @@ export class RemoveModeratorsDialog extends React.Component<Props, State> {
public render() { public render() {
const i18n = window.i18n; const i18n = window.i18n;
const titleText = `${i18n('removeModerators')} ${this.props.chatName}`;
const hasMods = this.state.modList.length !== 0; const hasMods = this.state.modList.length !== 0;
return ( return (
<div className="content"> <div className="content">
<p className="titleText">{titleText}</p> <p className="titleText">
Existing moderators: ${i18n('removeModerators')} <span>${this.props.chatName}</span>
</p>
<div className="moderatorList">
<p>Existing moderators:</p>
<div className="friend-selection-list"> <div className="friend-selection-list">
<MemberList <MemberList
members={this.state.modList} members={this.state.modList}
@ -77,6 +78,7 @@ export class RemoveModeratorsDialog extends React.Component<Props, State> {
{hasMods ? null : ( {hasMods ? null : (
<p className="no-friends">{i18n('noModeratorsToRemove')}</p> <p className="no-friends">{i18n('noModeratorsToRemove')}</p>
)} )}
</div>
<div className="buttons"> <div className="buttons">
<button className="cancel" tabIndex={0} onClick={this.closeDialog}> <button className="cancel" tabIndex={0} onClick={this.closeDialog}>
{i18n('cancel')} {i18n('cancel')}

Loading…
Cancel
Save