4 <link rel="stylesheet" href="css/materialize.min.css">
16 #splash-screen-content {
25 /* border: 8px solid red; */
28 filter: blur(15px) contrast(127%) brightness(80%);
35 box-shadow: inset 0 0 100px black;
41 flex-direction: column;
42 background-color: white;
53 div#console .terminal {
55 background-color: rgba(0,0,0,0.8);
62 div#console .terminal text {
70 <script src="js/jquery-3.4.1.min.js"></script>
71 <script src="js/moment-with-locales.js"></script>
72 <script src="js/jquery-ui.min.js"></script>
73 <script src="js/materialize.min.js"></script>
74 <!-- <script src="js/lightdm-sample.js"></script> -->
75 <script src="js/theme.js"></script>
78 <!-- Debug Console -->
79 <div id="console" class="row">
83 <input type="checkbox" checked="true">
84 <span class="lever"></span>
90 <div class="terminal"></div>
93 <!-- End Debug Console -->
95 <div id="splash-screen">
96 <!--TODO autogenerate this content -->
97 <img class="splash-screen-img" src="images/splash-screen.jpg">
98 <div class="vignette"></div>
99 <div id="splash-screen-content">
100 <!--Content will be generated here -->
106 <div class="container">
107 <div class="row" style="margin-top: 35vh;"></div>
111 <div class="input-field col s4 offset-s4">
112 <select id="selectUser"></select>
117 <!-- Password field -->
119 <div class="input-field col s4 offset-s4">
120 <input id="inputPassword" type="password" class="validate">
121 <label for="inputPassword">Password</label>
124 <!-- End Password field -->
137 <!-- Window Manager Select -->
138 <div class="input-field col s2 offset-s1">
139 <select id="selectSession"></select>
140 <label>Select Session</label>
142 <!-- End Window Manager Select -->
144 <!-- Power Button -->
145 <div class="col offset-s8">
146 <img class="right" src="images/power.svg" width="40px" height="40px">
148 <!-- End Power Button -->
157 const greeter = new LoginManager();
159 // called after greeter and lightdm are initialized
160 $(greeter).ready(function() {
161 let $user = $("#selectUser");
162 let $session = $("#selectSession");
163 let $password = $("#inputPassword");
165 greeter.fillUserSelect($user);
166 greeter.fillSessionSelect($session);
168 // $("#debug").text(JSON.stringify(greeter.lightdm,null, 2));
169 $password.keypress((e) => {
170 let username = $user.children("option:selected").val();
171 let pass = $password.val();
173 /* attempt authentication, 'grant' event will be emitted on sucecss
174 and 'deny' will be emitted on failure */
176 greeter.auth(username, pass);
179 // when the user is authenticated do transitions and login
180 $(greeter).on("grant", () => {
181 let session_key = $session.children("option:selected").val();
182 greeter.login(session_key);
185 // inform the user that the credentials are invalid
186 $password.addClass("invalid");
189 $(greeter.splash).on("active", function() {
190 $(".active-appear").fadeIn();
191 }).on("inactive", function() {
192 $(".active-appear").fadeOut();
200 * Define this fuction so lightdm doesnt crash, gets resassigned
203 window.authentication_complete = function() {