GUACAMOLE-1866: Remove application header from home page.

This commit is contained in:
Michael Jumper
2024-08-24 23:21:57 -07:00
parent 6622166510
commit f53e23ca75
6 changed files with 19 additions and 30 deletions

View File

@@ -62,12 +62,14 @@ angular.module('home').controller('homeController', ['$scope', '$injector',
]; ];
/** /**
* Returns true if recent connections should be displayed on the Guacamole * Returns whether the "Recent Connections" section should be displayed on
* home page, otherwise false. * the home screen.
* *
* @returns {!boolean} * @returns {!boolean}
* true if recent connections should be displayed on the home screen,
* false otherwise.
*/ */
$scope.willShowRecentConnections = function willShowRecentConnections() { $scope.isRecentConnectionsVisible = function isRecentConnectionsVisible() {
return preferenceService.preferences.showRecentConnections; return preferenceService.preferences.showRecentConnections;
}; };

View File

@@ -74,16 +74,6 @@ angular.module('home').directive('guacRecentConnections', [function guacRecentCo
&& guacHistory.removeEntry(recentConnection.entry.id)); && guacHistory.removeEntry(recentConnection.entry.id));
}; };
/**
* Returns whether or not recent connections should be displayed.
*
* @returns {!boolean}
* true if recent connections should be displayed, otherwise false.
*/
$scope.willShowRecentConnections = function willShowRecentConnections() {
return preferenceService.preferences.showRecentConnections;
};
/** /**
* Returns whether recent connections are available for display. * Returns whether recent connections are available for display.
* *

View File

@@ -77,11 +77,6 @@ a.home-connection, .empty.balancer a.home-connection-group {
display: none; display: none;
} }
.header-app-name {
font-size: 0.85em;
box-shadow: none;
}
.recent-connections .connection .remove-recent { .recent-connections .connection .remove-recent {
visibility: hidden; visibility: hidden;
} }

View File

@@ -1,4 +1,4 @@
<div class="recent-connections" ng-show="willShowRecentConnections()"> <div class="recent-connections">
<!-- Text displayed if no recent connections exist --> <!-- Text displayed if no recent connections exist -->
<p class="placeholder" ng-hide="hasRecentConnections()">{{'HOME.INFO_NO_RECENT_CONNECTIONS' | translate}}</p> <p class="placeholder" ng-hide="hasRecentConnections()">{{'HOME.INFO_NO_RECENT_CONNECTIONS' | translate}}</p>

View File

@@ -2,16 +2,14 @@
<div class="connection-list-ui"> <div class="connection-list-ui">
<div class="header header-app-name"> <!-- The recent connections for this user -->
<h2 id="section-header-app-name">{{'APP.NAME' | translate}}</h2> <div class="header" ng-show="isRecentConnectionsVisible()">
<h2 id="section-header-recent-connections">{{'HOME.SECTION_HEADER_RECENT_CONNECTIONS' | translate}}</h2>
<guac-user-menu></guac-user-menu> <guac-user-menu></guac-user-menu>
</div> </div>
<guac-recent-connections
<!-- The recent connections for this user --> root-groups="rootConnectionGroups"
<div class="header" ng-show="willShowRecentConnections()"> ng-show="isRecentConnectionsVisible()"></guac-recent-connections>
<h2 id="section-header-recent-connections">{{'HOME.SECTION_HEADER_RECENT_CONNECTIONS' | translate}}</h2>
</div>
<guac-recent-connections root-groups="rootConnectionGroups" ng-show="willShowRecentConnections()"></guac-recent-connections>
<!-- All connections for this user --> <!-- All connections for this user -->
<div class="header"> <div class="header">
@@ -21,6 +19,7 @@
placeholder="'HOME.FIELD_PLACEHOLDER_FILTER' | translate" placeholder="'HOME.FIELD_PLACEHOLDER_FILTER' | translate"
connection-properties="filteredConnectionProperties" connection-properties="filteredConnectionProperties"
connection-group-properties="filteredConnectionGroupProperties"></guac-group-list-filter> connection-group-properties="filteredConnectionGroupProperties"></guac-group-list-filter>
<guac-user-menu></guac-user-menu>
</div> </div>
<div class="all-connections"> <div class="all-connections">
<guac-group-list <guac-group-list

View File

@@ -78,9 +78,8 @@ h2 {
margin-bottom: 0; margin-bottom: 0;
} }
.header ~ * .header, .header:not(.ng-hide) ~ * .header,
.header ~ .header { .header:not(.ng-hide) ~ .header {
margin-top: 0;
border-top: 1px solid rgba(0, 0, 0, 0.125); border-top: 1px solid rgba(0, 0, 0, 0.125);
} }
@@ -106,3 +105,7 @@ h2 {
border-left: 1px solid rgba(0, 0, 0, 0.125); border-left: 1px solid rgba(0, 0, 0, 0.125);
background-color: transparent; background-color: transparent;
} }
.header:not(.ng-hide) ~ .header .user-menu {
display: none;
}