Merge 1.1.0 changes back to master.

This commit is contained in:
Michael Jumper
2019-06-07 09:01:40 -07:00
17 changed files with 519 additions and 9 deletions

View File

@@ -42,6 +42,7 @@ angular.module('client').factory('ManagedClient', ['$rootScope', '$injector',
var authenticationService = $injector.get('authenticationService');
var connectionGroupService = $injector.get('connectionGroupService');
var connectionService = $injector.get('connectionService');
var preferenceService = $injector.get('preferenceService');
var requestService = $injector.get('requestService');
var tunnelService = $injector.get('tunnelService');
var guacAudio = $injector.get('guacAudio');
@@ -235,6 +236,7 @@ angular.module('client').factory('ManagedClient', ['$rootScope', '$injector',
+ "&GUAC_WIDTH=" + Math.floor(optimal_width)
+ "&GUAC_HEIGHT=" + Math.floor(optimal_height)
+ "&GUAC_DPI=" + Math.floor(optimal_dpi)
+ "&GUAC_TIMEZONE=" + encodeURIComponent(preferenceService.preferences.timezone)
+ (connectionParameters ? '&' + connectionParameters : '');
// Add audio mimetypes to connect string

View File

@@ -98,6 +98,18 @@ angular.module('settings').provider('preferenceService', ['$injector',
return language.replace(/-/g, '_');
};
/**
* Return the timezone detected for the current browser session
* by the JSTZ timezone library.
*
* @returns String
* The name of the currently-detected timezone in IANA zone key
* format (Olson time zone database).
*/
var getDetectedTimezone = function getDetectedTimezone() {
return jstz.determine().name();
};
/**
* All currently-set preferences, as name/value pairs. Each property name
@@ -128,7 +140,15 @@ angular.module('settings').provider('preferenceService', ['$injector',
*
* @type String
*/
language : getDefaultLanguageKey()
language : getDefaultLanguageKey(),
/**
* The timezone set by the user, in IANA zone key format (Olson time
* zone database).
*
* @type String
*/
timezone : getDetectedTimezone()
};

View File

@@ -18,7 +18,7 @@
*/
.preferences .update-password .form,
.preferences .language .form {
.preferences .locale .form {
padding-left: 0.5em;
border-left: 3px solid rgba(0, 0, 0, 0.125);
}

View File

@@ -1,8 +1,8 @@
<div class="preferences" ng-class="{loading: !isLoaded()}">
<!-- Language settings -->
<div class="settings section language">
<p>{{'SETTINGS_PREFERENCES.HELP_LANGUAGE' | translate}}</p>
<!-- Locale settings -->
<div class="settings section locale">
<p>{{'SETTINGS_PREFERENCES.HELP_LOCALE' | translate}}</p>
<!-- Language selection -->
<div class="form">
@@ -13,6 +13,15 @@
</tr>
</table>
</div>
<!-- Timezone selection -->
<div class="form">
<guac-form-field
field="{ 'type' : 'TIMEZONE', 'name' : 'timezone' }"
model="preferences.timezone"
namespace="'SETTINGS_PREFERENCES'">
</guac-form-field>
</div>
</div>
<!-- Password update -->