|
|
@ -1,7 +1,5 @@ |
|
|
|
const DEFAULT_USER = "defaultUser"; |
|
|
|
const DEFAULT_USER = "defaultUser"; |
|
|
|
const DEFAULT_SESSION = "defaultSession"; |
|
|
|
const DEFAULT_SESSION = "defaultSession"; |
|
|
|
const DEFAULT_WALLPAPPER = "defaultWallpapper"; |
|
|
|
|
|
|
|
const WALLPAPPER_ELEMENT = "wallpappers"; |
|
|
|
|
|
|
|
const WAITING_CLASS = "waiting"; |
|
|
|
const WAITING_CLASS = "waiting"; |
|
|
|
|
|
|
|
|
|
|
|
function togglePasswordVisibility() { |
|
|
|
function togglePasswordVisibility() { |
|
|
@ -108,13 +106,6 @@ function updateUser(username) { |
|
|
|
updateDefaultsInLocalstorage(); |
|
|
|
updateDefaultsInLocalstorage(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function updateWallpapper(wallpapper) { |
|
|
|
|
|
|
|
var body = document.getElementsByTagName('body')[0]; |
|
|
|
|
|
|
|
body.style.backgroundImage = `url(wallpappers/${wallpapper})`; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
updateDefaultsInLocalstorage(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function initGreeter() { |
|
|
|
function initGreeter() { |
|
|
|
|
|
|
|
|
|
|
|
let users = lightdm.users |
|
|
|
let users = lightdm.users |
|
|
@ -136,12 +127,14 @@ function initGreeter() { |
|
|
|
|
|
|
|
|
|
|
|
wallpappers.addEventListener('change', (event) => { |
|
|
|
wallpappers.addEventListener('change', (event) => { |
|
|
|
updateWallpapper(event.target.value); |
|
|
|
updateWallpapper(event.target.value); |
|
|
|
|
|
|
|
updateDefaultsInLocalstorage(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
let defaultWallpapper = window.localStorage.getItem(DEFAULT_WALLPAPPER); |
|
|
|
let defaultWallpapper = window.localStorage.getItem(DEFAULT_WALLPAPPER); |
|
|
|
if(defaultWallpapper) { |
|
|
|
if(defaultWallpapper) { |
|
|
|
selectItemByValue(wallpappers, defaultWallpapper); |
|
|
|
selectItemByValue(wallpappers, defaultWallpapper); |
|
|
|
updateWallpapper(defaultWallpapper); |
|
|
|
updateWallpapper(defaultWallpapper); |
|
|
|
|
|
|
|
updateDefaultsInLocalstorage(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
let sessions = lightdm.sessions |
|
|
|
let sessions = lightdm.sessions |
|
|
|