diff --git a/README.md b/README.md index 0ce78d4..ce47e1d 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Basealt web-greeter-theme The lightdm web-greeter theme for altlinux OSes -![](https://git.markow.su/markow/git-utils/raw/branch/master/screenshots/web-greeter-theme-basealt-1.png) +![](https://git.markow.su/markow/git-utils/raw/branch/master/screenshots/web-greeter-theme-basealt.gif) # Install ``` diff --git a/index.yml b/index.yml new file mode 100644 index 0000000..c2d6dab --- /dev/null +++ b/index.yml @@ -0,0 +1,2 @@ +primary_html: "index.html" +secondary_html: "index.html" diff --git a/main.js b/main.js index e9202e3..92ae039 100755 --- a/main.js +++ b/main.js @@ -33,12 +33,15 @@ function toggleWaitingState(waiting) { function updateDefaults(user, session) { - localStorage.setItem(DEFAULT_USER, user) - localStorage.setItem(DEFAULT_SESSION, session) + console.log(user) + console.log(session) + window.localStorage.setItem(DEFAULT_USER, user) + window.localStorage.setItem(DEFAULT_SESSION, session) var wallpapper = document.getElementById(WALLPAPPER_ELEMENT).value 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() { 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); let select = document.getElementById('user-dropdown-content') @@ -123,14 +126,14 @@ function initGreeter() { updateWallpapper(event.target.value); }); - let defaultWallpapper = localStorage.getItem(DEFAULT_WALLPAPPER); + let defaultWallpapper = window.localStorage.getItem(DEFAULT_WALLPAPPER); if(defaultWallpapper) { selectItemByValue(wallpappers, defaultWallpapper); updateWallpapper(defaultWallpapper); } 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') for (let i = 0; i < sessions.length; i++) { var opt = document.createElement('option')