diff --git a/themes/antergos/js/greeter-compiled.js b/themes/antergos/js/greeter-compiled.js index fd42d49..790af02 100644 --- a/themes/antergos/js/greeter-compiled.js +++ b/themes/antergos/js/greeter-compiled.js @@ -1,34 +1,8 @@ '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 ); - } - } +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; }; })(); - return function( Constructor, protoProps, staticProps ) { - if ( protoProps ) { - defineProperties( Constructor.prototype, protoProps ); - } - if ( staticProps ) { - defineProperties( Constructor, staticProps ); - } - return Constructor; - }; -})(); - -function _classCallCheck( instance, Constructor ) { - if ( ! (instance instanceof Constructor) ) { - throw new TypeError( "Cannot call a class as a function" ); - } -} +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } /* * @@ -68,39 +42,39 @@ var _self = null; * * @returns {string} */ -String.prototype.capitalize = function() { - return this.charAt( 0 ).toUpperCase() + this.slice( 1 ); +String.prototype.capitalize = function () { + return this.charAt(0).toUpperCase() + this.slice(1); }; /** * This is the theme's main class object. It contains almost all the theme's logic. */ -var AntergosTheme = (function() { +var AntergosTheme = (function () { function AntergosTheme() { - _classCallCheck( this, AntergosTheme ); + _classCallCheck(this, AntergosTheme); - if ( null !== _self ) { + if (null !== _self) { return _self; } - this.debug = this.cache_get( 'debug', 'enabled' ); + this.debug = this.cache_get('debug', 'enabled'); 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.lang = window.navigator.language.split( '-' )[ 0 ].toLowerCase(); + 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.lang = window.navigator.language.split('-')[0].toLowerCase(); this.translations = window.ant_translations; this.initialize(); } - _createClass( AntergosTheme, [ { + _createClass(AntergosTheme, [{ key: 'initialize', value: function initialize() { this.initialize_clock(); @@ -113,34 +87,34 @@ var AntergosTheme = (function() { } /** - * Add text to the debug log element (accessible from the login screen). - * - * @param {string} text - To be added to the log. - */ + * Add text to the debug log element (accessible from the login screen). + * + * @param {string} text - To be added to the log. + */ }, { key: 'log', - value: function log( text ) { - if ( 'true' === this.debug || true ) { - $( '#logArea' ).append( text + '
' ); + value: function log(text) { + if ('true' === this.debug || true) { + $('#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. - */ + * 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', - index = 0; + index = 0; - for ( var _len = arguments.length, key_parts = Array( _len ), _key = 0; _key < _len; _key ++ ) { - key_parts[ _key ] = arguments[ _key ]; + for (var _len = arguments.length, key_parts = Array(_len), _key = 0; _key < _len; _key++) { + key_parts[_key] = arguments[_key]; } var _iteratorNormalCompletion = true; @@ -148,46 +122,46 @@ var AntergosTheme = (function() { var _iteratorError = undefined; try { - for ( var _iterator = key_parts[ Symbol.iterator ](), _step; ! (_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true ) { + for (var _iterator = key_parts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var part = _step.value; key += ':' + part; index += 1; } - } catch ( err ) { + } catch (err) { _didIteratorError = true; _iteratorError = err; } finally { try { - if ( ! _iteratorNormalCompletion && _iterator.return ) { + if (!_iteratorNormalCompletion && _iterator.return) { _iterator.return(); } } finally { - if ( _didIteratorError ) { + if (_didIteratorError) { throw _iteratorError; } } } - return localStorage.getItem( key ); + 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. - */ + * 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 ) { + value: function cache_set(value) { var key = 'ant', - index = 0; + index = 0; - for ( var _len2 = arguments.length, key_parts = Array( _len2 > 1 ? _len2 - 1 : 0 ), _key2 = 1; _key2 < _len2; _key2 ++ ) { - key_parts[ _key2 - 1 ] = arguments[ _key2 ]; + 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; @@ -195,41 +169,41 @@ var AntergosTheme = (function() { var _iteratorError2 = undefined; try { - for ( var _iterator2 = key_parts[ Symbol.iterator ](), _step2; ! (_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true ) { + for (var _iterator2 = key_parts[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { var part = _step2.value; key += ':' + part; index += 1; } - } catch ( err ) { + } catch (err) { _didIteratorError2 = true; _iteratorError2 = err; } finally { try { - if ( ! _iteratorNormalCompletion2 && _iterator2.return ) { + if (!_iteratorNormalCompletion2 && _iterator2.return) { _iterator2.return(); } } finally { - if ( _didIteratorError2 ) { + if (_didIteratorError2) { throw _iteratorError2; } } } - return localStorage.setItem( key, value ); + return localStorage.setItem(key, value); } /** - * Register callbacks for the LDM Greeter as well as any others that haven't been - * registered elsewhere. - */ + * Register callbacks for the LDM Greeter as well as any others that haven't been registered + * elsewhere. + */ }, { key: 'register_callbacks', value: function register_callbacks() { - $( document ).keydown( this.key_press_handler ); - $( '.cancel_auth' ).click( this.cancel_authentication ); - $( '.submit_passwd' ).click( this.submit_password ); + $(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; @@ -238,14 +212,14 @@ var AntergosTheme = (function() { } /** - * Initialize the user list. - */ + * Initialize the user list. + */ }, { key: 'prepare_user_list', value: function prepare_user_list() { var tux = 'img/antergos-logo-user.png', - template; + template; // Loop through the array of LightDMUser objects to create our user list. var _iteratorNormalCompletion3 = true; @@ -253,55 +227,54 @@ var AntergosTheme = (function() { var _iteratorError3 = undefined; try { - for ( var _iterator3 = lightdm.users[ Symbol.iterator ](), _step3; ! (_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true ) { + for (var _iterator3 = lightdm.users[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { var user = _step3.value; - var last_session = this.cache_get( 'user', user.name, 'session' ), - image_src = user.image.length ? user.image : tux; + var last_session = this.cache_get('user', user.name, 'session'), + image_src = user.image.length ? user.image : tux; - if ( null === last_session ) { + 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 = 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' ); + this.cache_set(last_session, 'user', user.name, 'session'); } - this.log( 'Last session for ' + user.name + ' was: ' + last_session ); + this.log('Last session for ' + user.name + ' was: ' + last_session); template = '\n\t\t\t\t\n\t\t\t\t\t' + user.display_name + '\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 ).children( 'img' ).on( 'error', this.image_not_found ); + // 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).children('img').on('error', this.image_not_found); } // END for ( var user of lightdm.users ) - } catch ( err ) { + } catch (err) { _didIteratorError3 = true; _iteratorError3 = err; } finally { try { - if ( ! _iteratorNormalCompletion3 && _iterator3.return ) { + if (!_iteratorNormalCompletion3 && _iterator3.return) { _iterator3.return(); } } finally { - if ( _didIteratorError3 ) { + if (_didIteratorError3) { throw _iteratorError3; } } } - if ( $( this.$user_list ).children().length > 3 ) { + 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.$user_list).css('column-count', '2').parent().css('max-width', '85%'); } } /** - * Initialize the session selection dropdown. - */ + * Initialize the session selection dropdown. + */ }, { key: 'prepare_session_list', @@ -312,95 +285,95 @@ var AntergosTheme = (function() { var _iteratorError4 = undefined; try { - for ( var _iterator4 = lightdm.sessions[ Symbol.iterator ](), _step4; ! (_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true ) { + for (var _iterator4 = lightdm.sessions[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) { var session = _step4.value; - var css_class = session.name.replace( / /g, '' ), - template; + var css_class = session.name.replace(/ /g, ''), + template; - this.log( 'Adding ' + session.name + ' to the session list...' ); + 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 ); + $(template).appendTo(this.$session_list).click(this.session_toggle_handler); } // END for (var session of lightdm.sessions) - } catch ( err ) { + } catch (err) { _didIteratorError4 = true; _iteratorError4 = err; } finally { try { - if ( ! _iteratorNormalCompletion4 && _iterator4.return ) { + if (!_iteratorNormalCompletion4 && _iterator4.return) { _iterator4.return(); } } finally { - if ( _didIteratorError4 ) { + if (_didIteratorError4) { throw _iteratorError4; } } } - $( '.dropdown-toggle' ).dropdown(); + $('.dropdown-toggle').dropdown(); } /** - * Initialize the system action buttons - */ + * 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" - }, - template; + shutdown: "power-off", + hibernate: "asterisk", + suspend: "arrow-down", + restart: "refresh" + }, + template; var _iteratorNormalCompletion5 = true; var _didIteratorError5 = false; var _iteratorError5 = undefined; try { - for ( var _iterator5 = Object.keys( actions )[ Symbol.iterator ](), _step5; ! (_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true ) { + for (var _iterator5 = Object.keys(actions)[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) { var action = _step5.value; var cmd = 'can_' + action; - template = '\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t'; + template = '\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t'; - if ( lightdm[ cmd ] ) { - $( template ).appendTo( $( this.$actions_container ) ).click( action, function( event ) { - lightdm[ event.data ](); - } ); + if (lightdm[cmd]) { + $(template).appendTo($(this.$actions_container)).click(action, function (event) { + lightdm[event.data](); + }); } } // END for (var [action, icon] of actions) - } catch ( err ) { + } catch (err) { _didIteratorError5 = true; _iteratorError5 = err; } finally { try { - if ( ! _iteratorNormalCompletion5 && _iterator5.return ) { + if (!_iteratorNormalCompletion5 && _iterator5.return) { _iterator5.return(); } } finally { - if ( _didIteratorError5 ) { + if (_didIteratorError5) { throw _iteratorError5; } } } - $( '[data-toggle=tooltip]' ).tooltip(); + $('[data-toggle=tooltip]').tooltip(); } }, { key: 'initialize_clock', value: function initialize_clock() { var _this = this; - var saved_format = this.cache_get( 'clock', 'time_format' ), - format = null !== saved_format ? saved_format : 'LT', - detected_language = 'en'; - window.navigator.languages = typeof window.navigator.languages !== 'undefined' ? window.navigator.languages : [ window.navigator.language ]; + var saved_format = this.cache_get('clock', 'time_format'), + format = null !== saved_format ? saved_format : 'LT', + detected_language = 'en'; + window.navigator.languages = typeof window.navigator.languages !== 'undefined' ? window.navigator.languages : [window.navigator.language]; // Workaround for moment.js bug: https://github.com/moment/moment/issues/2856 var _iteratorNormalCompletion6 = true; @@ -408,57 +381,57 @@ var AntergosTheme = (function() { var _iteratorError6 = undefined; try { - for ( var _iterator6 = window.navigator.languages[ Symbol.iterator ](), _step6; ! (_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); _iteratorNormalCompletion6 = true ) { + for (var _iterator6 = window.navigator.languages[Symbol.iterator](), _step6; !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); _iteratorNormalCompletion6 = true) { var lang = _step6.value; try { - detected_language = lang.split( '-' )[ 0 ].toLowerCase(); + detected_language = lang.split('-')[0].toLowerCase(); break; - } catch ( err ) { - this.log( String( err ) ); + } catch (err) { + this.log(String(err)); } } - } catch ( err ) { + } catch (err) { _didIteratorError6 = true; _iteratorError6 = err; } finally { try { - if ( ! _iteratorNormalCompletion6 && _iterator6.return ) { + if (!_iteratorNormalCompletion6 && _iterator6.return) { _iterator6.return(); } } finally { - if ( _didIteratorError6 ) { + if (_didIteratorError6) { throw _iteratorError6; } } } - if ( null === detected_language ) { + if (null === detected_language) { detected_language = 'en'; } - moment.locale( detected_language ); - this.$clock.html( moment().format( format ) ); + moment.locale(detected_language); + this.$clock.html(moment().format(format)); - setInterval( function() { - _this.$clock.html( moment().format( format ) ); - }, 60000 ); + setInterval(function () { + _this.$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 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. + */ }, { key: 'show_user_list', value: function show_user_list() { - if ( $( this.$clock_container ).hasClass( 'in' ) ) { - $( '#trigger' ).trigger( 'click' ); + if ($(this.$clock_container).hasClass('in')) { + $('#trigger').trigger('click'); this.user_list_visible = true; } - if ( $( this.$user_list ).length <= 1 ) { - $( this.$user_list ).find( 'a' ).trigger( 'click', this ); + if ($(this.$user_list).length <= 1) { + $(this.$user_list).find('a').trigger('click', this); } } }, { @@ -466,8 +439,8 @@ var AntergosTheme = (function() { value: function prepare_login_panel_header() { var greeting = null; - if ( this.translations.hasOwnProperty( this.lang ) ) { - greeting = this.translations[ this.lang ]; + if (this.translations.hasOwnProperty(this.lang)) { + greeting = this.translations[this.lang]; } else { var _iteratorNormalCompletion7 = true; var _didIteratorError7 = false; @@ -475,24 +448,24 @@ var AntergosTheme = (function() { try { - for ( var _iterator7 = window.navigator.languages[ Symbol.iterator ](), _step7; ! (_iteratorNormalCompletion7 = (_step7 = _iterator7.next()).done); _iteratorNormalCompletion7 = true ) { + for (var _iterator7 = window.navigator.languages[Symbol.iterator](), _step7; !(_iteratorNormalCompletion7 = (_step7 = _iterator7.next()).done); _iteratorNormalCompletion7 = true) { var lang = _step7.value; - if ( this.translations.hasOwnProperty( lang ) ) { - greeting = this.translations[ lang ]; + if (this.translations.hasOwnProperty(lang)) { + greeting = this.translations[lang]; break; } } - } catch ( err ) { + } catch (err) { _didIteratorError7 = true; _iteratorError7 = err; } finally { try { - if ( ! _iteratorNormalCompletion7 && _iterator7.return ) { + if (!_iteratorNormalCompletion7 && _iterator7.return) { _iterator7.return(); } } finally { - if ( _didIteratorError7 ) { + if (_didIteratorError7) { throw _iteratorError7; } } @@ -501,83 +474,83 @@ var AntergosTheme = (function() { greeting = null === greeting ? 'Welcome!' : greeting; - $( '.welcome' ).text( greeting ); - $( '#hostname' ).append( lightdm.hostname ); + $('.welcome').text(greeting); + $('#hostname').append(lightdm.hostname); } /** - * Start the authentication process for the selected user. - * - * @param {object} event - jQuery.Event object from 'click' event. - */ + * 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' ); + 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 ) { + if (_self.auth_pending || null !== _self.selected_user) { lightdm.cancel_authentication(); - _self.log( 'Authentication cancelled for ' + _self.selected_user ); + _self.log('Authentication cancelled for ' + _self.selected_user); _self.selected_user = null; } - _self.log( 'Starting authentication for ' + user_id + '.' ); + _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%' ); + 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(); + $(selector).addClass('hovered').siblings().hide(); + $('.fa-toggle-down').hide(); - _self.log( 'Session for ' + user_id + ' is ' + user_session ); + _self.log('Session for ' + user_id + ' is ' + user_session); - $( '[data-session-id="' + user_session + '"]' ).parent().trigger( 'click', this ); + $('[data-session-id="' + user_session + '"]').parent().trigger('click', this); - $( '#session-list' ).removeClass( 'hidden' ).show(); - $( '#passwordArea' ).show(); - $( '.dropdown-toggle' ).dropdown(); + $('#session-list').removeClass('hidden').show(); + $('#passwordArea').show(); + $('.dropdown-toggle').dropdown(); _self.auth_pending = true; - lightdm.start_authentication( user_id ); + lightdm.start_authentication(user_id); } /** - * Cancel the pending authentication. - * - * @param {object} event - jQuery.Event object from 'click' event. - */ + * Cancel the pending authentication. + * + * @param {object} event - jQuery.Event object from 'click' event. + */ }, { key: 'cancel_authentication', - value: function cancel_authentication( event ) { - var selectors = [ '#statusArea', '#timerArea', '#passwordArea', '#session-list' ]; + value: function cancel_authentication(event) { + var selectors = ['#statusArea', '#timerArea', '#passwordArea', '#session-list']; var _iteratorNormalCompletion8 = true; var _didIteratorError8 = false; var _iteratorError8 = undefined; try { - for ( var _iterator8 = selectors[ Symbol.iterator ](), _step8; ! (_iteratorNormalCompletion8 = (_step8 = _iterator8.next()).done); _iteratorNormalCompletion8 = true ) { + for (var _iterator8 = selectors[Symbol.iterator](), _step8; !(_iteratorNormalCompletion8 = (_step8 = _iterator8.next()).done); _iteratorNormalCompletion8 = true) { var selector = _step8.value; - $( selector ).hide(); + $(selector).hide(); } - } catch ( err ) { + } catch (err) { _didIteratorError8 = true; _iteratorError8 = err; } finally { try { - if ( ! _iteratorNormalCompletion8 && _iterator8.return ) { + if (!_iteratorNormalCompletion8 && _iterator8.return) { _iterator8.return(); } } finally { - if ( _didIteratorError8 ) { + if (_didIteratorError8) { throw _iteratorError8; } } @@ -585,76 +558,76 @@ var AntergosTheme = (function() { lightdm.cancel_authentication(); - _self.log( 'Cancelled authentication.' ); + _self.log('Cancelled authentication.'); // 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%' ); + if ($(_self.$user_list).children().length > 3) { + $(_self.$user_list).css('column-count', '2').parent().css('max-width', '85%'); } - $( '.hovered' ).removeClass( 'hovered' ).siblings().show(); - $( '.fa-toggle-down' ).show(); + $('.hovered').removeClass('hovered').siblings().show(); + $('.fa-toggle-down').show(); _self.selected_user = null; _self.auth_pending = false; } /** - * 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. - */ + * 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' ); + var selected_session = $('.selected').attr('data-session-id'); _self.auth_pending = false; - _self.cache_set( selected_session, 'user', lightdm.authentication_user, 'session' ); + _self.cache_set(selected_session, 'user', lightdm.authentication_user, 'session'); - $( '#timerArea' ).hide(); + $('#timerArea').hide(); - if ( lightdm.is_authenticated ) { + if (lightdm.is_authenticated) { // The user entered the correct password. Let's log them in. - lightdm.login( lightdm.authentication_user, selected_session ); + lightdm.login(lightdm.authentication_user, selected_session); } else { // The user did not enter the correct password. Show error message. - $( '#statusArea' ).show(); + $('#statusArea').show(); } } }, { key: 'submit_password', - value: function submit_password( event ) { - lightdm.provide_secret( $( '#passwordField' ).val() ); - $( '#passwordArea' ).hide(); - $( '#timerArea' ).show(); + value: function submit_password(event) { + lightdm.provide_secret($('#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' ); + 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 ); + $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 ) { + value: function key_press_handler(event) { var action; - switch ( event.which ) { + switch (event.which) { case 13: - action = _self.auth_pending ? _self.submit_password() : ! _self.user_list_visible ? _self.show_user_list() : 0; - _self.log( action ); + 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 ); + _self.log(action); break; case 32: - action = ! _self.user_list_visible && ! _self.auth_pending ? _self.show_user_list() : 0; - _self.log( action ); + action = !_self.user_list_visible && !_self.auth_pending ? _self.show_user_list() : 0; + _self.log(action); break; default: break; @@ -662,48 +635,48 @@ var AntergosTheme = (function() { } /** - * User image on('error') handler. - */ + * User image on('error') handler. + */ }, { key: 'image_not_found', - value: function image_not_found( source ) { + value: function image_not_found(source) { source.onerror = ""; source.src = 'img/antergos-logo-user.png'; return true; } /** - * LightDM Callback - Show password prompt to user. - * - * @param text - */ + * LightDM Callback - Show password prompt to user. + * + * @param text + */ }, { key: 'show_prompt', - value: function show_prompt( text ) { + value: function show_prompt(text) { - $( '#passwordField' ).val( "" ); - $( '#passwordArea' ).show(); - $( '#passwordField' ).focus(); + $('#passwordField').val(""); + $('#passwordArea').show(); + $('#passwordField').focus(); } /** - * LightDM Callback - Show message to user. - * - * @param msg - */ + * LightDM Callback - Show message to user. + * + * @param msg + */ }, { key: 'show_message', - value: function show_message( msg ) { - if ( msg.length > 0 ) { - $( this.$msg_area ).html( msg ); - $( '#passwordArea' ).hide(); - $( this.$msg_area_container ).show(); + value: function show_message(msg) { + if (msg.length > 0) { + $(this.$msg_area).html(msg); + $('#passwordArea').hide(); + $(this.$msg_area_container).show(); } } - } ] ); + }]); return AntergosTheme; })(); @@ -712,8 +685,8 @@ var AntergosTheme = (function() { * Initialize the theme once the window has loaded. */ -$( window ).load( function() { +$(window).load(function () { _self = new AntergosTheme(); -} ); +}); //# sourceMappingURL=greeter-compiled.js.map \ No newline at end of file diff --git a/themes/antergos/js/greeter-compiled.js.map b/themes/antergos/js/greeter-compiled.js.map index bb6274f..1ef6617 100644 --- a/themes/antergos/js/greeter-compiled.js.map +++ b/themes/antergos/js/greeter-compiled.js.map @@ -1 +1 @@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M,GAAG,CAAC,EAAG;AACrB,KAAC,CAAE,IAAI,CAAC,SAAS,CAAE,CAAC,IAAI,CAAE,GAAG,CAAE,CAAC;AAChC,KAAC,CAAE,eAAe,CAAE,CAAC,IAAI,EAAE,CAAC;AAC5B,KAAC,CAAE,IAAI,CAAC,mBAAmB,CAAE,CAAC,IAAI,EAAE,CAAC;IACrC;GACD;;;QA/ZI,aAAa;;;;;;;AAsanB,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 * This is used to access our main class from within jQuery callbacks.\n */\nvar _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 * This is the theme's main class object. It contains almost all the theme's logic.\n */\nclass AntergosTheme {\n\n\tconstructor() {\n\t\tif (null !== _self) {\n\t\t\treturn _self;\n\t\t}\n\t\tthis.debug = this.cache_get( 'debug', 'enabled' );\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.lang = window.navigator.language.split( '-' )[ 0 ].toLowerCase();\n\t\tthis.translations = window.ant_translations;\n\n\t\tthis.initialize();\n\t}\n\n\tinitialize() {\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\n\t\tthis.register_callbacks();\n\t}\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 || true ) {\n\t\t\t$( '#logArea' ).append( `${text}
    ` );\n\t\t}\n\t}\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\t\t\tindex = 0;\n\n\t\tfor ( var part of key_parts ) {\n\t\t\tkey += `:${part}`;\n\t\t\tindex += 1;\n\t\t}\n\t\treturn localStorage.getItem( key );\n\t}\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\t\t\tindex = 0;\n\n\t\tfor ( var part of key_parts ) {\n\t\t\tkey += `:${part}`;\n\t\t\tindex += 1;\n\t\t}\n\t\treturn localStorage.setItem( key, value );\n\t}\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\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\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}\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\"${user.display_name}\"\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 ).children( 'img' ).on( 'error', this.image_not_found );\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( action, ( event ) => {\n\t\t\t\t\tlightdm[ event.data ]();\n\t\t\t\t} );\n\t\t\t}\n\t\t} // END for (var [action, icon] of actions)\n\n\t\t$( '[data-toggle=tooltip]' ).tooltip();\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\t\t\tdetected_language = 'en';\n\t\twindow.navigator.languages = (typeof window.navigator.languages !== 'undefined') ? window.navigator.languages : [ window.navigator.language ];\n\n\t\t// Workaround for moment.js bug: https://github.com/moment/moment/issues/2856\n\t\tfor ( var lang of window.navigator.languages ) {\n\t\t\ttry {\n\t\t\t\tdetected_language = lang.split( '-' )[ 0 ].toLowerCase();\n\t\t\t\tbreak;\n\t\t\t} catch ( err ) {\n\t\t\t\tthis.log( String( err ) );\n\t\t\t}\n\t\t}\n\n\t\tif ( null === detected_language ) {\n\t\t\tdetected_language = 'en';\n\t\t}\n\n\t\tmoment.locale( detected_language );\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\tthis.user_list_visible = true;\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\tprepare_login_panel_header() {\n\t\tvar greeting = null;\n\n\t\tif ( this.translations.hasOwnProperty( this.lang ) ) {\n\t\t\tgreeting = this.translations[ this.lang ];\n\n\t\t} else {\n\n\t\t\tfor ( var lang of window.navigator.languages ) {\n\t\t\t\tif ( this.translations.hasOwnProperty( lang ) ) {\n\t\t\t\t\tgreeting = this.translations[ lang ];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tgreeting = (null === greeting) ? 'Welcome!' : greeting;\n\n\t\t$( '.welcome' ).text( greeting );\n\t\t$( '#hostname' ).append( lightdm.hostname );\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.start_authentication( 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\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\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.provide_secret( $( '#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\t/**\n\t * User image on('error') handler.\n\t */\n\timage_not_found( source ) {\n\t\tsource.onerror = \"\";\n\t\tsource.src = 'img/antergos-logo-user.png';\n\t\treturn true;\n\t}\n\n\t/**\n\t * LightDM Callback - Show password prompt to user.\n\t *\n\t * @param text\n\t */\n\tshow_prompt( text ) {\n\n\t\t$( '#passwordField' ).val( \"\" );\n\t\t$( '#passwordArea' ).show();\n\t\t$( '#passwordField' ).focus();\n\t}\n\n\t/**\n\t * LightDM Callback - Show message to user.\n\t *\n\t * @param msg\n\t */\n\tshow_message( msg ) {\n\t\tif ( msg.length > 0 ) {\n\t\t\t$( this.$msg_area ).html( msg );\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;;;;;;;AAAC,AAQjB,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;IAMI,aAAa;AAElB,UAFK,aAAa,GAEJ;wBAFT,aAAa;;AAGjB,MAAI,IAAI,KAAK,KAAK,EAAE;AACnB,UAAO,KAAK,CAAC;GACb;AACD,MAAI,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,CAAE,OAAO,EAAE,SAAS,CAAE,CAAC;AAClD,MAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;AAC/B,MAAI,CAAC,YAAY,GAAG,KAAK,CAAC;AAC1B,MAAI,CAAC,aAAa,GAAG,IAAI,CAAC;AAC1B,MAAI,CAAC,UAAU,GAAG,CAAC,CAAE,aAAa,CAAE,CAAC;AACrC,MAAI,CAAC,aAAa,GAAG,CAAC,CAAE,WAAW,CAAE,CAAC;AACtC,MAAI,CAAC,gBAAgB,GAAG,CAAC,CAAE,cAAc,CAAE,CAAC;AAC5C,MAAI,CAAC,MAAM,GAAG,CAAC,CAAE,eAAe,CAAE,CAAC;AACnC,MAAI,CAAC,kBAAkB,GAAG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B,CAAC;AAC1C,UAAO,IAAI,CAAC;GACZ;;;;;;;;;;8BAOY,IAAI,EAAG;;AAEnB,IAAC,CAAE,gBAAgB,CAAE,CAAC,GAAG,CAAE,EAAE,CAAE,CAAC;AAChC,IAAC,CAAE,eAAe,CAAE,CAAC,IAAI,EAAE,CAAC;AAC5B,IAAC,CAAE,gBAAgB,CAAE,CAAC,KAAK,EAAE,CAAC;GAC9B;;;;;;;;;;+BAOa,GAAG,EAAG;AACnB,OAAK,GAAG,CAAC,MAAM,GAAG,CAAC,EAAG;AACrB,KAAC,CAAE,IAAI,CAAC,SAAS,CAAE,CAAC,IAAI,CAAE,GAAG,CAAE,CAAC;AAChC,KAAC,CAAE,eAAe,CAAE,CAAC,IAAI,EAAE,CAAC;AAC5B,KAAC,CAAE,IAAI,CAAC,mBAAmB,CAAE,CAAC,IAAI,EAAE,CAAC;IACrC;GACD;;;QA/ZI,aAAa;;;;;;;AAsanB,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 main class from within jQuery callbacks.\n */\nvar _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 * This is the theme's main class object. It contains almost all the theme's logic.\n */\nclass AntergosTheme {\n\n\tconstructor() {\n\t\tif (null !== _self) {\n\t\t\treturn _self;\n\t\t}\n\t\tthis.debug = this.cache_get( 'debug', 'enabled' );\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.lang = window.navigator.language.split( '-' )[ 0 ].toLowerCase();\n\t\tthis.translations = window.ant_translations;\n\n\t\tthis.initialize();\n\t}\n\n\tinitialize() {\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\n\t\tthis.register_callbacks();\n\t}\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 || true ) {\n\t\t\t$( '#logArea' ).append( `${text}
    ` );\n\t\t}\n\t}\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\t\t\tindex = 0;\n\n\t\tfor ( var part of key_parts ) {\n\t\t\tkey += `:${part}`;\n\t\t\tindex += 1;\n\t\t}\n\t\treturn localStorage.getItem( key );\n\t}\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\t\t\tindex = 0;\n\n\t\tfor ( var part of key_parts ) {\n\t\t\tkey += `:${part}`;\n\t\t\tindex += 1;\n\t\t}\n\t\treturn localStorage.setItem( key, value );\n\t}\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\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\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}\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\"${user.display_name}\"\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 ).children( 'img' ).on( 'error', this.image_not_found );\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( action, ( event ) => {\n\t\t\t\t\tlightdm[ event.data ]();\n\t\t\t\t} );\n\t\t\t}\n\t\t} // END for (var [action, icon] of actions)\n\n\t\t$( '[data-toggle=tooltip]' ).tooltip();\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\t\t\tdetected_language = 'en';\n\t\twindow.navigator.languages = (typeof window.navigator.languages !== 'undefined') ? window.navigator.languages : [ window.navigator.language ];\n\n\t\t// Workaround for moment.js bug: https://github.com/moment/moment/issues/2856\n\t\tfor ( var lang of window.navigator.languages ) {\n\t\t\ttry {\n\t\t\t\tdetected_language = lang.split( '-' )[ 0 ].toLowerCase();\n\t\t\t\tbreak;\n\t\t\t} catch ( err ) {\n\t\t\t\tthis.log( String( err ) );\n\t\t\t}\n\t\t}\n\n\t\tif ( null === detected_language ) {\n\t\t\tdetected_language = 'en';\n\t\t}\n\n\t\tmoment.locale( detected_language );\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\tthis.user_list_visible = true;\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\tprepare_login_panel_header() {\n\t\tvar greeting = null;\n\n\t\tif ( this.translations.hasOwnProperty( this.lang ) ) {\n\t\t\tgreeting = this.translations[ this.lang ];\n\n\t\t} else {\n\n\t\t\tfor ( var lang of window.navigator.languages ) {\n\t\t\t\tif ( this.translations.hasOwnProperty( lang ) ) {\n\t\t\t\t\tgreeting = this.translations[ lang ];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tgreeting = (null === greeting) ? 'Welcome!' : greeting;\n\n\t\t$( '.welcome' ).text( greeting );\n\t\t$( '#hostname' ).append( lightdm.hostname );\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.start_authentication( 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\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\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.provide_secret( $( '#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\t/**\n\t * User image on('error') handler.\n\t */\n\timage_not_found( source ) {\n\t\tsource.onerror = \"\";\n\t\tsource.src = 'img/antergos-logo-user.png';\n\t\treturn true;\n\t}\n\n\t/**\n\t * LightDM Callback - Show password prompt to user.\n\t *\n\t * @param text\n\t */\n\tshow_prompt( text ) {\n\n\t\t$( '#passwordField' ).val( \"\" );\n\t\t$( '#passwordArea' ).show();\n\t\t$( '#passwordField' ).focus();\n\t}\n\n\t/**\n\t * LightDM Callback - Show message to user.\n\t *\n\t * @param msg\n\t */\n\tshow_message( msg ) {\n\t\tif ( msg.length > 0 ) {\n\t\t\t$( this.$msg_area ).html( msg );\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 e26c599..4be3656 100644 --- a/themes/antergos/js/greeter.js +++ b/themes/antergos/js/greeter.js @@ -26,6 +26,7 @@ * along with this program. If not, see . */ + /** * This is used to access our main class from within jQuery callbacks. */