From e07bd5e8fe7c5afc19c9bba4ab48bd36ffb31fad Mon Sep 17 00:00:00 2001
From: Kai Reinhard <K.Reinhard@micromata.de>
Date: Sun, 10 Feb 2019 16:10:19 +0000
Subject: [PATCH] Test button color.
---
borgbutler-webapp/src/components/views/repos/RepoConfigPanel.jsx | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/borgbutler-webapp/src/components/views/repos/RepoConfigPanel.jsx b/borgbutler-webapp/src/components/views/repos/RepoConfigPanel.jsx
index 044c032..4d4a3f6 100644
--- a/borgbutler-webapp/src/components/views/repos/RepoConfigPanel.jsx
+++ b/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"
--
Gitblit v1.10.0