Skip to content

Commit

Permalink
Fixes instedd/aida#204 - Style operator button in human override
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Scebba committed Aug 29, 2018
1 parent 846c948 commit 2c6f418
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 5 deletions.
16 changes: 12 additions & 4 deletions app/javascript/components/HumanOverride.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,22 @@ class HumanOverride extends Component {
).toString() : null
)

if (permitted && operators.length) {
if (permitted) {

return (
<div>
<Field id="kr-operators" label="Operators" readOnly={true} value={spaceSeparatedOperators()} />
<div className="md-text-field-container md-full-width md-text-field-container--input ui-field">
<label className="md-floating-label md-floating-label--floating md-text--secondary">Operators</label>

<div className="operators-list-field">
{operators.length
? spaceSeparatedOperators()
: <span>You don't have any operators yet</span>
}
</div>
<Button
flat
iconChildren="edit"
className="hrefLink"
className="btnLink pull-right"
to={r.botCollaborators(bot.id)}
component={Link} >
Manage permissions
Expand Down
14 changes: 13 additions & 1 deletion app/javascript/ui/css/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,19 @@ input[type=number]:invalid {
}
}


.operators-list-field {
font-size: 1.15rem;
display: inline-block;
margin-top: 33px;
span {
color: $md-grey-400;
font-style: italic;
}
+ a {
float: right;
margin-top: 33px;
}
}

.error-message {
color: $error-red;
Expand Down
4 changes: 4 additions & 0 deletions app/javascript/ui/css/_global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ tr.md-table-row {
.hrefLink {
color: #CDDC39;
}
.btnLink {
color: #02bbd3;
text-transform: none;
}
.roles {
font-size: 1.15rem;
text-align: center;
Expand Down

0 comments on commit 2c6f418

Please sign in to comment.