Browse Source

Fix background images bug.

sisyphus
Dustin Falgout 7 years ago
parent
commit
ed96578c14
No known key found for this signature in database
GPG Key ID: AEA529BF122902E5
  1. 4
      themes/default/js/greeter.js
  2. 2
      web-greeter/bridge/ThemeUtils.py

4
themes/default/js/greeter.js vendored

@ -193,14 +193,14 @@ class ThemeConfig {
this.logo = greeter_config.branding.logo || 'img/antergos.png';
this.user_image = greeter_config.branding.user_image || 'img/antergos-logo-user.png';
this.background_images_dir = greeter_config.branding.background_images || '/usr/share/backgrounds';
this.background_images_dir = greeter_config.branding.background_images_dir || '/usr/share/backgrounds';
this.debug = greeter_config.greeter.debug_mode || false;
this.background_images = this._get( 'background_manager', 'background_images' );
this.images_cache_expires = moment.unix( parseInt( this._get( 'background_manager', 'cache_expires' ) ) );
let expired = ( null === this.background_images || ! this.images_cache_expires.isValid() || moment().isAfter( this.images_cache_expires ) );
if ( ! expired || ! this.background_images_dir ) {
if ( this.background_images && this.background_images.length > 0 && ! expired ) {
this.background_images = JSON.parse( this.background_images );
return callback();
}

2
web-greeter/bridge/ThemeUtils.py

@ -74,7 +74,7 @@ class ThemeUtils(BridgeObject):
return []
if only_images:
file_types = ('jpg', 'jpeg', 'png', 'gif', 'bmp')
file_types = ('jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp')
result = [
glob('{0}/**/*.{1}'.format(dir_path, ftype), recursive=True)
for ftype in file_types

Loading…
Cancel
Save