Skip to content

Commit

Permalink
GUACAMOLE-2020: Allow hiding the display statistics bar.
Browse files Browse the repository at this point in the history
  • Loading branch information
corentin-soriano committed Jan 21, 2025
1 parent eacf7c7 commit 8b184ea
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ angular.module('client').directive('guacClientStatistics', [function guacClientS
$scope.client.managedDisplay.display.onstatistics = null;
});

// Display statistics by default
$scope.isVisible = true;

}];

return directive;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,39 @@ guac-client-statistics {
background: #111;
}

guac-client-statistics div.buttons-statistics {
content: '';
cursor: pointer;
display: block;
background-repeat: no-repeat;
background-size: contain;
background-position: center center;
height: 15px;
position: absolute;
}

guac-client-statistics div.hide-statistics {
background-image: url('images/x.svg');
bottom: 10px;
right: 20px;
width: 15px;
}

guac-client-statistics div.show-statistics {
background-color: #888;
background-image: url('images/arrows/up.svg');
border: 1px solid rgba(0, 0, 0, 0.25);
bottom: 0;
left: 50%;
margin-left: -15px;
opacity: .5;
width: 30px;
}

guac-client-statistics div.show-statistics:hover {
background-color: #FFF;
}

guac-client-statistics dl.client-statistics {
display: table;
margin: 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<dl class="client-statistics">
<dl class="client-statistics" ng-show="isVisible">

<dt class="client-statistic desktop-fps">
{{ 'CLIENT.FIELD_HEADER_DESKTOP_FRAMERATE' | translate }}
Expand Down Expand Up @@ -36,4 +36,9 @@
translate-values="{ VALUE : round(statistics.dropRate) }"></span>
</dd>

</dl>
</dl>

<div class="buttons-statistics"
ng-click="isVisible = !isVisible"
ng-class="{ 'hide-statistics' : isVisible, 'show-statistics' : !isVisible }">
</div>

0 comments on commit 8b184ea

Please sign in to comment.