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