diff --git a/themes/antergos/css/style.css b/themes/antergos/css/style.css
index 3a583f9..d1316c3 100644
--- a/themes/antergos/css/style.css
+++ b/themes/antergos/css/style.css
@@ -29,13 +29,12 @@
/* Global Styles */
@font-face {
- font-family: Lato;
- src: url('../fonts/TTF/Lato-Regular.ttf');
+ font-family: 'Open Sans';
+ src: url('../fonts/TTF/OpenSans-Regular.ttf');
}
-
@font-face {
- font-family: LatoLight;
- src: url('../fonts/TTF/Lato-Light.ttf');
+ font-family: 'Open Sans Light';
+ src: url('../fonts/TTF/OpenSans-Light.ttf');
}
*:focus {
@@ -89,7 +88,7 @@ body {
height: 100%;
width: 100%;
background-color: #000000;
- font-family: "Lato", "Open Sans", sans-serif;
+ font-family: "Open Sans", sans-serif;
}
i {
@@ -97,7 +96,7 @@ i {
}
h3, .panel-heading {
- font-family: "Lato", "Open Sans", sans-serif;
+ font-family: "Open Sans", sans-serif;
font-size: 16px;
text-align: center;
font-weight: 400;
@@ -203,7 +202,7 @@ a {
height: 100%;
width: 100%;
position: relative;
- background-image: url('');
+ background-color: #000000;
background-size: cover !important;
background-repeat: no-repeat !important;
background-position: center !important;
@@ -230,7 +229,7 @@ a {
/* Clock Widget */
.time {
- font-family: "LatoLight", "Open Sans", sans-serif;
+ font-family: "Open Sans Light", sans-serif;
font-size: 96px;
line-height: 1em;
text-decoration: none;
diff --git a/themes/antergos/fonts/TTF/Lato-Light.ttf b/themes/antergos/fonts/TTF/Lato-Light.ttf
deleted file mode 100644
index a958067..0000000
Binary files a/themes/antergos/fonts/TTF/Lato-Light.ttf and /dev/null differ
diff --git a/themes/antergos/fonts/TTF/Lato-Regular.ttf b/themes/antergos/fonts/TTF/Lato-Regular.ttf
deleted file mode 100644
index 04ea8ef..0000000
Binary files a/themes/antergos/fonts/TTF/Lato-Regular.ttf and /dev/null differ
diff --git a/themes/antergos/index.theme b/themes/antergos/index.theme
index 29b6584..894ab06 100644
--- a/themes/antergos/index.theme
+++ b/themes/antergos/index.theme
@@ -1,6 +1,6 @@
[theme]
name=Antergos
-version=2.3.2
+version=2.4.0
description=Antergos Theme
engine=lightdm-webkit2-greeter
url=index.html
diff --git a/themes/antergos/js/greeter-compiled.js b/themes/antergos/js/greeter-compiled.js
index d4a3862..e3fa253 100644
--- a/themes/antergos/js/greeter-compiled.js
+++ b/themes/antergos/js/greeter-compiled.js
@@ -182,12 +182,14 @@ var GreeterThemeComponent = (function () {
key: 'init_config_values',
value: function init_config_values() {
var logo = '',
+ user_image = '',
background_images = [],
background_images_dir = '';
if ('undefined' !== typeof config) {
if (this instanceof AntergosTheme) {
logo = config.get_str('branding', 'logo') || '';
+ user_image = config.get_str('branding', 'user_image') || '';
} else if (this instanceof AntergosBackgroundManager) {
background_images_dir = config.get_str('branding', 'background_images') || '';
if (background_images_dir) {
@@ -229,6 +231,7 @@ var GreeterThemeComponent = (function () {
}
this.logo = logo;
+ this.user_image = user_image;
this.background_images = background_images;
this.background_images_dir = background_images_dir;
}
@@ -255,7 +258,7 @@ var AntergosBackgroundManager = (function (_GreeterThemeComponen) {
_bg_self = _this;
}
- _this.current_background = _this.cache_get('background_config', 'current_background');
+ _this.current_background = _this.cache_get('background_manager', 'current_background');
if (!_this.background_images_dir.length || !_this.background_images.length) {
_this.log('AntergosBackgroundManager: [ERROR] No background images detected.');
@@ -263,10 +266,7 @@ var AntergosBackgroundManager = (function (_GreeterThemeComponen) {
$('.header').fadeTo(300, 0.5, function () {
$('.header').css("background", '#000000');
}).fadeTo(300, 1);
- } else {
- _this.initialize();
}
-
return _ret = _bg_self, _possibleConstructorReturn(_this, _ret);
}
@@ -295,11 +295,18 @@ var AntergosBackgroundManager = (function (_GreeterThemeComponen) {
if ('true' === random_background || !current_background) {
current_background = this.get_random_image();
}
+
this.current_background = current_background;
}
+ this.do_background();
+ }
+ }, {
+ key: 'do_background',
+ value: function do_background() {
$('.header').fadeTo(300, 0.5, function () {
- $('.header').css("background", this.current_background);
+ var tpl = 'url(\'file://' + this.current_background + '\')';
+ $('.header').css("background-image", tpl);
}).fadeTo(300, 1);
}
}, {
@@ -324,12 +331,13 @@ var AntergosBackgroundManager = (function (_GreeterThemeComponen) {
var image_file = _step4.value;
var $link = $(''),
- $img_el = $link.children('img');
+ $img_el = $link.children('img'),
+ tpl = 'file://' + image_file;
- $link.addClass('bg clearfix').attr('data-img', image_file);
- $img_el.attr('src', image_file);
+ $link.addClass('bg clearfix').attr('data-img', tpl);
+ $img_el.attr('src', tpl);
- $link.appendTo($('.bgs'));
+ $link.appendTo($('.bgs')).click(this.background_selected_handler);
}
} catch (err) {
_didIteratorError4 = true;
@@ -347,6 +355,21 @@ var AntergosBackgroundManager = (function (_GreeterThemeComponen) {
}
}
}
+ }, {
+ key: 'background_selected_handler',
+ value: function background_selected_handler(event) {
+ var img = $(this).attr('data-img');
+
+ if ('random' === img) {
+ this.cache_set('true', 'background_manager', 'randmom_background');
+ img = this.get_random_image();
+ }
+
+ this.cache_set(img, 'background_manager', 'current_background');
+ this.current_background = img;
+
+ this.do_background();
+ }
}]);
return AntergosBackgroundManager;
@@ -369,6 +392,7 @@ var AntergosTheme = (function (_GreeterThemeComponen2) {
if (null === _self) {
_self = _this2;
}
+ _this2.tux = 'img/antergos-logo-user.png';
_this2.user_list_visible = false;
_this2.auth_pending = false;
_this2.selected_user = null;
@@ -381,6 +405,7 @@ var AntergosTheme = (function (_GreeterThemeComponen2) {
_this2.$msg_area = $('#showMsg');
_this2.background_manager = new AntergosBackgroundManager();
+ _this2.background_manager.initialize();
_this2.initialize();
return _ret2 = _self, _possibleConstructorReturn(_this2, _ret2);
@@ -431,8 +456,7 @@ var AntergosTheme = (function (_GreeterThemeComponen2) {
}, {
key: 'prepare_user_list',
value: function prepare_user_list() {
- var tux = 'img/antergos-logo-user.png',
- template;
+ var template;
// Loop through the array of LightDMUser objects to create our user list.
var _iteratorNormalCompletion5 = true;
@@ -444,7 +468,7 @@ var AntergosTheme = (function (_GreeterThemeComponen2) {
var user = _step5.value;
var last_session = this.cache_get('user', user.name, 'session'),
- image_src = user.image.length ? user.image : tux;
+ image_src = user.image.length ? user.image : this.user_image;
if (null === last_session) {
// For backwards compatibility
@@ -462,7 +486,7 @@ var AntergosTheme = (function (_GreeterThemeComponen2) {
template = '\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t' + user.display_name + '\n\t\t\t\t\t\n\t\t\t\t';
// Register event handler here so we don't have to iterate over the users again later.
- $(template).appendTo(this.$user_list).click(this.start_authentication);
+ $(template).appendTo(this.$user_list).click(this.start_authentication).on('error.antergos', this.user_image_error_handler);
} // END for ( var user of lightdm.users )
} catch (err) {
_didIteratorError5 = true;
@@ -856,6 +880,12 @@ var AntergosTheme = (function (_GreeterThemeComponen2) {
value: function user_list_collapse_handler() {
_self.user_list_visible = _self.$user_list.hasClass('in') ? true : false;
}
+ }, {
+ key: 'user_image_error_handler',
+ value: function user_image_error_handler(event) {
+ $(this).off('error.antergos');
+ $(this).attr('src', _self.tux);
+ }
/**
* LightDM Callback - Show password prompt to user.
diff --git a/themes/antergos/js/greeter-compiled.js.map b/themes/antergos/js/greeter-compiled.js.map
index 4f048f7..1b9d03c 100644
--- a/themes/antergos/js/greeter-compiled.js.map
+++ b/themes/antergos/js/greeter-compiled.js.map
@@ -1 +1 @@
-{"version":3,"sources":["greeter.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,IAAI,KAAK,GAAG,IAAI,CAAC;AACjB,IAAI,QAAQ,GAAG,IAAI;;;;;;;AAAC,AAQpB,MAAM,CAAC,SAAS,CAAC,UAAU,GAAG,YAAW;AACxC,QAAO,IAAI,CAAC,MAAM,CAAE,CAAC,CAAE,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAE,CAAC,CAAE,CAAC;CACxD;;;;;AAAC;IAUI,qBAAqB;AAE1B,UAFK,qBAAqB,GAEZ;wBAFT,qBAAqB;;AAGzB,MAAI,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,CAAE,OA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I,CAAC,MAAM,GAAG,CAAC,EAAG;AACtB,KAAC,CAAE,IAAI,CAAC,SAAS,CAAE,CAAC,IAAI,CAAE,IAAI,CAAE,CAAC;AACjC,KAAC,CAAE,eAAe,CAAE,CAAC,IAAI,EAAE,CAAC;AAC5B,KAAC,CAAE,IAAI,CAAC,mBAAmB,CAAE,CAAC,IAAI,EAAE,CAAC;IACrC;GACD;;;QA/YI,aAAa;GAAS,qBAAqB;;;;;;AAsZjD,CAAC,CAAE,MAAM,CAAE,CAAC,IAAI,CAAE,YAAM;AACvB,MAAK,GAAG,IAAI,aAAa,EAAE,CAAC;CAC5B,CAAE,CAAC","file":"greeter-compiled.js","sourcesContent":["/*\n *\n * Copyright © 2015-2016 Antergos\n *\n * greeter.js\n *\n * This file is part of lightdm-webkit-theme-antergos\n *\n * lightdm-webkit-theme-antergos is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License,\n * or any later version.\n *\n * lightdm-webkit-theme-antergos is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * The following additional terms are in effect as per Section 7 of this license:\n *\n * The preservation of all legal notices and author attributions in\n * the material or in the Appropriate Legal Notices displayed\n * by works containing it is required.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n\n/**\n * This is used to access our classes from within jQuery callbacks.\n */\nlet _self = null;\nlet _bg_self = null;\n\n\n/**\n * Capitalize a string.\n *\n * @returns {string}\n */\nString.prototype.capitalize = function() {\n\treturn this.charAt( 0 ).toUpperCase() + this.slice( 1 );\n};\n\n\n\n\n\n\n/**\n * This is the base class for the theme's components.\n */\nclass GreeterThemeComponent {\n\n\tconstructor() {\n\t\tthis.debug = this.cache_get( 'debug', 'enabled' );\n\t\tthis.lang = window.navigator.language.split( '-' )[ 0 ].toLowerCase();\n\t\tthis.translations = window.ant_translations;\n\n\t\tif ( 'undefined' === typeof window.navigator.languages ) {\n\t\t\twindow.navigator.languages = [ window.navigator.language ];\n\t\t}\n\n\t\tthis.init_config_values();\n\t}\n\n\n\t/**\n\t * Add text to the debug log element (accessible from the login screen).\n\t *\n\t * @param {string} text - To be added to the log.\n\t */\n\tlog( text ) {\n\t\tif ( 'true' === this.debug ) {\n\t\t\tconsole.log( text );\n\t\t}\n\t\t$( '#logArea' ).append( `${text}
` );\n\t}\n\n\n\t/**\n\t * Get a key's value from localStorage. Keys can have two or more parts.\n\t * For example: \"ant:user:john:session\".\n\t *\n\t * @param {...string} key_parts - Strings that are combined to form the key.\n\t */\n\tcache_get( ...key_parts ) {\n\t\tvar key = `ant`;\n\n\t\tfor ( var part of key_parts ) {\n\t\t\tkey += `:${part}`;\n\t\t}\n\t\treturn localStorage.getItem( key );\n\t}\n\n\n\t/**\n\t * Set a key's value in localStorage. Keys can have two or more parts.\n\t * For example: \"ant:user:john:session\".\n\t *\n\t * @param {string} value - The value to set.\n\t * @param {...string} key_parts - Strings that are combined to form the key.\n\t */\n\tcache_set( value, ...key_parts ) {\n\t\tvar key = `ant`;\n\n\t\tfor ( var part of key_parts ) {\n\t\t\tkey += `:${part}`;\n\t\t}\n\t\treturn localStorage.setItem( key, value );\n\t}\n\n\n\t/**\n\t * Get some values from `lightdm-webkit2-greeter.conf` and save them for later.\n\t */\n\tinit_config_values() {\n\t\tlet logo = '', background_images = [], background_images_dir = '';\n\n\t\tif ( 'undefined' !== typeof config ) {\n\t\t\tif ( this instanceof AntergosTheme ) {\n\t\t\t\tlogo = config.get_str( 'branding', 'logo' ) || '';\n\n\t\t\t} else if ( this instanceof AntergosBackgroundManager ) {\n\t\t\t\tbackground_images_dir = config.get_str( 'branding', 'background_images' ) || '';\n\t\t\t\tif (background_images_dir) {\n\t\t\t\t\tbackground_images = greeterutil.dirlist(background_images_dir) || [];\n\t\t\t\t}\n\n\t\t\t\tif (background_images.length) {\n\t\t\t\t\tlet images = [];\n\t\t\t\t\tfor (var file of background_images) {\n\t\t\t\t\t\tif (file.match(/(png|PNG)|(jpg|JPEG)|(bmp|BMP)/)) {\n\t\t\t\t\t\t\timages.push(file);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbackground_images = images;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.logo = logo;\n\t\tthis.background_images = background_images;\n\t\tthis.background_images_dir = background_images_dir;\n\t}\n}\n\n\n\n\n\n\n/**\n * This class handles the theme's background switcher.\n */\nclass AntergosBackgroundManager extends GreeterThemeComponent {\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tif ( null === _bg_self ) {\n\t\t\t_bg_self = this;\n\t\t}\n\n\t\tthis.current_background = this.cache_get( 'background_config', 'current_background' );\n\n\t\tif ( ! this.background_images_dir.length || ! this.background_images.length ) {\n\t\t\tthis.log('AntergosBackgroundManager: [ERROR] No background images detected.');\n\n\t\t\t$( '.header' ).fadeTo( 300, 0.5, function() {\n\t\t\t\t$( '.header' ).css( \"background\", '#000000' );\n\t\t\t} ).fadeTo( 300, 1 );\n\n\t\t} else {\n\t\t\tthis.initialize();\n\t\t}\n\n\t\treturn _bg_self;\n\t}\n\n\n\tinitialize() {\n\t\tif ( ! this.current_background ) {\n\t\t\t// For backwards compatibility\n\t\t\tif ( null !== localStorage.getItem( 'bgsaved' ) && '0' === localStorage.getItem( 'bgrandom' ) ) {\n\t\t\t\tthis.current_background = localStorage.getItem( 'bgsaved' );\n\t\t\t\tthis.cache_set( this.current_background, 'background_manager', 'current_background' );\n\t\t\t\tlocalStorage.removeItem( 'bgrandom' );\n\t\t\t\tlocalStorage.removeItem( 'bgsaved' );\n\t\t\t} else if ( '0' === localStorage.getItem( 'bgrandom' ) ) {\n\t\t\t\tthis.current_background = this.get_random_image();\n\t\t\t\tthis.cache_set( 'true', 'background_manager', 'random_background' );\n\t\t\t\tlocalStorage.removeItem( 'bgrandom' );\n\t\t\t}\n\t\t}\n\n\t\tif ( ! this.current_background ) {\n\t\t\t// For current and future versions\n\t\t\tlet current_background = this.cache_get('background_manager', 'current_background' ),\n\t\t\t\trandom_background = this.cache_get('background_manager', 'random_background' );\n\n\t\t\tif ( 'true' === random_background || ! current_background ) {\n\t\t\t\tcurrent_background = this.get_random_image();\n\t\t\t}\n\t\t\tthis.current_background = current_background;\n\t\t}\n\n\t\t$( '.header' ).fadeTo( 300, 0.5, function() {\n\t\t\t$( '.header' ).css( \"background\", this.current_background );\n\t\t} ).fadeTo( 300, 1 );\n\t}\n\n\n\tget_random_image() {\n\t\tlet random_bg;\n\n\t\trandom_bg = Math.floor( Math.random() * this.background_images.length );\n\n\t\treturn this.background_images[ random_bg ];\n\t}\n\n\tsetup_background_thumbnails() {\n\t\tif (this.background_images.length) {\n\t\t\tfor ( var image_file of this.background_images ) {\n\t\t\t\tlet $link = $(''),\n\t\t\t\t\t$img_el = $link.children('img');\n\n\t\t\t\t$link.addClass('bg clearfix').attr('data-img', image_file);\n\t\t\t\t$img_el.attr('src', image_file);\n\n\t\t\t\t$link.appendTo($('.bgs'));\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n\n\n\n\n/**\n * This is the theme's main class object. It contains almost all the theme's logic.\n */\nclass AntergosTheme extends GreeterThemeComponent {\n\n\tconstructor() {\n\t\tsuper();\n\t\tif ( null === _self ) {\n\t\t\t_self = this;\n\t\t}\n\t\tthis.user_list_visible = false;\n\t\tthis.auth_pending = false;\n\t\tthis.selected_user = null;\n\t\tthis.$user_list = $( '#user-list2' );\n\t\tthis.$session_list = $( '#sessions' );\n\t\tthis.$clock_container = $( '#collapseOne' );\n\t\tthis.$clock = $( \"#current_time\" );\n\t\tthis.$actions_container = $( \"#actionsArea\" );\n\t\tthis.$msg_area_container = $( '#statusArea' );\n\t\tthis.$msg_area = $( '#showMsg' );\n\t\tthis.background_manager = new AntergosBackgroundManager();\n\n\t\tthis.initialize();\n\n\t\treturn _self;\n\t}\n\n\tinitialize() {\n\t\tthis.prepare_translations();\n\t\tthis.do_static_translations();\n\t\tthis.initialize_clock();\n\t\tthis.prepare_login_panel_header();\n\t\tthis.prepare_user_list();\n\t\tthis.prepare_session_list();\n\t\tthis.prepare_system_action_buttons();\n\t\t$( \"#login\" ).addClass( \"in\" );\n\t\tthis.register_callbacks();\n\t\tthis.background_manager.setup_background_thumbnails();\n\t}\n\n\n\t/**\n\t * Register callbacks for the LDM Greeter as well as any others that haven't been registered\n\t * elsewhere.\n\t */\n\tregister_callbacks() {\n\t\tvar events = 'shown.bs.collapse, hidden.bs.collapse';\n\n\t\tthis.$user_list.parents( '.collapse' ).on( events, this.user_list_collapse_handler );\n\t\t$( document ).keydown( this.key_press_handler );\n\t\t$( '.cancel_auth' ).click( this.cancel_authentication );\n\t\t$( '.submit_passwd' ).click( this.submit_password );\n\n\t\twindow.show_prompt = this.show_prompt;\n\t\twindow.show_message = this.show_message;\n\t\twindow.start_authentication = this.start_authentication;\n\t\twindow.cancel_authentication = this.cancel_authentication;\n\t\twindow.authentication_complete = this.authentication_complete;\n\t\twindow.autologin_timer_expired = this.cancel_authentication;\n\t}\n\n\t/**\n\t * Initialize the user list.\n\t */\n\tprepare_user_list() {\n\t\tvar tux = 'img/antergos-logo-user.png',\n\t\t\ttemplate;\n\n\t\t// Loop through the array of LightDMUser objects to create our user list.\n\t\tfor ( var user of lightdm.users ) {\n\t\t\tvar last_session = this.cache_get( 'user', user.name, 'session' ),\n\t\t\t\timage_src = user.image.length ? user.image : tux;\n\n\t\t\tif ( null === last_session ) {\n\t\t\t\t// For backwards compatibility\n\t\t\t\tlast_session = localStorage.getItem( user.name );\n\t\t\t\tif ( null === last_session ) {\n\t\t\t\t\t// This user has never logged in before let's enable the system's default\n\t\t\t\t\t// session.\n\t\t\t\t\tlast_session = lightdm.default_session;\n\t\t\t\t}\n\t\t\t\tthis.cache_set( last_session, 'user', user.name, 'session' );\n\t\t\t}\n\n\t\t\tthis.log( `Last session for ${user.name} was: ${last_session}` );\n\n\t\t\ttemplate = `\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t${user.display_name}\n\t\t\t\t\t\n\t\t\t\t`;\n\n\t\t\t// Register event handler here so we don't have to iterate over the users again later.\n\t\t\t$( template ).appendTo( this.$user_list ).click( this.start_authentication );\n\n\t\t} // END for ( var user of lightdm.users )\n\n\t\tif ( $( this.$user_list ).children().length > 3 ) {\n\t\t\t// Make the user list two columns instead of one.\n\t\t\t$( this.$user_list ).css( 'column-count', '2' ).parent().css( 'max-width', '85%' );\n\t\t}\n\n\t}\n\n\t/**\n\t * Initialize the session selection dropdown.\n\t */\n\tprepare_session_list() {\n\t\t// Loop through the array of LightDMSession objects to create our session list.\n\t\tfor ( var session of lightdm.sessions ) {\n\t\t\tvar css_class = session.name.replace( / /g, '' ),\n\t\t\t\ttemplate;\n\n\t\t\tthis.log( `Adding ${session.name} to the session list...` );\n\n\t\t\ttemplate = `\n\t\t\t\t
\n\t\t\t\t\t${session.name}\n\t\t\t\t`;\n\n\t\t\t$( template ).appendTo( this.$session_list ).click( this.session_toggle_handler );\n\n\t\t} // END for (var session of lightdm.sessions)\n\n\t\t$( '.dropdown-toggle' ).dropdown();\n\t}\n\n\t/**\n\t * Initialize the system action buttons\n\t */\n\tprepare_system_action_buttons() {\n\t\tvar actions = {\n\t\t\t\tshutdown: \"power-off\",\n\t\t\t\thibernate: \"asterisk\",\n\t\t\t\tsuspend: \"arrow-down\",\n\t\t\t\trestart: \"refresh\"\n\t\t\t},\n\t\t\ttemplate;\n\n\t\tfor ( var action of Object.keys( actions ) ) {\n\t\t\tvar cmd = `can_${action}`;\n\n\t\t\ttemplate = `\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t`;\n\n\t\t\tif ( lightdm[ cmd ] ) {\n\t\t\t\t$( template ).appendTo( $( this.$actions_container ) ).click( this.system_action_handler );\n\t\t\t}\n\t\t} // END for (var [action, icon] of actions)\n\n\t\t$( '[data-toggle=tooltip]' ).tooltip();\n\t\t$('.modal').modal({show: false});\n\t}\n\n\tinitialize_clock() {\n\t\tvar saved_format = this.cache_get( 'clock', 'time_format' ),\n\t\t\tformat = (null !== saved_format) ? saved_format : 'LT';\n\n\t\tmoment.locale( window.navigator.languages );\n\t\tthis.$clock.html( moment().format( format ) );\n\n\t\tsetInterval( () => {\n\t\t\tthis.$clock.html( moment().format( format ) );\n\t\t}, 60000 );\n\t}\n\n\n\t/**\n\t * Show the user list if its not already shown. This is used to allow the user to\n\t * display the user list by pressing Enter or Spacebar.\n\t */\n\tshow_user_list() {\n\t\tif ( $( this.$clock_container ).hasClass( 'in' ) ) {\n\t\t\t$( '#trigger' ).trigger( 'click' );\n\t\t}\n\t\tif ( $( this.$user_list ).length <= 1 ) {\n\t\t\t$( this.$user_list ).find( 'a' ).trigger( 'click', this );\n\t\t}\n\t}\n\n\n\tprepare_login_panel_header() {\n\t\tvar greeting = (this.translations.greeting) ? this.translations.greeting : 'Welcome!',\n\t\t\tlogo = ( '' !== this.logo ) ? this.logo : 'img/antergos.png';\n\n\t\t$( '.welcome' ).text( greeting );\n\t\t$( '#hostname' ).append( lightdm.hostname );\n\t\t$('[data-greeter-config=\"logo\"]').attr('src', logo);\n\t}\n\n\n\tprepare_translations() {\n\t\tif ( ! this.translations.hasOwnProperty( this.lang ) ) {\n\t\t\tfor ( var lang of window.navigator.languages ) {\n\t\t\t\tif ( this.translations.hasOwnProperty( lang ) ) {\n\t\t\t\t\tthis.lang = lang;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ( ! this.translations.hasOwnProperty( this.lang ) ) {\n\t\t\tthis.lang = 'en';\n\t\t}\n\n\t\tthis.translations = this.translations[ this.lang ];\n\t}\n\n\n\t/**\n\t * Replace '${i18n}' with translated string for all elements that\n\t * have the data-i18n attribute. This is for elements that are not generated\n\t * dynamically (they can be found in index.html).\n\t */\n\tdo_static_translations() {\n\t\t$( '[data-i18n]' ).each( function() {\n\t\t\tvar key = $( this ).attr( 'data-i18n' ),\n\t\t\t\thtml = $( this ).html(),\n\t\t\t\ttranslated = _self.translations[ key ],\n\t\t\t\tnew_html = html.replace( '${i18n}', translated );\n\n\t\t\t$( this ).html( new_html );\n\t\t} );\n\t}\n\n\n\t/**\n\t * Start the authentication process for the selected user.\n\t *\n\t * @param {object} event - jQuery.Event object from 'click' event.\n\t */\n\tstart_authentication( event ) {\n\t\tvar user_id = $( this ).attr( 'id' ),\n\t\t\tselector = `.${user_id}`,\n\t\t\tuser_session = _self.cache_get( 'user', user_id, 'session' );\n\n\t\tif ( _self.auth_pending || null !== _self.selected_user ) {\n\t\t\tlightdm.cancel_authentication();\n\t\t\t_self.log( `Authentication cancelled for ${_self.selected_user}` );\n\t\t\t_self.selected_user = null;\n\t\t}\n\n\t\t_self.log( `Starting authentication for ${user_id}.` );\n\t\t_self.selected_user = user_id;\n\n\t\t// CSS hack to workaround webkit bug\n\t\tif ( $( _self.$user_list ).children().length > 3 ) {\n\t\t\t$( _self.$user_list ).css( 'column-count', 'initial' ).parent().css( 'max-width', '50%' );\n\t\t}\n\t\t$( selector ).addClass( 'hovered' ).siblings().hide();\n\t\t$( '.fa-toggle-down' ).hide();\n\n\t\t_self.log( `Session for ${user_id} is ${user_session}` );\n\n\t\t$( `[data-session-id=\"${user_session}\"]` ).parent().trigger( 'click', this );\n\n\t\t$( '#session-list' ).removeClass( 'hidden' ).show();\n\t\t$( '#passwordArea' ).show();\n\t\t$( '.dropdown-toggle' ).dropdown();\n\n\t\t_self.auth_pending = true;\n\n\t\tlightdm.authenticate( user_id );\n\t}\n\n\n\t/**\n\t * Cancel the pending authentication.\n\t *\n\t * @param {object} event - jQuery.Event object from 'click' event.\n\t */\n\tcancel_authentication( event ) {\n\t\tvar selectors = [ '#statusArea', '#timerArea', '#passwordArea', '#session-list' ];\n\n\t\tfor ( var selector of selectors ) {\n\t\t\t$( selector ).hide();\n\t\t}\n\n\t\tlightdm.cancel_authentication();\n\n\t\t_self.log( 'Cancelled authentication.' );\n\n\t\t// CSS hack to work-around webkit bug\n\t\tif ( $( _self.$user_list ).children().length > 3 ) {\n\t\t\t$( _self.$user_list ).css( 'column-count', '2' ).parent().css( 'max-width', '85%' );\n\t\t}\n\n\t\t$( '.hovered' ).removeClass( 'hovered' ).siblings().show();\n\t\t$( '.fa-toggle-down' ).show();\n\n\t\t_self.selected_user = null;\n\t\t_self.auth_pending = false;\n\n\t}\n\n\n\t/**\n\t * Called when the user attempts to authenticate (inputs password).\n\t * We check to see if the user successfully authenticated and if so tell the LDM\n\t * Greeter to log them in with the session they selected.\n\t */\n\tauthentication_complete() {\n\t\tvar selected_session = $( '.selected' ).attr( 'data-session-id' ),\n\t\t\terr_msg = _self.translations.auth_failed[ _self.lang ];\n\n\t\t_self.auth_pending = false;\n\t\t_self.cache_set( selected_session, 'user', lightdm.authentication_user, 'session' );\n\n\t\t$( '#timerArea' ).hide();\n\n\t\tif ( lightdm.is_authenticated ) {\n\t\t\t// The user entered the correct password. Let's log them in.\n\t\t\t$('body').fadeOut(1000);\n\t\t\tlightdm.login( lightdm.authentication_user, selected_session );\n\t\t} else {\n\t\t\t// The user did not enter the correct password. Show error message.\n\t\t\t$( '#statusArea' ).show();\n\t\t}\n\t}\n\n\tsubmit_password( event ) {\n\t\tlightdm.respond( $( '#passwordField' ).val() );\n\t\t$( '#passwordArea' ).hide();\n\t\t$( '#timerArea' ).show();\n\t}\n\n\tsession_toggle_handler( event ) {\n\t\tvar $session = $( this ).children( 'a' ),\n\t\t\tsession_name = $session.text(),\n\t\t\tsession_key = $session.attr( 'data-session-id' );\n\n\t\t$session.parents( '.btn-group' ).find( '.selected' ).attr( 'data-session-id', session_key ).html( session_name );\n\t}\n\n\tkey_press_handler( event ) {\n\t\tvar action;\n\t\tswitch ( event.which ) {\n\t\t\tcase 13:\n\t\t\t\taction = _self.auth_pending ? _self.submit_password() : ! _self.user_list_visible ? _self.show_user_list() : 0;\n\t\t\t\t_self.log( action );\n\t\t\t\tbreak;\n\t\t\tcase 27:\n\t\t\t\taction = _self.auth_pending ? _self.cancel_authentication() : 0;\n\t\t\t\t_self.log( action );\n\t\t\t\tbreak;\n\t\t\tcase 32:\n\t\t\t\taction = (! _self.user_list_visible && ! _self.auth_pending) ? _self.show_user_list() : 0;\n\t\t\t\t_self.log( action );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tsystem_action_handler() {\n\t\tvar action = $( this ).attr( 'id' ),\n\t\t\t$modal = $( '.modal' );\n\n\t\t$modal.find( '.btn-primary' ).text( _self.translations[ action ] ).click( action, ( event ) => {\n\t\t\t$( this ).off( 'click' );\n\t\t\tlightdm[ event.data ]();\n\t\t} );\n\t\t$modal.find( '.btn-default' ).click( () => {\n\t\t\t$( this ).next().off( 'click' );\n\t\t} );\n\n\t\t$modal.modal('toggle');\n\t}\n\n\n\tuser_list_collapse_handler() {\n\t\t_self.user_list_visible = _self.$user_list.hasClass( 'in' ) ? true : false;\n\t}\n\n\n\t/**\n\t * LightDM Callback - Show password prompt to user.\n\t *\n\t * @param text\n\t * @param type\n\t */\n\tshow_prompt( text, type ) {\n\t\tif ( 'password' === type ) {\n\t\t\t$( '#passwordField' ).val( \"\" );\n\t\t\t$( '#passwordArea' ).show();\n\t\t\t$( '#passwordField' ).focus();\n\t\t}\n\t}\n\n\t/**\n\t * LightDM Callback - Show message to user.\n\t *\n\t * @param text\n\t */\n\tshow_message( text, type ) {\n\t\tif ( text.length > 0 ) {\n\t\t\t$( this.$msg_area ).html( text );\n\t\t\t$( '#passwordArea' ).hide();\n\t\t\t$( this.$msg_area_container ).show();\n\t\t}\n\t}\n}\n\n\n/**\n * Initialize the theme once the window has loaded.\n */\n$( window ).load( () => {\n\t_self = new AntergosTheme();\n} );\n\n"]}
\ No newline at end of file
+{"version":3,"sources":["greeter.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,IAAI,KAAK,GAAG,IAAI,CAAC;AACjB,IAAI,QAAQ,GAAG,IA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AC;AAC5B,KAAC,CAAE,gBAAgB,CAAE,CAAC,KAAK,EAAE,CAAC;IAC9B;GACD;;;;;;;;;;+BAOa,IAAI,EAAE,IAAI,EAAG;AAC1B,OAAK,IAAI,CAAC,MAAM,GAAG,CAAC,EAAG;AACtB,KAAC,CAAE,IAAI,CAAC,SAAS,CAAE,CAAC,IAAI,CAAE,IAAI,CAAE,CAAC;AACjC,KAAC,CAAE,eAAe,CAAE,CAAC,IAAI,EAAE,CAAC;AAC5B,KAAC,CAAE,IAAI,CAAC,mBAAmB,CAAE,CAAC,IAAI,EAAE,CAAC;IACrC;GACD;;;QAtZI,aAAa;GAAS,qBAAqB;;;;;;AA6ZjD,CAAC,CAAE,MAAM,CAAE,CAAC,IAAI,CAAE,YAAM;AACvB,MAAK,GAAG,IAAI,aAAa,EAAE,CAAC;CAC5B,CAAE,CAAC","file":"greeter-compiled.js","sourcesContent":["/*\n *\n * Copyright © 2015-2016 Antergos\n *\n * greeter.js\n *\n * This file is part of lightdm-webkit-theme-antergos\n *\n * lightdm-webkit-theme-antergos is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License,\n * or any later version.\n *\n * lightdm-webkit-theme-antergos is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * The following additional terms are in effect as per Section 7 of this license:\n *\n * The preservation of all legal notices and author attributions in\n * the material or in the Appropriate Legal Notices displayed\n * by works containing it is required.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n\n/**\n * This is used to access our classes from within jQuery callbacks.\n */\nlet _self = null;\nlet _bg_self = null;\n\n\n/**\n * Capitalize a string.\n *\n * @returns {string}\n */\nString.prototype.capitalize = function() {\n\treturn this.charAt( 0 ).toUpperCase() + this.slice( 1 );\n};\n\n\n\n\n\n\n/**\n * This is the base class for the theme's components.\n */\nclass GreeterThemeComponent {\n\n\tconstructor() {\n\t\tthis.debug = this.cache_get( 'debug', 'enabled' );\n\t\tthis.lang = window.navigator.language.split( '-' )[ 0 ].toLowerCase();\n\t\tthis.translations = window.ant_translations;\n\n\t\tif ( 'undefined' === typeof window.navigator.languages ) {\n\t\t\twindow.navigator.languages = [ window.navigator.language ];\n\t\t}\n\n\t\tthis.init_config_values();\n\t}\n\n\n\t/**\n\t * Add text to the debug log element (accessible from the login screen).\n\t *\n\t * @param {string} text - To be added to the log.\n\t */\n\tlog( text ) {\n\t\tif ( 'true' === this.debug ) {\n\t\t\tconsole.log( text );\n\t\t}\n\t\t$( '#logArea' ).append( `${text}
` );\n\t}\n\n\n\t/**\n\t * Get a key's value from localStorage. Keys can have two or more parts.\n\t * For example: \"ant:user:john:session\".\n\t *\n\t * @param {...string} key_parts - Strings that are combined to form the key.\n\t */\n\tcache_get( ...key_parts ) {\n\t\tvar key = `ant`;\n\n\t\tfor ( var part of key_parts ) {\n\t\t\tkey += `:${part}`;\n\t\t}\n\t\treturn localStorage.getItem( key );\n\t}\n\n\n\t/**\n\t * Set a key's value in localStorage. Keys can have two or more parts.\n\t * For example: \"ant:user:john:session\".\n\t *\n\t * @param {string} value - The value to set.\n\t * @param {...string} key_parts - Strings that are combined to form the key.\n\t */\n\tcache_set( value, ...key_parts ) {\n\t\tvar key = `ant`;\n\n\t\tfor ( var part of key_parts ) {\n\t\t\tkey += `:${part}`;\n\t\t}\n\t\treturn localStorage.setItem( key, value );\n\t}\n\n\n\t/**\n\t * Get some values from `lightdm-webkit2-greeter.conf` and save them for later.\n\t */\n\tinit_config_values() {\n\t\tlet logo = '', user_image = '', background_images = [], background_images_dir = '';\n\n\t\tif ( 'undefined' !== typeof config ) {\n\t\t\tif ( this instanceof AntergosTheme ) {\n\t\t\t\tlogo = config.get_str( 'branding', 'logo' ) || '';\n\t\t\t\tuser_image = config.get_str( 'branding', 'user_image' ) || '';\n\n\t\t\t} else if ( this instanceof AntergosBackgroundManager ) {\n\t\t\t\tbackground_images_dir = config.get_str( 'branding', 'background_images' ) || '';\n\t\t\t\tif (background_images_dir) {\n\t\t\t\t\tbackground_images = greeterutil.dirlist(background_images_dir) || [];\n\t\t\t\t}\n\n\t\t\t\tif (background_images.length) {\n\t\t\t\t\tlet images = [];\n\t\t\t\t\tfor (var file of background_images) {\n\t\t\t\t\t\tif (file.match(/(png|PNG)|(jpg|JPEG)|(bmp|BMP)/)) {\n\t\t\t\t\t\t\timages.push(file);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbackground_images = images;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.logo = logo;\n\t\tthis.user_image = user_image;\n\t\tthis.background_images = background_images;\n\t\tthis.background_images_dir = background_images_dir;\n\t}\n}\n\n\n\n\n\n\n/**\n * This class handles the theme's background switcher.\n */\nclass AntergosBackgroundManager extends GreeterThemeComponent {\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tif ( null === _bg_self ) {\n\t\t\t_bg_self = this;\n\t\t}\n\n\t\tthis.current_background = this.cache_get( 'background_manager', 'current_background' );\n\n\t\tif ( ! this.background_images_dir.length || ! this.background_images.length ) {\n\t\t\tthis.log('AntergosBackgroundManager: [ERROR] No background images detected.');\n\n\t\t\t$( '.header' ).fadeTo( 300, 0.5, function() {\n\t\t\t\t$( '.header' ).css( \"background\", '#000000' );\n\t\t\t} ).fadeTo( 300, 1 );\n\n\t\t}\n\t\treturn _bg_self;\n\t}\n\n\n\tinitialize() {\n\t\tif ( ! this.current_background ) {\n\t\t\t// For backwards compatibility\n\t\t\tif ( null !== localStorage.getItem( 'bgsaved' ) && '0' === localStorage.getItem( 'bgrandom' ) ) {\n\t\t\t\tthis.current_background = localStorage.getItem( 'bgsaved' );\n\t\t\t\tthis.cache_set( this.current_background, 'background_manager', 'current_background' );\n\t\t\t\tlocalStorage.removeItem( 'bgrandom' );\n\t\t\t\tlocalStorage.removeItem( 'bgsaved' );\n\t\t\t} else if ( '0' === localStorage.getItem( 'bgrandom' ) ) {\n\t\t\t\tthis.current_background = this.get_random_image();\n\t\t\t\tthis.cache_set( 'true', 'background_manager', 'random_background' );\n\t\t\t\tlocalStorage.removeItem( 'bgrandom' );\n\t\t\t}\n\t\t}\n\n\t\tif ( ! this.current_background ) {\n\t\t\t// For current and future versions\n\t\t\tlet current_background = this.cache_get('background_manager', 'current_background' ),\n\t\t\t\trandom_background = this.cache_get('background_manager', 'random_background' );\n\n\t\t\tif ( 'true' === random_background || ! current_background ) {\n\t\t\t\tcurrent_background = this.get_random_image();\n\t\t\t}\n\n\t\t\tthis.current_background = current_background;\n\t\t}\n\n\t\tthis.do_background();\n\t}\n\n\n\tdo_background() {\n\t\t$( '.header' ).fadeTo( 300, 0.5, function() {\n\t\t\tlet tpl = `url('file://${this.current_background}')`;\n\t\t\t$( '.header' ).css( \"background-image\", tpl );\n\t\t} ).fadeTo( 300, 1 );\n\t}\n\n\n\tget_random_image() {\n\t\tlet random_bg;\n\n\t\trandom_bg = Math.floor( Math.random() * this.background_images.length );\n\n\t\treturn this.background_images[ random_bg ];\n\t}\n\n\tsetup_background_thumbnails() {\n\t\tif (this.background_images.length) {\n\t\t\tfor ( var image_file of this.background_images ) {\n\t\t\t\tlet $link = $(''),\n\t\t\t\t\t$img_el = $link.children('img'),\n\t\t\t\t\ttpl = `file://${image_file}`;\n\n\t\t\t\t$link.addClass('bg clearfix').attr('data-img', tpl);\n\t\t\t\t$img_el.attr('src', tpl);\n\n\t\t\t\t$link.appendTo($('.bgs')).click( this.background_selected_handler );\n\t\t\t}\n\t\t}\n\t}\n\n\n\tbackground_selected_handler( event ) {\n\t\tlet img = $(this).attr('data-img');\n\n\t\tif ('random' === img) {\n\t\t\tthis.cache_set('true', 'background_manager', 'randmom_background' );\n\t\t\timg = this.get_random_image();\n\t\t}\n\n\t\tthis.cache_set(img, 'background_manager', 'current_background' );\n\t\tthis.current_background = img;\n\n\t\tthis.do_background();\n\n\t}\n}\n\n\n\n\n\n\n/**\n * This is the theme's main class object. It contains almost all the theme's logic.\n */\nclass AntergosTheme extends GreeterThemeComponent {\n\n\tconstructor() {\n\t\tsuper();\n\t\tif ( null === _self ) {\n\t\t\t_self = this;\n\t\t}\n\t\tthis.tux = 'img/antergos-logo-user.png';\n\t\tthis.user_list_visible = false;\n\t\tthis.auth_pending = false;\n\t\tthis.selected_user = null;\n\t\tthis.$user_list = $( '#user-list2' );\n\t\tthis.$session_list = $( '#sessions' );\n\t\tthis.$clock_container = $( '#collapseOne' );\n\t\tthis.$clock = $( \"#current_time\" );\n\t\tthis.$actions_container = $( \"#actionsArea\" );\n\t\tthis.$msg_area_container = $( '#statusArea' );\n\t\tthis.$msg_area = $( '#showMsg' );\n\t\tthis.background_manager = new AntergosBackgroundManager();\n\n\t\tthis.background_manager.initialize();\n\t\tthis.initialize();\n\n\t\treturn _self;\n\t}\n\n\tinitialize() {\n\t\tthis.prepare_translations();\n\t\tthis.do_static_translations();\n\t\tthis.initialize_clock();\n\t\tthis.prepare_login_panel_header();\n\t\tthis.prepare_user_list();\n\t\tthis.prepare_session_list();\n\t\tthis.prepare_system_action_buttons();\n\t\t$( \"#login\" ).addClass( \"in\" );\n\t\tthis.register_callbacks();\n\t\tthis.background_manager.setup_background_thumbnails();\n\t}\n\n\n\t/**\n\t * Register callbacks for the LDM Greeter as well as any others that haven't been registered\n\t * elsewhere.\n\t */\n\tregister_callbacks() {\n\t\tvar events = 'shown.bs.collapse, hidden.bs.collapse';\n\n\t\tthis.$user_list.parents( '.collapse' ).on( events, this.user_list_collapse_handler );\n\t\t$( document ).keydown( this.key_press_handler );\n\t\t$( '.cancel_auth' ).click( this.cancel_authentication );\n\t\t$( '.submit_passwd' ).click( this.submit_password );\n\n\t\twindow.show_prompt = this.show_prompt;\n\t\twindow.show_message = this.show_message;\n\t\twindow.start_authentication = this.start_authentication;\n\t\twindow.cancel_authentication = this.cancel_authentication;\n\t\twindow.authentication_complete = this.authentication_complete;\n\t\twindow.autologin_timer_expired = this.cancel_authentication;\n\t}\n\n\t/**\n\t * Initialize the user list.\n\t */\n\tprepare_user_list() {\n\t\tvar template;\n\n\t\t// Loop through the array of LightDMUser objects to create our user list.\n\t\tfor ( var user of lightdm.users ) {\n\t\t\tvar last_session = this.cache_get( 'user', user.name, 'session' ),\n\t\t\t\timage_src = user.image.length ? user.image : this.user_image;\n\n\t\t\tif ( null === last_session ) {\n\t\t\t\t// For backwards compatibility\n\t\t\t\tlast_session = localStorage.getItem( user.name );\n\t\t\t\tif ( null === last_session ) {\n\t\t\t\t\t// This user has never logged in before let's enable the system's default\n\t\t\t\t\t// session.\n\t\t\t\t\tlast_session = lightdm.default_session;\n\t\t\t\t}\n\t\t\t\tthis.cache_set( last_session, 'user', user.name, 'session' );\n\t\t\t}\n\n\t\t\tthis.log( `Last session for ${user.name} was: ${last_session}` );\n\n\t\t\ttemplate = `\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t${user.display_name}\n\t\t\t\t\t\n\t\t\t\t`;\n\n\t\t\t// Register event handler here so we don't have to iterate over the users again later.\n\t\t\t$( template ).appendTo( this.$user_list ).click( this.start_authentication ).on('error.antergos', this.user_image_error_handler);\n\n\t\t} // END for ( var user of lightdm.users )\n\n\t\tif ( $( this.$user_list ).children().length > 3 ) {\n\t\t\t// Make the user list two columns instead of one.\n\t\t\t$( this.$user_list ).css( 'column-count', '2' ).parent().css( 'max-width', '85%' );\n\t\t}\n\n\t}\n\n\t/**\n\t * Initialize the session selection dropdown.\n\t */\n\tprepare_session_list() {\n\t\t// Loop through the array of LightDMSession objects to create our session list.\n\t\tfor ( var session of lightdm.sessions ) {\n\t\t\tvar css_class = session.name.replace( / /g, '' ),\n\t\t\t\ttemplate;\n\n\t\t\tthis.log( `Adding ${session.name} to the session list...` );\n\n\t\t\ttemplate = `\n\t\t\t\t\n\t\t\t\t\t${session.name}\n\t\t\t\t`;\n\n\t\t\t$( template ).appendTo( this.$session_list ).click( this.session_toggle_handler );\n\n\t\t} // END for (var session of lightdm.sessions)\n\n\t\t$( '.dropdown-toggle' ).dropdown();\n\t}\n\n\t/**\n\t * Initialize the system action buttons\n\t */\n\tprepare_system_action_buttons() {\n\t\tvar actions = {\n\t\t\t\tshutdown: \"power-off\",\n\t\t\t\thibernate: \"asterisk\",\n\t\t\t\tsuspend: \"arrow-down\",\n\t\t\t\trestart: \"refresh\"\n\t\t\t},\n\t\t\ttemplate;\n\n\t\tfor ( var action of Object.keys( actions ) ) {\n\t\t\tvar cmd = `can_${action}`;\n\n\t\t\ttemplate = `\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t`;\n\n\t\t\tif ( lightdm[ cmd ] ) {\n\t\t\t\t$( template ).appendTo( $( this.$actions_container ) ).click( this.system_action_handler );\n\t\t\t}\n\t\t} // END for (var [action, icon] of actions)\n\n\t\t$( '[data-toggle=tooltip]' ).tooltip();\n\t\t$('.modal').modal({show: false});\n\t}\n\n\tinitialize_clock() {\n\t\tvar saved_format = this.cache_get( 'clock', 'time_format' ),\n\t\t\tformat = (null !== saved_format) ? saved_format : 'LT';\n\n\t\tmoment.locale( window.navigator.languages );\n\t\tthis.$clock.html( moment().format( format ) );\n\n\t\tsetInterval( () => {\n\t\t\tthis.$clock.html( moment().format( format ) );\n\t\t}, 60000 );\n\t}\n\n\n\t/**\n\t * Show the user list if its not already shown. This is used to allow the user to\n\t * display the user list by pressing Enter or Spacebar.\n\t */\n\tshow_user_list() {\n\t\tif ( $( this.$clock_container ).hasClass( 'in' ) ) {\n\t\t\t$( '#trigger' ).trigger( 'click' );\n\t\t}\n\t\tif ( $( this.$user_list ).length <= 1 ) {\n\t\t\t$( this.$user_list ).find( 'a' ).trigger( 'click', this );\n\t\t}\n\t}\n\n\n\tprepare_login_panel_header() {\n\t\tvar greeting = (this.translations.greeting) ? this.translations.greeting : 'Welcome!',\n\t\t\tlogo = ( '' !== this.logo ) ? this.logo : 'img/antergos.png';\n\n\t\t$( '.welcome' ).text( greeting );\n\t\t$( '#hostname' ).append( lightdm.hostname );\n\t\t$('[data-greeter-config=\"logo\"]').attr('src', logo);\n\t}\n\n\n\tprepare_translations() {\n\t\tif ( ! this.translations.hasOwnProperty( this.lang ) ) {\n\t\t\tfor ( var lang of window.navigator.languages ) {\n\t\t\t\tif ( this.translations.hasOwnProperty( lang ) ) {\n\t\t\t\t\tthis.lang = lang;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ( ! this.translations.hasOwnProperty( this.lang ) ) {\n\t\t\tthis.lang = 'en';\n\t\t}\n\n\t\tthis.translations = this.translations[ this.lang ];\n\t}\n\n\n\t/**\n\t * Replace '${i18n}' with translated string for all elements that\n\t * have the data-i18n attribute. This is for elements that are not generated\n\t * dynamically (they can be found in index.html).\n\t */\n\tdo_static_translations() {\n\t\t$( '[data-i18n]' ).each( function() {\n\t\t\tvar key = $( this ).attr( 'data-i18n' ),\n\t\t\t\thtml = $( this ).html(),\n\t\t\t\ttranslated = _self.translations[ key ],\n\t\t\t\tnew_html = html.replace( '${i18n}', translated );\n\n\t\t\t$( this ).html( new_html );\n\t\t} );\n\t}\n\n\n\t/**\n\t * Start the authentication process for the selected user.\n\t *\n\t * @param {object} event - jQuery.Event object from 'click' event.\n\t */\n\tstart_authentication( event ) {\n\t\tvar user_id = $( this ).attr( 'id' ),\n\t\t\tselector = `.${user_id}`,\n\t\t\tuser_session = _self.cache_get( 'user', user_id, 'session' );\n\n\t\tif ( _self.auth_pending || null !== _self.selected_user ) {\n\t\t\tlightdm.cancel_authentication();\n\t\t\t_self.log( `Authentication cancelled for ${_self.selected_user}` );\n\t\t\t_self.selected_user = null;\n\t\t}\n\n\t\t_self.log( `Starting authentication for ${user_id}.` );\n\t\t_self.selected_user = user_id;\n\n\t\t// CSS hack to workaround webkit bug\n\t\tif ( $( _self.$user_list ).children().length > 3 ) {\n\t\t\t$( _self.$user_list ).css( 'column-count', 'initial' ).parent().css( 'max-width', '50%' );\n\t\t}\n\t\t$( selector ).addClass( 'hovered' ).siblings().hide();\n\t\t$( '.fa-toggle-down' ).hide();\n\n\t\t_self.log( `Session for ${user_id} is ${user_session}` );\n\n\t\t$( `[data-session-id=\"${user_session}\"]` ).parent().trigger( 'click', this );\n\n\t\t$( '#session-list' ).removeClass( 'hidden' ).show();\n\t\t$( '#passwordArea' ).show();\n\t\t$( '.dropdown-toggle' ).dropdown();\n\n\t\t_self.auth_pending = true;\n\n\t\tlightdm.authenticate( user_id );\n\t}\n\n\n\t/**\n\t * Cancel the pending authentication.\n\t *\n\t * @param {object} event - jQuery.Event object from 'click' event.\n\t */\n\tcancel_authentication( event ) {\n\t\tvar selectors = [ '#statusArea', '#timerArea', '#passwordArea', '#session-list' ];\n\n\t\tfor ( var selector of selectors ) {\n\t\t\t$( selector ).hide();\n\t\t}\n\n\t\tlightdm.cancel_authentication();\n\n\t\t_self.log( 'Cancelled authentication.' );\n\n\t\t// CSS hack to work-around webkit bug\n\t\tif ( $( _self.$user_list ).children().length > 3 ) {\n\t\t\t$( _self.$user_list ).css( 'column-count', '2' ).parent().css( 'max-width', '85%' );\n\t\t}\n\n\t\t$( '.hovered' ).removeClass( 'hovered' ).siblings().show();\n\t\t$( '.fa-toggle-down' ).show();\n\n\t\t_self.selected_user = null;\n\t\t_self.auth_pending = false;\n\n\t}\n\n\n\t/**\n\t * Called when the user attempts to authenticate (inputs password).\n\t * We check to see if the user successfully authenticated and if so tell the LDM\n\t * Greeter to log them in with the session they selected.\n\t */\n\tauthentication_complete() {\n\t\tvar selected_session = $( '.selected' ).attr( 'data-session-id' ),\n\t\t\terr_msg = _self.translations.auth_failed[ _self.lang ];\n\n\t\t_self.auth_pending = false;\n\t\t_self.cache_set( selected_session, 'user', lightdm.authentication_user, 'session' );\n\n\t\t$( '#timerArea' ).hide();\n\n\t\tif ( lightdm.is_authenticated ) {\n\t\t\t// The user entered the correct password. Let's log them in.\n\t\t\t$('body').fadeOut(1000);\n\t\t\tlightdm.login( lightdm.authentication_user, selected_session );\n\t\t} else {\n\t\t\t// The user did not enter the correct password. Show error message.\n\t\t\t$( '#statusArea' ).show();\n\t\t}\n\t}\n\n\tsubmit_password( event ) {\n\t\tlightdm.respond( $( '#passwordField' ).val() );\n\t\t$( '#passwordArea' ).hide();\n\t\t$( '#timerArea' ).show();\n\t}\n\n\tsession_toggle_handler( event ) {\n\t\tvar $session = $( this ).children( 'a' ),\n\t\t\tsession_name = $session.text(),\n\t\t\tsession_key = $session.attr( 'data-session-id' );\n\n\t\t$session.parents( '.btn-group' ).find( '.selected' ).attr( 'data-session-id', session_key ).html( session_name );\n\t}\n\n\tkey_press_handler( event ) {\n\t\tvar action;\n\t\tswitch ( event.which ) {\n\t\t\tcase 13:\n\t\t\t\taction = _self.auth_pending ? _self.submit_password() : ! _self.user_list_visible ? _self.show_user_list() : 0;\n\t\t\t\t_self.log( action );\n\t\t\t\tbreak;\n\t\t\tcase 27:\n\t\t\t\taction = _self.auth_pending ? _self.cancel_authentication() : 0;\n\t\t\t\t_self.log( action );\n\t\t\t\tbreak;\n\t\t\tcase 32:\n\t\t\t\taction = (! _self.user_list_visible && ! _self.auth_pending) ? _self.show_user_list() : 0;\n\t\t\t\t_self.log( action );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tsystem_action_handler() {\n\t\tvar action = $( this ).attr( 'id' ),\n\t\t\t$modal = $( '.modal' );\n\n\t\t$modal.find( '.btn-primary' ).text( _self.translations[ action ] ).click( action, ( event ) => {\n\t\t\t$( this ).off( 'click' );\n\t\t\tlightdm[ event.data ]();\n\t\t} );\n\t\t$modal.find( '.btn-default' ).click( () => {\n\t\t\t$( this ).next().off( 'click' );\n\t\t} );\n\n\t\t$modal.modal('toggle');\n\t}\n\n\n\tuser_list_collapse_handler() {\n\t\t_self.user_list_visible = _self.$user_list.hasClass( 'in' ) ? true : false;\n\t}\n\n\n\tuser_image_error_handler( event ) {\n\t\t$(this).off('error.antergos');\n\t\t$(this).attr('src', _self.tux);\n\t}\n\n\n\t/**\n\t * LightDM Callback - Show password prompt to user.\n\t *\n\t * @param text\n\t * @param type\n\t */\n\tshow_prompt( text, type ) {\n\t\tif ( 'password' === type ) {\n\t\t\t$( '#passwordField' ).val( \"\" );\n\t\t\t$( '#passwordArea' ).show();\n\t\t\t$( '#passwordField' ).focus();\n\t\t}\n\t}\n\n\t/**\n\t * LightDM Callback - Show message to user.\n\t *\n\t * @param text\n\t */\n\tshow_message( text, type ) {\n\t\tif ( text.length > 0 ) {\n\t\t\t$( this.$msg_area ).html( text );\n\t\t\t$( '#passwordArea' ).hide();\n\t\t\t$( this.$msg_area_container ).show();\n\t\t}\n\t}\n}\n\n\n/**\n * Initialize the theme once the window has loaded.\n */\n$( window ).load( () => {\n\t_self = new AntergosTheme();\n} );\n\n"]}
\ No newline at end of file
diff --git a/themes/antergos/js/greeter.js b/themes/antergos/js/greeter.js
index 6ef8755..05135c0 100644
--- a/themes/antergos/js/greeter.js
+++ b/themes/antergos/js/greeter.js
@@ -116,11 +116,12 @@ class GreeterThemeComponent {
* Get some values from `lightdm-webkit2-greeter.conf` and save them for later.
*/
init_config_values() {
- let logo = '', background_images = [], background_images_dir = '';
+ let logo = '', user_image = '', background_images = [], background_images_dir = '';
if ( 'undefined' !== typeof config ) {
if ( this instanceof AntergosTheme ) {
logo = config.get_str( 'branding', 'logo' ) || '';
+ user_image = config.get_str( 'branding', 'user_image' ) || '';
} else if ( this instanceof AntergosBackgroundManager ) {
background_images_dir = config.get_str( 'branding', 'background_images' ) || '';
@@ -141,6 +142,7 @@ class GreeterThemeComponent {
}
this.logo = logo;
+ this.user_image = user_image;
this.background_images = background_images;
this.background_images_dir = background_images_dir;
}
@@ -163,7 +165,7 @@ class AntergosBackgroundManager extends GreeterThemeComponent {
_bg_self = this;
}
- this.current_background = this.cache_get( 'background_config', 'current_background' );
+ this.current_background = this.cache_get( 'background_manager', 'current_background' );
if ( ! this.background_images_dir.length || ! this.background_images.length ) {
this.log('AntergosBackgroundManager: [ERROR] No background images detected.');
@@ -172,10 +174,7 @@ class AntergosBackgroundManager extends GreeterThemeComponent {
$( '.header' ).css( "background", '#000000' );
} ).fadeTo( 300, 1 );
- } else {
- this.initialize();
}
-
return _bg_self;
}
@@ -203,11 +202,18 @@ class AntergosBackgroundManager extends GreeterThemeComponent {
if ( 'true' === random_background || ! current_background ) {
current_background = this.get_random_image();
}
+
this.current_background = current_background;
}
+ this.do_background();
+ }
+
+
+ do_background() {
$( '.header' ).fadeTo( 300, 0.5, function() {
- $( '.header' ).css( "background", this.current_background );
+ let tpl = `url('file://${this.current_background}')`;
+ $( '.header' ).css( "background-image", tpl );
} ).fadeTo( 300, 1 );
}
@@ -224,15 +230,32 @@ class AntergosBackgroundManager extends GreeterThemeComponent {
if (this.background_images.length) {
for ( var image_file of this.background_images ) {
let $link = $(''),
- $img_el = $link.children('img');
+ $img_el = $link.children('img'),
+ tpl = `file://${image_file}`;
- $link.addClass('bg clearfix').attr('data-img', image_file);
- $img_el.attr('src', image_file);
+ $link.addClass('bg clearfix').attr('data-img', tpl);
+ $img_el.attr('src', tpl);
- $link.appendTo($('.bgs'));
+ $link.appendTo($('.bgs')).click( this.background_selected_handler );
}
}
}
+
+
+ background_selected_handler( event ) {
+ let img = $(this).attr('data-img');
+
+ if ('random' === img) {
+ this.cache_set('true', 'background_manager', 'randmom_background' );
+ img = this.get_random_image();
+ }
+
+ this.cache_set(img, 'background_manager', 'current_background' );
+ this.current_background = img;
+
+ this.do_background();
+
+ }
}
@@ -250,6 +273,7 @@ class AntergosTheme extends GreeterThemeComponent {
if ( null === _self ) {
_self = this;
}
+ this.tux = 'img/antergos-logo-user.png';
this.user_list_visible = false;
this.auth_pending = false;
this.selected_user = null;
@@ -262,6 +286,7 @@ class AntergosTheme extends GreeterThemeComponent {
this.$msg_area = $( '#showMsg' );
this.background_manager = new AntergosBackgroundManager();
+ this.background_manager.initialize();
this.initialize();
return _self;
@@ -305,13 +330,12 @@ class AntergosTheme extends GreeterThemeComponent {
* Initialize the user list.
*/
prepare_user_list() {
- var tux = 'img/antergos-logo-user.png',
- template;
+ var template;
// Loop through the array of LightDMUser objects to create our user list.
for ( var user of lightdm.users ) {
var last_session = this.cache_get( 'user', user.name, 'session' ),
- image_src = user.image.length ? user.image : tux;
+ image_src = user.image.length ? user.image : this.user_image;
if ( null === last_session ) {
// For backwards compatibility
@@ -334,7 +358,7 @@ class AntergosTheme extends GreeterThemeComponent {
`;
// Register event handler here so we don't have to iterate over the users again later.
- $( template ).appendTo( this.$user_list ).click( this.start_authentication );
+ $( template ).appendTo( this.$user_list ).click( this.start_authentication ).on('error.antergos', this.user_image_error_handler);
} // END for ( var user of lightdm.users )
@@ -617,6 +641,12 @@ class AntergosTheme extends GreeterThemeComponent {
}
+ user_image_error_handler( event ) {
+ $(this).off('error.antergos');
+ $(this).attr('src', _self.tux);
+ }
+
+
/**
* LightDM Callback - Show password prompt to user.
*