mirror of https://github.com/micromata/borgbackup-butler.git

Kai Reinhard
10.10.2019 e07bd5e8fe7c5afc19c9bba4ab48bd36ffb31fad
Test button color.
1 files modified
6 ■■■■ changed files
borgbutler-webapp/src/components/views/repos/RepoConfigPanel.jsx 6 ●●●● patch | view | raw | blame | history
borgbutler-webapp/src/components/views/repos/RepoConfigPanel.jsx
@@ -133,6 +133,7 @@
            />
        }
        let testResult = undefined;
        let testButtonColor = this.props.repoError ? 'danger' : 'info';
        if (!this.state.testStatus) {
            // No test available.
        } else if (this.state.testStatus === 'exception') {
@@ -141,6 +142,7 @@
            testResult = <Alert color={'success'}>
                OK
            </Alert>;
            testButtonColor = 'success';
        } else if (this.state.testStatus === 'fetching') {
            testResult = <Alert color={'warning'}>
                Testing...
@@ -150,6 +152,7 @@
                title={'Error while testing repo configuration'}
                description={this.state.testResult}
            />
            testButtonColor = 'danger';
        }
        let testResultGroup = '';
        if (testResult) {
@@ -190,7 +193,8 @@
                        <FormButton onClick={this.onCancel}
                                    hintKey="configuration.cancel.hint"><I18n name={'common.cancel'}/>
                        </FormButton>
                        <FormButton onClick={this.onTest} disabled={this.state.testStatus === 'fetching'} bsStyle={this.props.repoError ? 'danger' :'info'}
                        <FormButton onClick={this.onTest} disabled={this.state.testStatus === 'fetching'}
                                    bsStyle={testButtonColor}
                                    hint={'Tries to connect to the repo and to get info from.'}>Test
                        </FormButton>
                        <FormButton onClick={this.onSave} bsStyle="primary"