You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1 lines
34 KiB

{"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,QAAjB,CAA0B,KAA1B,CAAiC,GAAjC,EAAwC,CAAxC,EAA4C,WAA5C,EAAZ,CAFa;AAGb,OAAK,YAAL,GAAoB,OAAO,gBAAP,CAHP;;AAKb,MAAK,gBAAgB,OAAO,OAAO,SAAP,CAAiB,SAAjB,EAA6B;AACxD,UAAO,SAAP,CAAiB,SAAjB,GAA6B,CAAE,OAAO,SAAP,CAAiB,QAAjB,CAA/B,CADwD;GAAzD;;AAIA,OAAK,kBAAL,GATa;EAAd;;;;;;;AAF2B,IAoB3B,CAAK,IAAL,EAAY;AACX,MAAK,WAAW,KAAK,KAAL,EAAa;AAC5B,WAAQ,GAAR,CAAa,IAAb,EAD4B;GAA7B;AAGA,IAAG,UAAH,EAAgB,MAAhB,CAAwB,CAAC,GAAE,IAAH,EAAQ,KAAR,CAAxB,EAJW;EAAZ;;;;;;;;AApB2B,UAkC3B,CAAW,GAAG,SAAH,EAAe;AACzB,MAAI,MAAM,CAAC,GAAD,CAAN,CADqB;;AAGzB,OAAM,IAAI,IAAJ,IAAY,SAAlB,EAA8B;AAC7B,UAAO,CAAC,CAAD,GAAI,IAAJ,EAAS,CA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AI,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 <http://www.gnu.org/licenses/>.\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}<br/>` );\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 = $('<a href=\"#\"><img>'),\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<a href=\"#\" id=\"${user.name}\" class=\"list-group-item ${user.name}\" data-session=\"${last_session}\">\n\t\t\t\t\t<img src=\"${image_src}\" class=\"img-circle\" alt=\"${user.display_name}\" />\n\t\t\t\t\t<span>${user.display_name}</span>\n\t\t\t\t\t<span class=\"badge\"><i class=\"fa fa-check\"></i></span>\n\t\t\t\t</a>`;\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<li>\n\t\t\t\t\t<a href=\"#\" data-session-id=\"${session.key}\" class=\"${css_class}\">${session.name}</a>\n\t\t\t\t</li>`;\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<a href=\"#\" id=\"${action}\" class=\"btn btn-default ${action}\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"${action.capitalize()}\" data-container=\"body\">\n\t\t\t\t\t<i class=\"fa fa-${actions[ action ]}\"></i>\n\t\t\t\t</a>`;\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"]}