Browse Source

update mock.js to cover simple theme

sisyphus
Dustin Falgout 9 years ago
parent
commit
dc56e4ab40
  1. 20
      themes/antergos/js/mock.js

20
themes/antergos/js/mock.js

@ -44,6 +44,7 @@ if (typeof lightdm == 'undefined') {
lightdm.can_hibernate= true; lightdm.can_hibernate= true;
lightdm.can_restart= true; lightdm.can_restart= true;
lightdm.can_shutdown= true; lightdm.can_shutdown= true;
lightdm.awaiting_username = false;
lightdm.users = [ lightdm.users = [
{ name: "clarkk", real_name: "Superman", display_name: "Clark Kent", image: "", language: "en_US", layout: null, session: "gnome", logged_in: false }, { name: "clarkk", real_name: "Superman", display_name: "Clark Kent", image: "", language: "en_US", layout: null, session: "gnome", logged_in: false },
@ -85,6 +86,11 @@ if (typeof lightdm == 'undefined') {
}; };
lightdm.start_authentication= function(username) { lightdm.start_authentication= function(username) {
if ('undefined' === typeof username) {
show_prompt("Username?", 'text');
lightdm.awaiting_username = true;
return;
}
_lightdm_mock_check_argument_length(arguments, 1); _lightdm_mock_check_argument_length(arguments, 1);
if (lightdm._username) { if (lightdm._username) {
throw "Already authenticating!"; throw "Already authenticating!";
@ -136,6 +142,20 @@ if (typeof lightdm == 'undefined') {
alert("logged in successfully!!"); alert("logged in successfully!!");
document.location.reload(true); document.location.reload(true);
}; };
lightdm.authenticate = function(session) {
lightdm.login(null, session);
};
lightdm.respond = function(response) {
if (true === lightdm.awaiting_username) {
lightdm.awaiting_username = false;
lightdm.start_authentication(response);
} else {
lightdm.provide_secret(response);
}
};
lightdm.start_session_sync = function() {
lightdm.login(null, null);
};
if (lightdm.timed_login_delay > 0) { if (lightdm.timed_login_delay > 0) {
setTimeout(function() { if (!lightdm._timed_login_cancelled()) timed_login();}, lightdm.timed_login_delay); setTimeout(function() { if (!lightdm._timed_login_cancelled()) timed_login();}, lightdm.timed_login_delay);

Loading…
Cancel
Save