|
|
|
@ -45,6 +45,16 @@ function updateDefaults(user, session) {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function updateDefaultsInLocalstorage() { |
|
|
|
|
var user = document.getElementById("user").textContent |
|
|
|
|
var session = document.getElementById("sessions").value |
|
|
|
|
if (!user || !session) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
updateDefaults(user, session); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function dateFormat(date) { |
|
|
|
|
var parts=date.split('.'); |
|
|
|
|
var options = { weekday: 'long', month: 'long', day: 'numeric' }; |
|
|
|
@ -75,8 +85,6 @@ function doLogin() {
|
|
|
|
|
|
|
|
|
|
lightdm.cancel_authentication(); |
|
|
|
|
|
|
|
|
|
updateDefaults(user, session); |
|
|
|
|
|
|
|
|
|
toggleWaitingState(true); |
|
|
|
|
lightdm.authenticate(user) |
|
|
|
|
return false; |
|
|
|
@ -96,11 +104,15 @@ function updateUser(username) {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
updateDefaultsInLocalstorage(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function updateWallpapper(wallpapper) { |
|
|
|
|
var body = document.getElementsByTagName('body')[0]; |
|
|
|
|
body.style.backgroundImage = `url(wallpappers/${wallpapper})`; |
|
|
|
|
|
|
|
|
|
updateDefaultsInLocalstorage(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function initGreeter() { |
|
|
|
@ -147,6 +159,10 @@ function initGreeter() {
|
|
|
|
|
} |
|
|
|
|
sessionsSelect.value = defaultSession; |
|
|
|
|
|
|
|
|
|
sessionsSelect.addEventListener('change', (event) => { |
|
|
|
|
updateDefaultsInLocalstorage(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
document.getElementById("date").textContent=dateFormat(theme_utils.get_current_localized_date()); |
|
|
|
|
document.getElementById("time").textContent=theme_utils.get_current_localized_time(); |
|
|
|
|
|
|
|
|
|