Merge pull request #782 from asaadmahmoodspin/plt-298
plt-298 - Improving UI for webhooks
Этот коммит содержится в:
@@ -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>
|
||||
|
||||
@@ -44,6 +44,10 @@ body {
|
||||
}
|
||||
}
|
||||
|
||||
.word-break--all {
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
a {
|
||||
word-break: break-word;
|
||||
color: $primary-color;
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
}
|
||||
a, a:focus, a:hover {
|
||||
color: #2389D7;
|
||||
&.text-danger {
|
||||
color: #a94442;
|
||||
}
|
||||
}
|
||||
.custom-textarea {
|
||||
color: inherit;
|
||||
@@ -20,11 +23,14 @@
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
.btn.btn-primary {
|
||||
background: #4285f4;
|
||||
&:hover, &:focus, &:active {
|
||||
background: $primary-color--hover;
|
||||
color: #fff;
|
||||
.btn {
|
||||
font-size: 13px;
|
||||
&.btn-primary {
|
||||
background: #4285f4;
|
||||
&:hover, &:focus, &:active {
|
||||
background: $primary-color--hover;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
.info__label {
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
}
|
||||
.settings-table {
|
||||
display: table;
|
||||
table-layout: fixed;
|
||||
width: 100%;
|
||||
> div {
|
||||
display: table-cell;
|
||||
@@ -125,6 +126,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
.font--small {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.section-describe {
|
||||
color:grey;
|
||||
}
|
||||
@@ -155,8 +160,18 @@
|
||||
.has-error {
|
||||
color: #a94442;
|
||||
}
|
||||
.padding-top {
|
||||
padding-top: 7px;
|
||||
&.x2 {
|
||||
padding-top: 14px;
|
||||
}
|
||||
}
|
||||
.control-label {
|
||||
color: #555;
|
||||
font-weight: 600;
|
||||
&.text-left {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
hr {
|
||||
border-color: #ccc;
|
||||
|
||||
Ссылка в новой задаче
Block a user