|
|
@ -33,12 +33,15 @@ function toggleWaitingState(waiting) { |
|
|
|
|
|
|
|
|
|
|
|
function updateDefaults(user, session) { |
|
|
|
function updateDefaults(user, session) { |
|
|
|
|
|
|
|
|
|
|
|
localStorage.setItem(DEFAULT_USER, user) |
|
|
|
console.log(user) |
|
|
|
localStorage.setItem(DEFAULT_SESSION, session) |
|
|
|
console.log(session) |
|
|
|
|
|
|
|
window.localStorage.setItem(DEFAULT_USER, user) |
|
|
|
|
|
|
|
window.localStorage.setItem(DEFAULT_SESSION, session) |
|
|
|
|
|
|
|
|
|
|
|
var wallpapper = document.getElementById(WALLPAPPER_ELEMENT).value |
|
|
|
var wallpapper = document.getElementById(WALLPAPPER_ELEMENT).value |
|
|
|
if(wallpapper) { |
|
|
|
if(wallpapper) { |
|
|
|
localStorage.setItem(DEFAULT_WALLPAPPER, wallpapper) |
|
|
|
console.log(wallpapper) |
|
|
|
|
|
|
|
window.localStorage.setItem(DEFAULT_WALLPAPPER, wallpapper) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -103,7 +106,7 @@ function updateWallpapper(wallpapper) { |
|
|
|
function initGreeter() { |
|
|
|
function initGreeter() { |
|
|
|
|
|
|
|
|
|
|
|
let users = lightdm.users |
|
|
|
let users = lightdm.users |
|
|
|
let defaultUser = localStorage.getItem(DEFAULT_USER) || users[0].username; |
|
|
|
let defaultUser = window.localStorage.getItem(DEFAULT_USER) || users[0].username; |
|
|
|
updateUser(defaultUser); |
|
|
|
updateUser(defaultUser); |
|
|
|
|
|
|
|
|
|
|
|
let select = document.getElementById('user-dropdown-content') |
|
|
|
let select = document.getElementById('user-dropdown-content') |
|
|
@ -123,14 +126,14 @@ function initGreeter() { |
|
|
|
updateWallpapper(event.target.value); |
|
|
|
updateWallpapper(event.target.value); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
let defaultWallpapper = 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); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
let sessions = lightdm.sessions |
|
|
|
let sessions = lightdm.sessions |
|
|
|
let defaultSession = localStorage.getItem(DEFAULT_SESSION) || sessions[0].key; |
|
|
|
let defaultSession = window.localStorage.getItem(DEFAULT_SESSION) || sessions[0].key; |
|
|
|
let sessionsSelect = document.getElementById('sessions') |
|
|
|
let sessionsSelect = document.getElementById('sessions') |
|
|
|
for (let i = 0; i < sessions.length; i++) { |
|
|
|
for (let i = 0; i < sessions.length; i++) { |
|
|
|
var opt = document.createElement('option') |
|
|
|
var opt = document.createElement('option') |
|
|
|