diff options
author | Thibaut Girka <thib@sitedethib.com> | 2020-07-07 17:47:33 +0200 |
---|---|---|
committer | ThibG <thib@sitedethib.com> | 2020-07-07 19:25:42 +0200 |
commit | 64b6c20676f320686c58e321b674cba757e40905 (patch) | |
tree | e734b6c55e3b4b6903e1c98ccc7ebed5100357d2 /app/javascript/flavours/glitch/features | |
parent | a9b13804e25b1697fcbf2dcda5835a0dfdc5cd50 (diff) |
Change styling and layout of account notes UI
Diffstat (limited to 'app/javascript/flavours/glitch/features')
-rw-r--r-- | app/javascript/flavours/glitch/features/account/components/account_note.js | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/app/javascript/flavours/glitch/features/account/components/account_note.js b/app/javascript/flavours/glitch/features/account/components/account_note.js index 3163b8735..8a99bfcb8 100644 --- a/app/javascript/flavours/glitch/features/account/components/account_note.js +++ b/app/javascript/flavours/glitch/features/account/components/account_note.js @@ -63,6 +63,14 @@ class Header extends ImmutablePureComponent { </button> </div> ); + } else { + action_buttons = ( + <div className='account__header__account-note__buttons'> + <button className='text-btn' tabIndex='0' onClick={this.props.onEditAccountNote} disabled={isSubmitting}> + <Icon id='pencil' size={15} /> <FormattedMessage id='account_note.edit' defaultMessage='Edit' /> + </button> + </div> + ); } let note_container = null; @@ -85,17 +93,10 @@ class Header extends ImmutablePureComponent { return ( <div className='account__header__account-note'> <div className='account__header__account-note__header'> - <strong><FormattedMessage id='account.account_note_header' defaultMessage='Your note for @{name}' values={{ name: account.get('username') }} /></strong> - {!isEditing && ( - <div> - <button className='text-btn' tabIndex='0' onClick={this.props.onEditAccountNote} disabled={isSubmitting}> - <Icon id='pencil' size={15} /> <FormattedMessage id='account_note.edit' defaultMessage='Edit' /> - </button> - </div> - )} + <strong><FormattedMessage id='account.account_note_header' defaultMessage='Note' /></strong> + {action_buttons} </div> {note_container} - {action_buttons} </div> ); } |