diff --git a/themes/gruvbox/index.html b/themes/gruvbox/index.html index 4c28c45..cff2f8e 100644 --- a/themes/gruvbox/index.html +++ b/themes/gruvbox/index.html @@ -3,8 +3,13 @@ + + + + + Gruvbox greeter diff --git a/themes/gruvbox/js/debug.js b/themes/gruvbox/js/debug.js index cf49329..c3a3a32 100644 --- a/themes/gruvbox/js/debug.js +++ b/themes/gruvbox/js/debug.js @@ -1,6 +1,6 @@ class Debug { constructor() { - this._debugPass = "just" + this._debugPass = "pes" this._init() } @@ -18,7 +18,12 @@ class Debug { } } - window.lightdm = { + if (!window.lightdm) { + window.lightdm = {} + } + + var local_lightdm = { + default_password: "pes", is_authenticated: false, authentication_user: null, default_session: "awesome", @@ -126,5 +131,16 @@ class Debug { if (lightdm.brightness < 0) lightdm.brightness = 0 } } + + if (lightdm.mock == undefined) { + window.lightdm = {} + Object.assign(window.lightdm, local_lightdm) + } else { + Object.keys(local_lightdm).forEach((key) => { + var realKey = `_${key}` + lightdm[realKey] = local_lightdm[key] + }) + } + } } diff --git a/themes/gruvbox/js/power.js b/themes/gruvbox/js/power.js index 19585ca..d70e3b3 100644 --- a/themes/gruvbox/js/power.js +++ b/themes/gruvbox/js/power.js @@ -14,20 +14,24 @@ class Power { this._cover.classList.remove("hide") } - _do_shutdown() { + async _do_shutdown() { this._show_message("Shutting down") + await wait(1000) lightdm.shutdown() } - _do_restart() { + async _do_restart() { this._show_message("Restarting") + await wait(1000) lightdm.restart() } - _do_hibernate() { + async _do_hibernate() { this._show_message("Hibernating") + await wait(1000) lightdm.hibernate() } - _do_suspend() { + async _do_suspend() { this._show_message("Suspending") + await wait(1000) lightdm.suspend() }