diff --git a/themes/antergos/.babelrc b/themes/antergos/.babelrc
index 5bc0a01..c62aed3 100644
--- a/themes/antergos/.babelrc
+++ b/themes/antergos/.babelrc
@@ -1,3 +1,10 @@
{
-"presets": ["/usr/lib/node_modules/babel-preset-es2015"]
+ "plugins": [
+ [
+ "/usr/lib/node_modules/babel-plugin-transform-es2015-spread",
+ {
+ "loose": true
+ }
+ ]
+ ]
}
\ No newline at end of file
diff --git a/themes/antergos/.gitignore b/themes/antergos/.gitignore
index 01d866b..c78758d 100644
--- a/themes/antergos/.gitignore
+++ b/themes/antergos/.gitignore
@@ -6,45 +6,7 @@
## Directory-based project format:
.idea/
-# if you remove the above rule, at least ignore the following:
-# User-specific stuff:
-# .idea/workspace.xml
-# .idea/tasks.xml
-# .idea/dictionaries
-
-# Sensitive or high-churn files:
-# .idea/dataSources.ids
-# .idea/dataSources.xml
-# .idea/sqlDataSources.xml
-# .idea/dynamic.xml
-# .idea/uiDesigner.xml
-
-# Gradle:
-# .idea/gradle.xml
-# .idea/libraries
-
-# Mongo Explorer plugin:
-# .idea/mongoSettings.xml
-
-## File-based project format:
-*.ipr
-*.iws
-
-## Plugin-specific files:
-
-# IntelliJ
-/out/
-
-# mpeltonen/sbt-idea plugin
-.idea_modules/
-
-# JIRA plugin
-atlassian-ide-plugin.xml
-
-# Crashlytics plugin (for Android Studio and IntelliJ)
-com_crashlytics_export_strings.xml
-crashlytics.properties
-crashlytics-build.properties
+node_modules/
diff --git a/themes/antergos/js/greeter-compiled.js b/themes/antergos/js/greeter-compiled.js
index e3fa253..b7fdfd6 100644
--- a/themes/antergos/js/greeter-compiled.js
+++ b/themes/antergos/js/greeter-compiled.js
@@ -1,13 +1,3 @@
-'use strict';
-
-var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
-
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
/*
*
* Copyright © 2015-2016 Antergos
@@ -39,8 +29,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
/**
* This is used to access our classes from within jQuery callbacks.
*/
-var _self = null;
-var _bg_self = null;
+let _self = null;
+let _bg_self = null;
/**
* Capitalize a string.
@@ -54,11 +44,9 @@ String.prototype.capitalize = function () {
/**
* This is the base class for the theme's components.
*/
+class GreeterThemeComponent {
-var GreeterThemeComponent = (function () {
- function GreeterThemeComponent() {
- _classCallCheck(this, GreeterThemeComponent);
-
+ constructor() {
this.debug = this.cache_get('debug', 'enabled');
this.lang = window.navigator.language.split('-')[0].toLowerCase();
this.translations = window.ant_translations;
@@ -75,860 +63,582 @@ var GreeterThemeComponent = (function () {
*
* @param {string} text - To be added to the log.
*/
-
- _createClass(GreeterThemeComponent, [{
- key: 'log',
- value: function log(text) {
- if ('true' === this.debug) {
- console.log(text);
- }
- $('#logArea').append(text + '
');
+ log(text) {
+ if ('true' === this.debug) {
+ console.log(text);
}
+ $('#logArea').append(`${ text }
`);
+ }
- /**
- * Get a key's value from localStorage. Keys can have two or more parts.
- * For example: "ant:user:john:session".
- *
- * @param {...string} key_parts - Strings that are combined to form the key.
- */
-
- }, {
- key: 'cache_get',
- value: function cache_get() {
- var key = 'ant';
-
- for (var _len = arguments.length, key_parts = Array(_len), _key = 0; _key < _len; _key++) {
- key_parts[_key] = arguments[_key];
- }
-
- var _iteratorNormalCompletion = true;
- var _didIteratorError = false;
- var _iteratorError = undefined;
-
- try {
- for (var _iterator = key_parts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var part = _step.value;
-
- key += ':' + part;
- }
- } catch (err) {
- _didIteratorError = true;
- _iteratorError = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion && _iterator.return) {
- _iterator.return();
- }
- } finally {
- if (_didIteratorError) {
- throw _iteratorError;
- }
- }
- }
+ /**
+ * Get a key's value from localStorage. Keys can have two or more parts.
+ * For example: "ant:user:john:session".
+ *
+ * @param {...string} key_parts - Strings that are combined to form the key.
+ */
+ cache_get(...key_parts) {
+ var key = `ant`;
- return localStorage.getItem(key);
+ for (var part of key_parts) {
+ key += `:${ part }`;
}
+ return localStorage.getItem(key);
+ }
- /**
- * Set a key's value in localStorage. Keys can have two or more parts.
- * For example: "ant:user:john:session".
- *
- * @param {string} value - The value to set.
- * @param {...string} key_parts - Strings that are combined to form the key.
- */
-
- }, {
- key: 'cache_set',
- value: function cache_set(value) {
- var key = 'ant';
-
- for (var _len2 = arguments.length, key_parts = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
- key_parts[_key2 - 1] = arguments[_key2];
- }
-
- var _iteratorNormalCompletion2 = true;
- var _didIteratorError2 = false;
- var _iteratorError2 = undefined;
-
- try {
- for (var _iterator2 = key_parts[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
- var part = _step2.value;
-
- key += ':' + part;
- }
- } catch (err) {
- _didIteratorError2 = true;
- _iteratorError2 = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion2 && _iterator2.return) {
- _iterator2.return();
- }
- } finally {
- if (_didIteratorError2) {
- throw _iteratorError2;
- }
- }
- }
+ /**
+ * Set a key's value in localStorage. Keys can have two or more parts.
+ * For example: "ant:user:john:session".
+ *
+ * @param {string} value - The value to set.
+ * @param {...string} key_parts - Strings that are combined to form the key.
+ */
+ cache_set(value, ...key_parts) {
+ var key = `ant`;
- return localStorage.setItem(key, value);
+ for (var part of key_parts) {
+ key += `:${ part }`;
}
+ return localStorage.setItem(key, value);
+ }
- /**
- * Get some values from `lightdm-webkit2-greeter.conf` and save them for later.
- */
-
- }, {
- 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) {
- background_images = greeterutil.dirlist(background_images_dir) || [];
- }
+ /**
+ * Get some values from `lightdm-webkit2-greeter.conf` and save them for later.
+ */
+ init_config_values() {
+ 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') || '';
+ if (background_images_dir) {
+ background_images = greeterutil.dirlist(background_images_dir) || [];
+ }
- if (background_images.length) {
- var images = [];
- var _iteratorNormalCompletion3 = true;
- var _didIteratorError3 = false;
- var _iteratorError3 = undefined;
-
- try {
- for (var _iterator3 = background_images[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
- var file = _step3.value;
-
- if (file.match(/(png|PNG)|(jpg|JPEG)|(bmp|BMP)/)) {
- images.push(file);
- }
- }
- } catch (err) {
- _didIteratorError3 = true;
- _iteratorError3 = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion3 && _iterator3.return) {
- _iterator3.return();
- }
- } finally {
- if (_didIteratorError3) {
- throw _iteratorError3;
- }
- }
+ if (background_images.length) {
+ let images = [];
+ for (var file of background_images) {
+ if (file.match(/(png|PNG)|(jpg|JPEG)|(bmp|BMP)/)) {
+ images.push(file);
}
-
- background_images = images;
}
+ background_images = images;
}
}
-
- this.logo = logo;
- this.user_image = user_image;
- this.background_images = background_images;
- this.background_images_dir = background_images_dir;
}
- }]);
- return GreeterThemeComponent;
-})();
+ this.logo = logo;
+ this.user_image = user_image;
+ this.background_images = background_images;
+ this.background_images_dir = background_images_dir;
+ }
+}
/**
* This class handles the theme's background switcher.
*/
+class AntergosBackgroundManager extends GreeterThemeComponent {
-var AntergosBackgroundManager = (function (_GreeterThemeComponen) {
- _inherits(AntergosBackgroundManager, _GreeterThemeComponen);
-
- function AntergosBackgroundManager() {
- var _ret;
-
- _classCallCheck(this, AntergosBackgroundManager);
-
- var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(AntergosBackgroundManager).call(this));
+ constructor() {
+ super();
if (null === _bg_self) {
- _bg_self = _this;
+ _bg_self = this;
}
- _this.current_background = _this.cache_get('background_manager', '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.');
+ if (!this.background_images_dir.length || !this.background_images.length) {
+ this.log('AntergosBackgroundManager: [ERROR] No background images detected.');
$('.header').fadeTo(300, 0.5, function () {
$('.header').css("background", '#000000');
}).fadeTo(300, 1);
}
- return _ret = _bg_self, _possibleConstructorReturn(_this, _ret);
+ return _bg_self;
}
- _createClass(AntergosBackgroundManager, [{
- key: 'initialize',
- value: function initialize() {
- if (!this.current_background) {
- // For backwards compatibility
- if (null !== localStorage.getItem('bgsaved') && '0' === localStorage.getItem('bgrandom')) {
- this.current_background = localStorage.getItem('bgsaved');
- this.cache_set(this.current_background, 'background_manager', 'current_background');
- localStorage.removeItem('bgrandom');
- localStorage.removeItem('bgsaved');
- } else if ('0' === localStorage.getItem('bgrandom')) {
- this.current_background = this.get_random_image();
- this.cache_set('true', 'background_manager', 'random_background');
- localStorage.removeItem('bgrandom');
- }
+ initialize() {
+ if (!this.current_background) {
+ // For backwards compatibility
+ if (null !== localStorage.getItem('bgsaved') && '0' === localStorage.getItem('bgrandom')) {
+ this.current_background = localStorage.getItem('bgsaved');
+ this.cache_set(this.current_background, 'background_manager', 'current_background');
+ localStorage.removeItem('bgrandom');
+ localStorage.removeItem('bgsaved');
+ } else if ('0' === localStorage.getItem('bgrandom')) {
+ this.current_background = this.get_random_image();
+ this.cache_set('true', 'background_manager', 'random_background');
+ localStorage.removeItem('bgrandom');
}
+ }
- if (!this.current_background) {
- // For current and future versions
- var current_background = this.cache_get('background_manager', 'current_background'),
- random_background = this.cache_get('background_manager', 'random_background');
-
- if ('true' === random_background || !current_background) {
- current_background = this.get_random_image();
- }
+ if (!this.current_background) {
+ // For current and future versions
+ let current_background = this.cache_get('background_manager', 'current_background'),
+ random_background = this.cache_get('background_manager', 'random_background');
- this.current_background = current_background;
+ if ('true' === random_background || !current_background) {
+ current_background = this.get_random_image();
}
- this.do_background();
+ this.current_background = current_background;
}
- }, {
- key: 'do_background',
- value: function do_background() {
- $('.header').fadeTo(300, 0.5, function () {
- var tpl = 'url(\'file://' + this.current_background + '\')';
- $('.header').css("background-image", tpl);
- }).fadeTo(300, 1);
- }
- }, {
- key: 'get_random_image',
- value: function get_random_image() {
- var random_bg = undefined;
- random_bg = Math.floor(Math.random() * this.background_images.length);
+ this.do_background();
+ }
- return this.background_images[random_bg];
- }
- }, {
- key: 'setup_background_thumbnails',
- value: function setup_background_thumbnails() {
- if (this.background_images.length) {
- var _iteratorNormalCompletion4 = true;
- var _didIteratorError4 = false;
- var _iteratorError4 = undefined;
-
- try {
- for (var _iterator4 = this.background_images[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
- var image_file = _step4.value;
-
- var $link = $(''),
- $img_el = $link.children('img'),
- tpl = 'file://' + image_file;
-
- $link.addClass('bg clearfix').attr('data-img', tpl);
- $img_el.attr('src', tpl);
-
- $link.appendTo($('.bgs')).click(this.background_selected_handler);
- }
- } catch (err) {
- _didIteratorError4 = true;
- _iteratorError4 = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion4 && _iterator4.return) {
- _iterator4.return();
- }
- } finally {
- if (_didIteratorError4) {
- throw _iteratorError4;
- }
- }
- }
+ do_background() {
+ $('.header').fadeTo(300, 0.5, function () {
+ let tpl = `url('file://${ this.current_background }')`;
+ $('.header').css("background-image", tpl);
+ }).fadeTo(300, 1);
+ }
+
+ get_random_image() {
+ let random_bg;
+
+ random_bg = Math.floor(Math.random() * this.background_images.length);
+
+ return this.background_images[random_bg];
+ }
+
+ setup_background_thumbnails() {
+ if (this.background_images.length) {
+ for (var image_file of this.background_images) {
+ let $link = $(''),
+ $img_el = $link.children('img'),
+ tpl = `file://${ image_file }`;
+
+ $link.addClass('bg clearfix').attr('data-img', tpl);
+ $img_el.attr('src', tpl);
+
+ $link.appendTo($('.bgs')).click(this.background_selected_handler);
}
}
- }, {
- 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;
+ background_selected_handler(event) {
+ let img = $(this).attr('data-img');
- this.do_background();
+ if ('random' === img) {
+ this.cache_set('true', 'background_manager', 'randmom_background');
+ img = this.get_random_image();
}
- }]);
- return AntergosBackgroundManager;
-})(GreeterThemeComponent);
+ this.cache_set(img, 'background_manager', 'current_background');
+ this.current_background = img;
+
+ this.do_background();
+ }
+}
/**
* This is the theme's main class object. It contains almost all the theme's logic.
*/
+class AntergosTheme extends GreeterThemeComponent {
-var AntergosTheme = (function (_GreeterThemeComponen2) {
- _inherits(AntergosTheme, _GreeterThemeComponen2);
-
- function AntergosTheme() {
- var _ret2;
-
- _classCallCheck(this, AntergosTheme);
-
- var _this2 = _possibleConstructorReturn(this, Object.getPrototypeOf(AntergosTheme).call(this));
-
+ constructor() {
+ super();
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;
- _this2.$user_list = $('#user-list2');
- _this2.$session_list = $('#sessions');
- _this2.$clock_container = $('#collapseOne');
- _this2.$clock = $("#current_time");
- _this2.$actions_container = $("#actionsArea");
- _this2.$msg_area_container = $('#statusArea');
- _this2.$msg_area = $('#showMsg');
- _this2.background_manager = new AntergosBackgroundManager();
-
- _this2.background_manager.initialize();
- _this2.initialize();
-
- return _ret2 = _self, _possibleConstructorReturn(_this2, _ret2);
- }
-
- _createClass(AntergosTheme, [{
- key: 'initialize',
- value: function initialize() {
- this.prepare_translations();
- this.do_static_translations();
- this.initialize_clock();
- this.prepare_login_panel_header();
- this.prepare_user_list();
- this.prepare_session_list();
- this.prepare_system_action_buttons();
- $("#login").addClass("in");
- this.register_callbacks();
- this.background_manager.setup_background_thumbnails();
- }
+ _self = this;
+ }
+ this.tux = 'img/antergos-logo-user.png';
+ this.user_list_visible = false;
+ this.auth_pending = false;
+ this.selected_user = null;
+ this.$user_list = $('#user-list2');
+ this.$session_list = $('#sessions');
+ this.$clock_container = $('#collapseOne');
+ this.$clock = $("#current_time");
+ this.$actions_container = $("#actionsArea");
+ this.$msg_area_container = $('#statusArea');
+ this.$msg_area = $('#showMsg');
+ this.background_manager = new AntergosBackgroundManager();
+
+ this.background_manager.initialize();
+ this.initialize();
+
+ return _self;
+ }
- /**
- * Register callbacks for the LDM Greeter as well as any others that haven't been registered
- * elsewhere.
- */
-
- }, {
- key: 'register_callbacks',
- value: function register_callbacks() {
- var events = 'shown.bs.collapse, hidden.bs.collapse';
-
- this.$user_list.parents('.collapse').on(events, this.user_list_collapse_handler);
- $(document).keydown(this.key_press_handler);
- $('.cancel_auth').click(this.cancel_authentication);
- $('.submit_passwd').click(this.submit_password);
-
- window.show_prompt = this.show_prompt;
- window.show_message = this.show_message;
- window.start_authentication = this.start_authentication;
- window.cancel_authentication = this.cancel_authentication;
- window.authentication_complete = this.authentication_complete;
- window.autologin_timer_expired = this.cancel_authentication;
- }
+ initialize() {
+ this.prepare_translations();
+ this.do_static_translations();
+ this.initialize_clock();
+ this.prepare_login_panel_header();
+ this.prepare_user_list();
+ this.prepare_session_list();
+ this.prepare_system_action_buttons();
+ $("#login").addClass("in");
+ this.register_callbacks();
+ this.background_manager.setup_background_thumbnails();
+ }
- /**
- * Initialize the user list.
- */
-
- }, {
- key: 'prepare_user_list',
- value: function prepare_user_list() {
- var template;
-
- // Loop through the array of LightDMUser objects to create our user list.
- var _iteratorNormalCompletion5 = true;
- var _didIteratorError5 = false;
- var _iteratorError5 = undefined;
-
- try {
- for (var _iterator5 = lightdm.users[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) {
- var user = _step5.value;
-
- var last_session = this.cache_get('user', user.name, 'session'),
- image_src = user.image.length ? user.image : this.user_image;
-
- if (null === last_session) {
- // For backwards compatibility
- last_session = localStorage.getItem(user.name);
- if (null === last_session) {
- // This user has never logged in before let's enable the system's default
- // session.
- last_session = lightdm.default_session;
- }
- this.cache_set(last_session, 'user', user.name, 'session');
- }
+ /**
+ * Register callbacks for the LDM Greeter as well as any others that haven't been registered
+ * elsewhere.
+ */
+ register_callbacks() {
+ var events = 'shown.bs.collapse, hidden.bs.collapse';
+
+ this.$user_list.parents('.collapse').on(events, this.user_list_collapse_handler);
+ $(document).keydown(this.key_press_handler);
+ $('.cancel_auth').click(this.cancel_authentication);
+ $('.submit_passwd').click(this.submit_password);
+
+ window.show_prompt = this.show_prompt;
+ window.show_message = this.show_message;
+ window.start_authentication = this.start_authentication;
+ window.cancel_authentication = this.cancel_authentication;
+ window.authentication_complete = this.authentication_complete;
+ window.autologin_timer_expired = this.cancel_authentication;
+ }
- this.log('Last session for ' + user.name + ' was: ' + last_session);
+ /**
+ * Initialize the user list.
+ */
+ prepare_user_list() {
+ var template;
- 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';
+ // 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 : this.user_image;
- // 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).on('error.antergos', this.user_image_error_handler);
- } // END for ( var user of lightdm.users )
- } catch (err) {
- _didIteratorError5 = true;
- _iteratorError5 = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion5 && _iterator5.return) {
- _iterator5.return();
- }
- } finally {
- if (_didIteratorError5) {
- throw _iteratorError5;
- }
+ if (null === last_session) {
+ // For backwards compatibility
+ last_session = localStorage.getItem(user.name);
+ if (null === last_session) {
+ // This user has never logged in before let's enable the system's default
+ // session.
+ last_session = lightdm.default_session;
}
+ this.cache_set(last_session, 'user', user.name, 'session');
}
- if ($(this.$user_list).children().length > 3) {
- // Make the user list two columns instead of one.
- $(this.$user_list).css('column-count', '2').parent().css('max-width', '85%');
- }
- }
+ this.log(`Last session for ${ user.name } was: ${ last_session }`);
- /**
- * Initialize the session selection dropdown.
- */
-
- }, {
- key: 'prepare_session_list',
- value: function prepare_session_list() {
- // Loop through the array of LightDMSession objects to create our session list.
- var _iteratorNormalCompletion6 = true;
- var _didIteratorError6 = false;
- var _iteratorError6 = undefined;
-
- try {
- for (var _iterator6 = lightdm.sessions[Symbol.iterator](), _step6; !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); _iteratorNormalCompletion6 = true) {
- var session = _step6.value;
-
- var css_class = session.name.replace(/ /g, ''),
- template;
-
- this.log('Adding ' + session.name + ' to the session list...');
-
- template = '\n\t\t\t\t
\n\t\t\t\t\t' + session.name + '\n\t\t\t\t';
-
- $(template).appendTo(this.$session_list).click(this.session_toggle_handler);
- } // END for (var session of lightdm.sessions)
- } catch (err) {
- _didIteratorError6 = true;
- _iteratorError6 = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion6 && _iterator6.return) {
- _iterator6.return();
- }
- } finally {
- if (_didIteratorError6) {
- throw _iteratorError6;
- }
- }
- }
+ template = `
+
+
+ ${ user.display_name }
+
+ `;
+
+ // 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).on('error.antergos', this.user_image_error_handler);
+ } // END for ( var user of lightdm.users )
- $('.dropdown-toggle').dropdown();
+ if ($(this.$user_list).children().length > 3) {
+ // Make the user list two columns instead of one.
+ $(this.$user_list).css('column-count', '2').parent().css('max-width', '85%');
}
+ }
- /**
- * Initialize the system action buttons
- */
-
- }, {
- key: 'prepare_system_action_buttons',
- value: function prepare_system_action_buttons() {
- var actions = {
- shutdown: "power-off",
- hibernate: "asterisk",
- suspend: "arrow-down",
- restart: "refresh"
- },
+ /**
+ * Initialize the session selection dropdown.
+ */
+ prepare_session_list() {
+ // Loop through the array of LightDMSession objects to create our session list.
+ for (var session of lightdm.sessions) {
+ var css_class = session.name.replace(/ /g, ''),
template;
- var _iteratorNormalCompletion7 = true;
- var _didIteratorError7 = false;
- var _iteratorError7 = undefined;
+ this.log(`Adding ${ session.name } to the session list...`);
- try {
- for (var _iterator7 = Object.keys(actions)[Symbol.iterator](), _step7; !(_iteratorNormalCompletion7 = (_step7 = _iterator7.next()).done); _iteratorNormalCompletion7 = true) {
- var action = _step7.value;
+ template = `
+
+ ${ session.name }
+ `;
- var cmd = 'can_' + action;
+ $(template).appendTo(this.$session_list).click(this.session_toggle_handler);
+ } // END for (var session of lightdm.sessions)
- template = '\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t';
+ $('.dropdown-toggle').dropdown();
+ }
- if (lightdm[cmd]) {
- $(template).appendTo($(this.$actions_container)).click(this.system_action_handler);
- }
- } // END for (var [action, icon] of actions)
- } catch (err) {
- _didIteratorError7 = true;
- _iteratorError7 = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion7 && _iterator7.return) {
- _iterator7.return();
- }
- } finally {
- if (_didIteratorError7) {
- throw _iteratorError7;
- }
- }
+ /**
+ * Initialize the system action buttons
+ */
+ prepare_system_action_buttons() {
+ var actions = {
+ shutdown: "power-off",
+ hibernate: "asterisk",
+ suspend: "arrow-down",
+ restart: "refresh"
+ },
+ template;
+
+ for (var action of Object.keys(actions)) {
+ var cmd = `can_${ action }`;
+
+ template = `
+
+
+ `;
+
+ if (lightdm[cmd]) {
+ $(template).appendTo($(this.$actions_container)).click(this.system_action_handler);
}
+ } // END for (var [action, icon] of actions)
- $('[data-toggle=tooltip]').tooltip();
- $('.modal').modal({ show: false });
- }
- }, {
- key: 'initialize_clock',
- value: function initialize_clock() {
- var _this3 = this;
+ $('[data-toggle=tooltip]').tooltip();
+ $('.modal').modal({ show: false });
+ }
+
+ initialize_clock() {
+ var saved_format = this.cache_get('clock', 'time_format'),
+ format = null !== saved_format ? saved_format : 'LT';
- var saved_format = this.cache_get('clock', 'time_format'),
- format = null !== saved_format ? saved_format : 'LT';
+ moment.locale(window.navigator.languages);
+ this.$clock.html(moment().format(format));
- moment.locale(window.navigator.languages);
+ setInterval(() => {
this.$clock.html(moment().format(format));
+ }, 60000);
+ }
- setInterval(function () {
- _this3.$clock.html(moment().format(format));
- }, 60000);
+ /**
+ * Show the user list if its not already shown. This is used to allow the user to
+ * display the user list by pressing Enter or Spacebar.
+ */
+ show_user_list() {
+ if ($(this.$clock_container).hasClass('in')) {
+ $('#trigger').trigger('click');
}
+ if ($(this.$user_list).length <= 1) {
+ $(this.$user_list).find('a').trigger('click', this);
+ }
+ }
- /**
- * Show the user list if its not already shown. This is used to allow the user to
- * display the user list by pressing Enter or Spacebar.
- */
+ prepare_login_panel_header() {
+ var greeting = this.translations.greeting ? this.translations.greeting : 'Welcome!',
+ logo = '' !== this.logo ? this.logo : 'img/antergos.png';
- }, {
- key: 'show_user_list',
- value: function show_user_list() {
- if ($(this.$clock_container).hasClass('in')) {
- $('#trigger').trigger('click');
- }
- if ($(this.$user_list).length <= 1) {
- $(this.$user_list).find('a').trigger('click', this);
+ $('.welcome').text(greeting);
+ $('#hostname').append(lightdm.hostname);
+ $('[data-greeter-config="logo"]').attr('src', logo);
+ }
+
+ prepare_translations() {
+ if (!this.translations.hasOwnProperty(this.lang)) {
+ for (var lang of window.navigator.languages) {
+ if (this.translations.hasOwnProperty(lang)) {
+ this.lang = lang;
+ break;
+ }
}
}
- }, {
- key: 'prepare_login_panel_header',
- value: function prepare_login_panel_header() {
- var greeting = this.translations.greeting ? this.translations.greeting : 'Welcome!',
- logo = '' !== this.logo ? this.logo : 'img/antergos.png';
-
- $('.welcome').text(greeting);
- $('#hostname').append(lightdm.hostname);
- $('[data-greeter-config="logo"]').attr('src', logo);
+ if (!this.translations.hasOwnProperty(this.lang)) {
+ this.lang = 'en';
}
- }, {
- key: 'prepare_translations',
- value: function prepare_translations() {
- if (!this.translations.hasOwnProperty(this.lang)) {
- var _iteratorNormalCompletion8 = true;
- var _didIteratorError8 = false;
- var _iteratorError8 = undefined;
-
- try {
- for (var _iterator8 = window.navigator.languages[Symbol.iterator](), _step8; !(_iteratorNormalCompletion8 = (_step8 = _iterator8.next()).done); _iteratorNormalCompletion8 = true) {
- var lang = _step8.value;
-
- if (this.translations.hasOwnProperty(lang)) {
- this.lang = lang;
- break;
- }
- }
- } catch (err) {
- _didIteratorError8 = true;
- _iteratorError8 = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion8 && _iterator8.return) {
- _iterator8.return();
- }
- } finally {
- if (_didIteratorError8) {
- throw _iteratorError8;
- }
- }
- }
- }
- if (!this.translations.hasOwnProperty(this.lang)) {
- this.lang = 'en';
- }
- this.translations = this.translations[this.lang];
+ this.translations = this.translations[this.lang];
+ }
+
+ /**
+ * Replace '${i18n}' with translated string for all elements that
+ * have the data-i18n attribute. This is for elements that are not generated
+ * dynamically (they can be found in index.html).
+ */
+ do_static_translations() {
+ $('[data-i18n]').each(function () {
+ var key = $(this).attr('data-i18n'),
+ html = $(this).html(),
+ translated = _self.translations[key],
+ new_html = html.replace('${i18n}', translated);
+
+ $(this).html(new_html);
+ });
+ }
+
+ /**
+ * Start the authentication process for the selected user.
+ *
+ * @param {object} event - jQuery.Event object from 'click' event.
+ */
+ start_authentication(event) {
+ var user_id = $(this).attr('id'),
+ selector = `.${ user_id }`,
+ user_session = _self.cache_get('user', user_id, 'session');
+
+ if (_self.auth_pending || null !== _self.selected_user) {
+ lightdm.cancel_authentication();
+ _self.log(`Authentication cancelled for ${ _self.selected_user }`);
+ _self.selected_user = null;
}
- /**
- * Replace '${i18n}' with translated string for all elements that
- * have the data-i18n attribute. This is for elements that are not generated
- * dynamically (they can be found in index.html).
- */
-
- }, {
- key: 'do_static_translations',
- value: function do_static_translations() {
- $('[data-i18n]').each(function () {
- var key = $(this).attr('data-i18n'),
- html = $(this).html(),
- translated = _self.translations[key],
- new_html = html.replace('${i18n}', translated);
-
- $(this).html(new_html);
- });
+ _self.log(`Starting authentication for ${ user_id }.`);
+ _self.selected_user = user_id;
+
+ // CSS hack to workaround webkit bug
+ if ($(_self.$user_list).children().length > 3) {
+ $(_self.$user_list).css('column-count', 'initial').parent().css('max-width', '50%');
}
+ $(selector).addClass('hovered').siblings().hide();
+ $('.fa-toggle-down').hide();
- /**
- * Start the authentication process for the selected user.
- *
- * @param {object} event - jQuery.Event object from 'click' event.
- */
-
- }, {
- key: 'start_authentication',
- value: function start_authentication(event) {
- var user_id = $(this).attr('id'),
- selector = '.' + user_id,
- user_session = _self.cache_get('user', user_id, 'session');
-
- if (_self.auth_pending || null !== _self.selected_user) {
- lightdm.cancel_authentication();
- _self.log('Authentication cancelled for ' + _self.selected_user);
- _self.selected_user = null;
- }
+ _self.log(`Session for ${ user_id } is ${ user_session }`);
- _self.log('Starting authentication for ' + user_id + '.');
- _self.selected_user = user_id;
+ $(`[data-session-id="${ user_session }"]`).parent().trigger('click', this);
- // CSS hack to workaround webkit bug
- if ($(_self.$user_list).children().length > 3) {
- $(_self.$user_list).css('column-count', 'initial').parent().css('max-width', '50%');
- }
- $(selector).addClass('hovered').siblings().hide();
- $('.fa-toggle-down').hide();
+ $('#session-list').removeClass('hidden').show();
+ $('#passwordArea').show();
+ $('.dropdown-toggle').dropdown();
- _self.log('Session for ' + user_id + ' is ' + user_session);
+ _self.auth_pending = true;
- $('[data-session-id="' + user_session + '"]').parent().trigger('click', this);
+ lightdm.authenticate(user_id);
+ }
- $('#session-list').removeClass('hidden').show();
- $('#passwordArea').show();
- $('.dropdown-toggle').dropdown();
+ /**
+ * Cancel the pending authentication.
+ *
+ * @param {object} event - jQuery.Event object from 'click' event.
+ */
+ cancel_authentication(event) {
+ var selectors = ['#statusArea', '#timerArea', '#passwordArea', '#session-list'];
+
+ for (var selector of selectors) {
+ $(selector).hide();
+ }
+
+ lightdm.cancel_authentication();
- _self.auth_pending = true;
+ _self.log('Cancelled authentication.');
- lightdm.authenticate(user_id);
+ // CSS hack to work-around webkit bug
+ if ($(_self.$user_list).children().length > 3) {
+ $(_self.$user_list).css('column-count', '2').parent().css('max-width', '85%');
}
- /**
- * Cancel the pending authentication.
- *
- * @param {object} event - jQuery.Event object from 'click' event.
- */
+ $('.hovered').removeClass('hovered').siblings().show();
+ $('.fa-toggle-down').show();
- }, {
- key: 'cancel_authentication',
- value: function cancel_authentication(event) {
- var selectors = ['#statusArea', '#timerArea', '#passwordArea', '#session-list'];
+ _self.selected_user = null;
+ _self.auth_pending = false;
+ }
- var _iteratorNormalCompletion9 = true;
- var _didIteratorError9 = false;
- var _iteratorError9 = undefined;
+ /**
+ * Called when the user attempts to authenticate (inputs password).
+ * We check to see if the user successfully authenticated and if so tell the LDM
+ * Greeter to log them in with the session they selected.
+ */
+ authentication_complete() {
+ var selected_session = $('.selected').attr('data-session-id'),
+ err_msg = _self.translations.auth_failed[_self.lang];
- try {
- for (var _iterator9 = selectors[Symbol.iterator](), _step9; !(_iteratorNormalCompletion9 = (_step9 = _iterator9.next()).done); _iteratorNormalCompletion9 = true) {
- var selector = _step9.value;
+ _self.auth_pending = false;
+ _self.cache_set(selected_session, 'user', lightdm.authentication_user, 'session');
- $(selector).hide();
- }
- } catch (err) {
- _didIteratorError9 = true;
- _iteratorError9 = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion9 && _iterator9.return) {
- _iterator9.return();
- }
- } finally {
- if (_didIteratorError9) {
- throw _iteratorError9;
- }
- }
- }
+ $('#timerArea').hide();
- lightdm.cancel_authentication();
+ if (lightdm.is_authenticated) {
+ // The user entered the correct password. Let's log them in.
+ $('body').fadeOut(1000);
+ lightdm.login(lightdm.authentication_user, selected_session);
+ } else {
+ // The user did not enter the correct password. Show error message.
+ $('#statusArea').show();
+ }
+ }
- _self.log('Cancelled authentication.');
+ submit_password(event) {
+ lightdm.respond($('#passwordField').val());
+ $('#passwordArea').hide();
+ $('#timerArea').show();
+ }
- // CSS hack to work-around webkit bug
- if ($(_self.$user_list).children().length > 3) {
- $(_self.$user_list).css('column-count', '2').parent().css('max-width', '85%');
- }
+ session_toggle_handler(event) {
+ var $session = $(this).children('a'),
+ session_name = $session.text(),
+ session_key = $session.attr('data-session-id');
- $('.hovered').removeClass('hovered').siblings().show();
- $('.fa-toggle-down').show();
+ $session.parents('.btn-group').find('.selected').attr('data-session-id', session_key).html(session_name);
+ }
- _self.selected_user = null;
- _self.auth_pending = false;
+ key_press_handler(event) {
+ var action;
+ switch (event.which) {
+ case 13:
+ action = _self.auth_pending ? _self.submit_password() : !_self.user_list_visible ? _self.show_user_list() : 0;
+ _self.log(action);
+ break;
+ case 27:
+ action = _self.auth_pending ? _self.cancel_authentication() : 0;
+ _self.log(action);
+ break;
+ case 32:
+ action = !_self.user_list_visible && !_self.auth_pending ? _self.show_user_list() : 0;
+ _self.log(action);
+ break;
+ default:
+ break;
}
+ }
- /**
- * Called when the user attempts to authenticate (inputs password).
- * We check to see if the user successfully authenticated and if so tell the LDM
- * Greeter to log them in with the session they selected.
- */
-
- }, {
- key: 'authentication_complete',
- value: function authentication_complete() {
- var selected_session = $('.selected').attr('data-session-id'),
- err_msg = _self.translations.auth_failed[_self.lang];
-
- _self.auth_pending = false;
- _self.cache_set(selected_session, 'user', lightdm.authentication_user, 'session');
-
- $('#timerArea').hide();
-
- if (lightdm.is_authenticated) {
- // The user entered the correct password. Let's log them in.
- $('body').fadeOut(1000);
- lightdm.login(lightdm.authentication_user, selected_session);
- } else {
- // The user did not enter the correct password. Show error message.
- $('#statusArea').show();
- }
- }
- }, {
- key: 'submit_password',
- value: function submit_password(event) {
- lightdm.respond($('#passwordField').val());
- $('#passwordArea').hide();
- $('#timerArea').show();
- }
- }, {
- key: 'session_toggle_handler',
- value: function session_toggle_handler(event) {
- var $session = $(this).children('a'),
- session_name = $session.text(),
- session_key = $session.attr('data-session-id');
-
- $session.parents('.btn-group').find('.selected').attr('data-session-id', session_key).html(session_name);
- }
- }, {
- key: 'key_press_handler',
- value: function key_press_handler(event) {
- var action;
- switch (event.which) {
- case 13:
- action = _self.auth_pending ? _self.submit_password() : !_self.user_list_visible ? _self.show_user_list() : 0;
- _self.log(action);
- break;
- case 27:
- action = _self.auth_pending ? _self.cancel_authentication() : 0;
- _self.log(action);
- break;
- case 32:
- action = !_self.user_list_visible && !_self.auth_pending ? _self.show_user_list() : 0;
- _self.log(action);
- break;
- default:
- break;
- }
- }
- }, {
- key: 'system_action_handler',
- value: function system_action_handler() {
- var _this4 = this;
-
- var action = $(this).attr('id'),
- $modal = $('.modal');
-
- $modal.find('.btn-primary').text(_self.translations[action]).click(action, function (event) {
- $(_this4).off('click');
- lightdm[event.data]();
- });
- $modal.find('.btn-default').click(function () {
- $(_this4).next().off('click');
- });
-
- $modal.modal('toggle');
- }
- }, {
- key: 'user_list_collapse_handler',
- 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);
- }
+ system_action_handler() {
+ var action = $(this).attr('id'),
+ $modal = $('.modal');
- /**
- * LightDM Callback - Show password prompt to user.
- *
- * @param text
- * @param type
- */
-
- }, {
- key: 'show_prompt',
- value: function show_prompt(text, type) {
- if ('password' === type) {
- $('#passwordField').val("");
- $('#passwordArea').show();
- $('#passwordField').focus();
- }
- }
+ $modal.find('.btn-primary').text(_self.translations[action]).click(action, event => {
+ $(this).off('click');
+ lightdm[event.data]();
+ });
+ $modal.find('.btn-default').click(() => {
+ $(this).next().off('click');
+ });
- /**
- * LightDM Callback - Show message to user.
- *
- * @param text
- */
-
- }, {
- key: 'show_message',
- value: function show_message(text, type) {
- if (text.length > 0) {
- $(this.$msg_area).html(text);
- $('#passwordArea').hide();
- $(this.$msg_area_container).show();
- }
+ $modal.modal('toggle');
+ }
+
+ user_list_collapse_handler() {
+ _self.user_list_visible = _self.$user_list.hasClass('in') ? true : false;
+ }
+
+ user_image_error_handler(event) {
+ $(this).off('error.antergos');
+ $(this).attr('src', _self.tux);
+ }
+
+ /**
+ * LightDM Callback - Show password prompt to user.
+ *
+ * @param text
+ * @param type
+ */
+ show_prompt(text, type) {
+ if ('password' === type) {
+ $('#passwordField').val("");
+ $('#passwordArea').show();
+ $('#passwordField').focus();
}
- }]);
+ }
- return AntergosTheme;
-})(GreeterThemeComponent);
+ /**
+ * LightDM Callback - Show message to user.
+ *
+ * @param text
+ */
+ show_message(text, type) {
+ if (text.length > 0) {
+ $(this.$msg_area).html(text);
+ $('#passwordArea').hide();
+ $(this.$msg_area_container).show();
+ }
+ }
+}
/**
* Initialize the theme once the window has loaded.
*/
-
-$(window).load(function () {
+$(window).load(() => {
_self = new AntergosTheme();
});
diff --git a/themes/antergos/js/greeter-compiled.js.map b/themes/antergos/js/greeter-compiled.js.map
index 1b9d03c..572d3bf 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,OAAO,EAAE,SAAS,CAAE,CAAC;AAClD,MAAI,CAAC,IAAI,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAE,GAAG,CAAE,CAAE,CAAC,CAAE,CAAC,WAAW,EAAE,CAAC;AACtE,MAAI,CAAC,YAAY,GAAG,MAAM,CAAC,gBAAgB,CAAC;;AAE5C,MAAK,WAAW,KAAK,OAAO,MAAM,CAAC,SAAS,CAAC,SAAS,EAAG;AACxD,SAAM,CAAC,SAAS,CAAC,SAAS,GAAG,CAAE,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAE,CAAC;GAC3D;;AAED,MAAI,CAAC,kBAAkB,EAAE,CAAC;EAC1B;;;;;;;AAAA;cAZI,qBAAqB;;sBAoBrB,IAAI,EAAG;AACX,OAAK,MAAM,KAAK,IAAI,CAAC,KAAK,EAAG;AAC5B,WAAO,CAAC,GAAG,CAAE,IAAI,CAAE,CAAC;IACpB;AACD,IAAC,CAAE,UAAU,CAAE,CAAC,MAAM,CAAK,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C,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;GAC/B;;;;;;;;;;;8BASY,IAAI,EAAE,IAAI,EAAG;AACzB,OAAK,UAAU,KAAK,IAAI,EAAG;AAC1B,KAAC,CAAE,gBAAgB,CAAE,CAAC,GAAG,CAAE,EAAE,CAAE,CAAC;AAChC,KAAC,CAAE,eAAe,CAAE,CAAC,IAAI,EAAE,CAAC;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
+{"version":3,"sources":["greeter.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,IAAI,QAAQ,IAAR;AACJ,IAAI,WAAW,IAAX;;;;;;;AAQJ,OAAO,SAAP,CAAiB,UAAjB,GAA8B,YAAW;AACxC,QAAO,KAAK,MAAL,CAAa,CAAb,EAAiB,WAAjB,KAAiC,KAAK,KAAL,CAAY,CAAZ,CAAjC,CADiC;CAAX;;;;;AAY9B,MAAM,qBAAN,CAA4B;;AAE3B,eAAc;AACb,OAAK,KAAL,GAAa,KAAK,SAAL,CAAgB,OAAhB,EAAyB,SAAzB,CAAb,CADa;AAEb,OAAK,IAAL,GAAY,OAAO,SAAP,CAAiB,Q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F,EAAQ,GAAR,CAAY,gBAAZ,EADiC;AAEjC,IAAE,IAAF,EAAQ,IAAR,CAAa,KAAb,EAAoB,MAAM,GAAN,CAApB,CAFiC;EAAlC;;;;;;;;AAvXiD,YAmYjD,CAAa,IAAb,EAAmB,IAAnB,EAA0B;AACzB,MAAK,eAAe,IAAf,EAAsB;AAC1B,KAAG,gBAAH,EAAsB,GAAtB,CAA2B,EAA3B,EAD0B;AAE1B,KAAG,eAAH,EAAqB,IAArB,GAF0B;AAG1B,KAAG,gBAAH,EAAsB,KAAtB,GAH0B;GAA3B;EADD;;;;;;;AAnYiD,aAgZjD,CAAc,IAAd,EAAoB,IAApB,EAA2B;AAC1B,MAAK,KAAK,MAAL,GAAc,CAAd,EAAkB;AACtB,KAAG,KAAK,SAAL,CAAH,CAAoB,IAApB,CAA0B,IAA1B,EADsB;AAEtB,KAAG,eAAH,EAAqB,IAArB,GAFsB;AAGtB,KAAG,KAAK,mBAAL,CAAH,CAA8B,IAA9B,GAHsB;GAAvB;EADD;CAhZD;;;;;AA6ZA,EAAG,MAAH,EAAY,IAAZ,CAAkB,MAAM;AACvB,SAAQ,IAAI,aAAJ,EAAR,CADuB;CAAN,CAAlB","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/**\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 05135c0..3993e21 100644
--- a/themes/antergos/js/greeter.js
+++ b/themes/antergos/js/greeter.js
@@ -263,6 +263,7 @@ class AntergosBackgroundManager extends GreeterThemeComponent {
+
/**
* This is the theme's main class object. It contains almost all the theme's logic.
*/