mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 21:51:23 +00:00
GUAC-1053: Only show the list of settings tabs if more than one is available.
This commit is contained in:
@@ -46,6 +46,17 @@ angular.module('manage').controller('settingsController', ['$scope', '$injector'
|
|||||||
*/
|
*/
|
||||||
$scope.activeTab = $routeParams.tab;
|
$scope.activeTab = $routeParams.tab;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether the list of all available settings tabs should be shown.
|
||||||
|
*
|
||||||
|
* @returns {Boolean}
|
||||||
|
* true if the list of available settings tabs should be shown, false
|
||||||
|
* otherwise.
|
||||||
|
*/
|
||||||
|
$scope.showAvailableTabs = function showAvailableTabs() {
|
||||||
|
return !!$scope.settingsPages && $scope.settingsPages.length > 1;
|
||||||
|
};
|
||||||
|
|
||||||
// Retrieve settings pages
|
// Retrieve settings pages
|
||||||
userPageService.getSettingsPages()
|
userPageService.getSettingsPages()
|
||||||
.then(function settingsPagesRetrieved(pages) {
|
.then(function settingsPagesRetrieved(pages) {
|
||||||
|
@@ -29,7 +29,7 @@ THE SOFTWARE.
|
|||||||
|
|
||||||
<!-- Available tabs -->
|
<!-- Available tabs -->
|
||||||
<div class="settings-tabs">
|
<div class="settings-tabs">
|
||||||
<guac-page-list pages="settingsPages"></guac-page-list>
|
<guac-page-list pages="settingsPages" ng-show="showAvailableTabs()"></guac-page-list>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Selected tab -->
|
<!-- Selected tab -->
|
||||||
|
Reference in New Issue
Block a user