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) => {
|
this.state.hooks.forEach((hook) => {
|
||||||
const c = ChannelStore.get(hook.channel_id);
|
const c = ChannelStore.get(hook.channel_id);
|
||||||
hooks.push(
|
hooks.push(
|
||||||
<div>
|
<div className='font--small'>
|
||||||
<div className='divider-light'></div>
|
<div className='padding-top x2 divider-light'></div>
|
||||||
<span>
|
<div className='padding-top x2'>
|
||||||
<strong>{'URL: '}</strong>{Utils.getWindowLocationOrigin() + '/hooks/' + hook.id}
|
<strong>{'URL: '}</strong><span className='word-break--all'>{Utils.getWindowLocationOrigin() + '/hooks/' + hook.id}</span>
|
||||||
</span>
|
</div>
|
||||||
<br/>
|
<div className='padding-top'>
|
||||||
<span>
|
|
||||||
<strong>{'Channel: '}</strong>{c.name}
|
<strong>{'Channel: '}</strong>{c.name}
|
||||||
</span>
|
</div>
|
||||||
<br/>
|
<div className='padding-top'>
|
||||||
<a
|
<a
|
||||||
className={'btn btn-sm btn-primary'}
|
className={'text-danger'}
|
||||||
href='#'
|
href='#'
|
||||||
onClick={this.removeHook.bind(this, hook.id)}
|
onClick={this.removeHook.bind(this, hook.id)}
|
||||||
>
|
>
|
||||||
{'Remove'}
|
{'Remove'}
|
||||||
</a>
|
</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@@ -134,41 +134,38 @@ export default class ManageIncomingHooks extends React.Component {
|
|||||||
} else if (hooks.length > 0) {
|
} else if (hooks.length > 0) {
|
||||||
displayHooks = hooks;
|
displayHooks = hooks;
|
||||||
} else {
|
} else {
|
||||||
displayHooks = <label>{'None'}</label>;
|
displayHooks = <label>{' None'}</label>;
|
||||||
}
|
}
|
||||||
|
|
||||||
const existingHooks = (
|
const existingHooks = (
|
||||||
<div>
|
<div className='padding-top x2'>
|
||||||
<label className='control-label'>{'Existing incoming webhooks'}</label>
|
<label className='control-label padding-top x2'>{'Existing incoming webhooks'}</label>
|
||||||
<br/>
|
|
||||||
{displayHooks}
|
{displayHooks}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div key='addIncomingHook'>
|
||||||
key='addIncomingHook'
|
|
||||||
className='form-group'
|
|
||||||
>
|
|
||||||
<label className='control-label'>{'Add a new incoming webhook'}</label>
|
<label className='control-label'>{'Add a new incoming webhook'}</label>
|
||||||
<br/>
|
<div className='padding-top'>
|
||||||
<div>
|
|
||||||
<select
|
<select
|
||||||
ref='channelName'
|
ref='channelName'
|
||||||
|
className='form-control'
|
||||||
value={this.state.channelId}
|
value={this.state.channelId}
|
||||||
onChange={this.updateChannelId}
|
onChange={this.updateChannelId}
|
||||||
>
|
>
|
||||||
{options}
|
{options}
|
||||||
</select>
|
</select>
|
||||||
<br/>
|
|
||||||
{serverError}
|
{serverError}
|
||||||
<a
|
<div className='padding-top'>
|
||||||
className={'btn btn-sm btn-primary' + disableButton}
|
<a
|
||||||
href='#'
|
className={'btn btn-sm btn-primary' + disableButton}
|
||||||
onClick={this.addNewHook}
|
href='#'
|
||||||
>
|
onClick={this.addNewHook}
|
||||||
{'Add'}
|
>
|
||||||
</a>
|
{'Add'}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{existingHooks}
|
{existingHooks}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -44,6 +44,10 @@ body {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.word-break--all {
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
color: $primary-color;
|
color: $primary-color;
|
||||||
|
|||||||
@@ -11,6 +11,9 @@
|
|||||||
}
|
}
|
||||||
a, a:focus, a:hover {
|
a, a:focus, a:hover {
|
||||||
color: #2389D7;
|
color: #2389D7;
|
||||||
|
&.text-danger {
|
||||||
|
color: #a94442;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.custom-textarea {
|
.custom-textarea {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
@@ -20,11 +23,14 @@
|
|||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.btn.btn-primary {
|
.btn {
|
||||||
background: #4285f4;
|
font-size: 13px;
|
||||||
&:hover, &:focus, &:active {
|
&.btn-primary {
|
||||||
background: $primary-color--hover;
|
background: #4285f4;
|
||||||
color: #fff;
|
&:hover, &:focus, &:active {
|
||||||
|
background: $primary-color--hover;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.info__label {
|
.info__label {
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
}
|
}
|
||||||
.settings-table {
|
.settings-table {
|
||||||
display: table;
|
display: table;
|
||||||
|
table-layout: fixed;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
> div {
|
> div {
|
||||||
display: table-cell;
|
display: table-cell;
|
||||||
@@ -125,6 +126,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.font--small {
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
.section-describe {
|
.section-describe {
|
||||||
color:grey;
|
color:grey;
|
||||||
}
|
}
|
||||||
@@ -155,8 +160,18 @@
|
|||||||
.has-error {
|
.has-error {
|
||||||
color: #a94442;
|
color: #a94442;
|
||||||
}
|
}
|
||||||
|
.padding-top {
|
||||||
|
padding-top: 7px;
|
||||||
|
&.x2 {
|
||||||
|
padding-top: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
.control-label {
|
.control-label {
|
||||||
color: #555;
|
color: #555;
|
||||||
|
font-weight: 600;
|
||||||
|
&.text-left {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
hr {
|
hr {
|
||||||
border-color: #ccc;
|
border-color: #ccc;
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user