Add semver compatibility checking

This commit is contained in:
hensm
2018-12-12 20:27:30 +00:00
parent 54150568c2
commit 771233040f
7 changed files with 59 additions and 30 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -180,18 +180,29 @@ class App extends Component {
? "bridge__info--found"
: "bridge__info--not-found"}`;
const [ statusIcon, statusText ] = do {
if (!bridgeInfo) {
[ "assets/icons8-cancel-120.png"
, _("optionsBridgeNotFoundStatusText") ]
} else {
if (bridgeInfo.isVersionExact) {
[ "assets/icons8-ok-120.png"
, _("optionsBridgeFoundStatusText") ]
} else {
[ "assets/icons8-warn-120.png"
, _("optionsBridgeIssueStatusText") ]
}
}
};
<div className={bridgeInfoClasses}>
<div className="bridge__status">
<img className="bridge__status-icon"
width="60" height="60"
src={ bridgeInfo
? "assets/icons8-ok-120.png"
: "assets/icons8-cancel-120.png" } />
src={ statusIcon } />
<h2 className="bridge__status-text">
{ bridgeInfo
? _("optionsBridgeFoundStatusText")
: _("optionsBridgeNotFoundStatusText") }
{ statusText }
</h2>
</div>
@@ -203,14 +214,22 @@ class App extends Component {
</tr>
<tr>
<th>{ _("optionsBridgeStatsExpectedVersion") }</th>
<td>{ APPLICATION_VERSION }</td>
<td>{ bridgeInfo.expectedVersion }</td>
</tr>
<tr>
<th>{ _("optionsBridgeStatsCompatibility") }</th>
<td>
{ bridgeInfo.isVersionCompatible
? _("optionsBridgeCompatible")
: _("optionsBridgeIncompatible") }
{ do {
if (bridgeInfo.isVersionCompatible) {
if (bridgeInfo.isVersionExact) {
_("optionsBridgeCompatible")
} else {
_("optionsBridgeMaybeCompatible")
}
} else {
_("optionsBridgeIncompatible")
}
}}
</td>
</tr>
<tr>

View File

@@ -50,14 +50,6 @@
width: 100%;
}
.bridge__missing {
background-color: #d70022;
border-radius: 5px;
color: white;
padding: 5px;
margin-top: 5px;
}
.bridge__info {
display: flex;
}