mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-823: Restructure home screen connection groups to match connections.
This commit is contained in:
@@ -145,7 +145,7 @@ angular.module('groupList').factory('GroupListItem', ['$injector', function defi
|
|||||||
});
|
});
|
||||||
|
|
||||||
// If the item is a connection group, generate a connection group identifier
|
// If the item is a connection group, generate a connection group identifier
|
||||||
if (this.type === GroupListItem.Type.CONNECTION_GROUP)
|
if (this.type === GroupListItem.Type.CONNECTION_GROUP && this.balancing)
|
||||||
return ClientIdentifier.toString({
|
return ClientIdentifier.toString({
|
||||||
dataSource : this.dataSource,
|
dataSource : this.dataSource,
|
||||||
type : ClientIdentifier.Types.CONNECTION_GROUP,
|
type : ClientIdentifier.Types.CONNECTION_GROUP,
|
||||||
@@ -157,6 +157,27 @@ angular.module('groupList').factory('GroupListItem', ['$injector', function defi
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the relative URL of the client page that connects to the
|
||||||
|
* connection or connection group represented by this GroupListItem.
|
||||||
|
*
|
||||||
|
* @returns {String}
|
||||||
|
* The relative URL of the client page that connects to the
|
||||||
|
* connection or connection group represented by this GroupListItem,
|
||||||
|
* or null if this GroupListItem cannot be connected to.
|
||||||
|
*/
|
||||||
|
this.getClientURL = template.getClientURL || function getClientURL() {
|
||||||
|
|
||||||
|
// There is a client page for this item only if it has an
|
||||||
|
// associated client identifier
|
||||||
|
var identifier = this.getClientIdentifier();
|
||||||
|
if (identifier)
|
||||||
|
return '#/client/' + encodeURIComponent(identifier);
|
||||||
|
|
||||||
|
return null;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The connection, connection group, or sharing profile whose data is
|
* The connection, connection group, or sharing profile whose data is
|
||||||
* exposed within this GroupListItem. If the type of this GroupListItem
|
* exposed within this GroupListItem. If the type of this GroupListItem
|
||||||
|
@@ -54,3 +54,13 @@ div.recent-connections div.connection {
|
|||||||
a.home-connection {
|
a.home-connection {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Show only expand/collapse icon for connection groups on home screen */
|
||||||
|
|
||||||
|
.all-connections .connection-group > .caption .icon {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.all-connections .connection-group > .caption .icon.expand {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<a class="home-connection"
|
<a class="home-connection"
|
||||||
ng-href="#/client/{{ item.getClientIdentifier() }}"
|
ng-href="{{ item.getClientURL() }}"
|
||||||
ng-class="{active: item.getActiveConnections()}">
|
ng-class="{active: item.getActiveConnections()}">
|
||||||
|
|
||||||
<!-- Connection icon -->
|
<!-- Connection icon -->
|
||||||
|
@@ -1,4 +1,10 @@
|
|||||||
<span class="home-connection-group name">
|
<a class="home-connection-group"
|
||||||
<a ng-show="item.balancing" ng-href="#/client/{{ item.getClientIdentifier() }}">{{item.name}}</a>
|
ng-href="{{ item.getClientURL() }}">
|
||||||
<span ng-show="!item.balancing">{{item.name}}</span>
|
|
||||||
</span>
|
<!-- Connection group icon -->
|
||||||
|
<div ng-show="item.balancing" class="icon type balancer"></div>
|
||||||
|
|
||||||
|
<!-- Connection group name -->
|
||||||
|
<span class="name">{{item.name}}</span>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
Reference in New Issue
Block a user