Merged in bugfix/disable_repository_config (pull request #218)

Bugfix: Disable repository config without permission
This commit is contained in:
Sebastian Sdorra
2019-03-14 10:48:06 +00:00
7 changed files with 48 additions and 23 deletions

View File

@@ -26,6 +26,7 @@ type Props = {
selected: (branch?: Branch) => void,
selectedBranch?: string,
label: string,
disabled?: boolean,
// context props
classes: Object
@@ -47,7 +48,7 @@ class BranchSelector extends React.Component<Props, State> {
}
render() {
const { branches, classes, label } = this.props;
const { branches, classes, label, disabled } = this.props;
if (branches) {
return (
@@ -79,6 +80,7 @@ class BranchSelector extends React.Component<Props, State> {
className="is-fullwidth"
options={branches.map(b => b.name)}
optionSelected={this.branchSelected}
disabled={!!disabled}
preselectedOption={
this.state.selectedBranch
? this.state.selectedBranch.name

View File

@@ -14,7 +14,8 @@ type Props = {
value?: string,
autofocus?: boolean,
onChange: (value: string, name?: string) => void,
helpText?: string
helpText?: string,
disabled?: boolean
};
class Textarea extends React.Component<Props> {
@@ -31,7 +32,7 @@ class Textarea extends React.Component<Props> {
};
render() {
const { placeholder, value, label, helpText } = this.props;
const { placeholder, value, label, helpText, disabled } = this.props;
return (
<div className="field">
@@ -45,6 +46,7 @@ class Textarea extends React.Component<Props> {
placeholder={placeholder}
onChange={this.handleInput}
value={value}
disabled={!!disabled}
/>
</div>
</div>