diff options
author | Joram Wilander <jwawilander@gmail.com> | 2015-09-24 13:37:35 -0400 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2015-09-24 13:37:35 -0400 |
commit | d077655ffcf02ba06aa4fee6fafee0b62b8e79a2 (patch) | |
tree | 375acdb69fdd5d23baf6aa9df3a00e6f211da2cc /web/react/components/user_settings | |
parent | 75b1b43fd85ec4fbf5b669d52fb5195dbfa18631 (diff) | |
parent | 0e08d7d46059585916923219858fdc14f47d370e (diff) | |
download | chat-d077655ffcf02ba06aa4fee6fafee0b62b8e79a2.tar.gz chat-d077655ffcf02ba06aa4fee6fafee0b62b8e79a2.tar.bz2 chat-d077655ffcf02ba06aa4fee6fafee0b62b8e79a2.zip |
Merge pull request #782 from asaadmahmoodspin/plt-298
plt-298 - Improving UI for webhooks
Diffstat (limited to 'web/react/components/user_settings')
-rw-r--r-- | web/react/components/user_settings/manage_incoming_hooks.jsx | 65 |
1 files changed, 31 insertions, 34 deletions
diff --git a/web/react/components/user_settings/manage_incoming_hooks.jsx b/web/react/components/user_settings/manage_incoming_hooks.jsx index df089a403..12c041c7f 100644 --- a/web/react/components/user_settings/manage_incoming_hooks.jsx +++ b/web/react/components/user_settings/manage_incoming_hooks.jsx @@ -107,23 +107,23 @@ export default class ManageIncomingHooks extends React.Component { this.state.hooks.forEach((hook) => { const c = ChannelStore.get(hook.channel_id); hooks.push( - <div> - <div className='divider-light'></div> - <span> - <strong>{'URL: '}</strong>{Utils.getWindowLocationOrigin() + '/hooks/' + hook.id} - </span> - <br/> - <span> + <div className='font--small'> + <div className='padding-top x2 divider-light'></div> + <div className='padding-top x2'> + <strong>{'URL: '}</strong><span className='word-break--all'>{Utils.getWindowLocationOrigin() + '/hooks/' + hook.id}</span> + </div> + <div className='padding-top'> <strong>{'Channel: '}</strong>{c.name} - </span> - <br/> - <a - className={'btn btn-sm btn-primary'} - href='#' - onClick={this.removeHook.bind(this, hook.id)} - > - {'Remove'} - </a> + </div> + <div className='padding-top'> + <a + className={'text-danger'} + href='#' + onClick={this.removeHook.bind(this, hook.id)} + > + {'Remove'} + </a> + </div> </div> ); }); @@ -134,41 +134,38 @@ export default class ManageIncomingHooks extends React.Component { } else if (hooks.length > 0) { displayHooks = hooks; } else { - displayHooks = <label>{'None'}</label>; + displayHooks = <label>{' None'}</label>; } const existingHooks = ( - <div> - <label className='control-label'>{'Existing incoming webhooks'}</label> - <br/> + <div className='padding-top x2'> + <label className='control-label padding-top x2'>{'Existing incoming webhooks'}</label> {displayHooks} </div> ); return ( - <div - key='addIncomingHook' - className='form-group' - > + <div key='addIncomingHook'> <label className='control-label'>{'Add a new incoming webhook'}</label> - <br/> - <div> + <div className='padding-top'> <select ref='channelName' + className='form-control' value={this.state.channelId} onChange={this.updateChannelId} > {options} </select> - <br/> {serverError} - <a - className={'btn btn-sm btn-primary' + disableButton} - href='#' - onClick={this.addNewHook} - > - {'Add'} - </a> + <div className='padding-top'> + <a + className={'btn btn-sm btn-primary' + disableButton} + href='#' + onClick={this.addNewHook} + > + {'Add'} + </a> + </div> </div> {existingHooks} </div> |