Skip to content

Commit

Permalink
improved displaying of version suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
klues committed Feb 1, 2024
1 parent 95b4c38 commit 21489d5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
6 changes: 5 additions & 1 deletion webgui/js/communication/ATDevice.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@ ATDevice.getVersionSuffix = function () {
return;
}
let parts = _lastVersionRawString.split(', ');
return parts.length > 1 ? parts[parts.length - 1] : null;
if (parts.length > 1) {
parts.shift();
return parts.join(', ');
}
return "";
}

ATDevice.isMajorVersion = function (numValue) {
Expand Down
19 changes: 10 additions & 9 deletions webgui/js/ui/views/TabGeneral.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,17 +147,18 @@ class TabGeneral extends Component {
<h3>${C.CURRENT_DEVICE} Firmware</h3>
<div class="container-fluid p-0">
<div class="row">
<span class="col col-md-4">${L.translate('Installed version // Installierte Version')}</span>
<span class="col col-md-3"> ${this.state.mainVersion}</span>
</div>
<div class="row ${this.state.versionSuffix ? '' : 'd-none'}">
<span class="col col-md-4">${L.translate('Version suffix // Versions-Zusatz')}</span>
<span class="col col-md-3"> ${this.state.versionSuffix}</span>
<span class="col col-md-3">${L.translate('Installed version // Installierte Version')}</span>
<span class="col col-md-6">
<span>${this.state.mainVersion}</span>
<span class="${this.state.versionSuffix ? '' : 'd-none'}"> (${this.state.versionSuffix})</span>
</span>
</div>
<div class="row">
<span class="col col-md-4">${L.translate('Available version // Verfügbare Version')}</span>
<a rel="noreferrer" href="${this.state.newMainVersionUrl}" target="_blank" class="col col-md-3"> ${this.state.newMainVersion}</a>
<div class="col-12 col-md-4 mt-3 mt-md-0">
<span class="col col-md-3">${L.translate('Available version // Verfügbare Version')}</span>
<a rel="noreferrer" href="${this.state.newMainVersionUrl}" target="_blank" class="col col-md-3"> ${this.state.newMainVersion}</a>
</div>
<div class="row mt-3">
<div class="col-12 col-md-4">
<button class="col-12" onclick="${() => this.updateFirmware()}" disabled="${this.state.mainUpgradeProgress}">
<span class="${this.state.mainUpgradeProgress ? 'd-none' : ''}">
<span class="sr-only">${C.CURRENT_DEVICE}: </span>
Expand Down

0 comments on commit 21489d5

Please sign in to comment.