diff options
Diffstat (limited to 'views')
| -rw-r--r-- | views/dashboard.ejs | 42 | ||||
| -rw-r--r-- | views/error.ejs | 4 | ||||
| -rw-r--r-- | views/index.ejs | 6 | ||||
| -rw-r--r-- | views/password.ejs | 22 | ||||
| -rw-r--r-- | views/register.ejs | 5 | ||||
| -rw-r--r-- | views/success.ejs | 7 |
6 files changed, 62 insertions, 24 deletions
diff --git a/views/dashboard.ejs b/views/dashboard.ejs index 1c7996b..b7c82d5 100644 --- a/views/dashboard.ejs +++ b/views/dashboard.ejs @@ -9,12 +9,44 @@ <body> <div class="background"></div> <div class="container"> - <img src="img/logo.png" alt="logo" width="200"> + <img src="/img/logo.png" alt="logo" width="200"> <h1>Welcome, <%= username %>!</h1> - <h2>FreeSO Username: <%= fso_username %></h2> - <a href="#" class="button">Change Password</a> - <a href="#" class="button">Download bnbSO Client</a> + <h2>bnbSO Username: <%= fso_username %></h2> + <h2 id="simtime"></h2> + <a href="/password" class="button">Change Password</a> + <a href="https://fso-builds.riperiperi.workers.dev" class="button">Download bnbSO Client</a> <a href="/logout" class="button logout">Logout</a> </div> + <script> + function updateTSOClock() { + const currentTime = new Date(), + utcMinutes = currentTime.getUTCMinutes(), + utcSeconds = currentTime.getUTCSeconds(); + let timePeriod = 'AM', totalSeconds = 0; + if (currentTime.getUTCHours() % 2 === 1) { + totalSeconds = 3600; + timePeriod = 'PM'; + } + totalSeconds += utcMinutes * 60 + utcSeconds; + let hour = Math.floor(totalSeconds / 300); + if (hour > 12) { + hour -= 12; + } + if (hour === 0) { + hour = 12; + } + let minute = Math.floor(totalSeconds % 300 / 5); + if (minute < 10) { + minute = '0' + minute; + } + const simTimeElement = document.querySelector('#simtime'); + if (simTimeElement) { + simTimeElement.textContent = `${hour}:${minute} ${timePeriod}`; + } + } + + setInterval(updateTSOClock, 1000); + updateTSOClock(); + </script> </body> -</html>
\ No newline at end of file +</html> diff --git a/views/error.ejs b/views/error.ejs index dc138e6..b867d30 100644 --- a/views/error.ejs +++ b/views/error.ejs @@ -9,9 +9,9 @@ <body> <div class="background"></div> <div class="container"> - <img src="img/logo.png" alt="logo" width="200"> + <img src="/img/logo.png" alt="logo" width="200"> <h1>Oh no! Something went wrong!</h1> <p><%= error %></p> </div> </body> -</html>
\ No newline at end of file +</html> diff --git a/views/index.ejs b/views/index.ejs index e786bd3..7a9b8a4 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -9,10 +9,10 @@ <body> <div class="background"></div> <div class="container"> - <img src="img/logo.png" alt="logo" width="200"> + <img src="/img/logo.png" alt="logo" width="200"> <p>Log into your Discord account to get access to bnbSO.</p> <p><i>You must be a bits & Bytes member.</i></p> - <a class="button discord" href="/auth/discord">Login with Discord</a> + <a class="button discord" href="/auth/discord">Login with Discord</a> </div> </body> -</html>
\ No newline at end of file +</html> diff --git a/views/password.ejs b/views/password.ejs index f66b60b..8033aae 100644 --- a/views/password.ejs +++ b/views/password.ejs @@ -9,18 +9,22 @@ <body> <div class="background"></div> <div class="container"> - <img src="img/logo.png" alt="logo" width="200"> + <img src="/img/logo.png" alt="logo" width="200"> <h1>Change Password</h1> - <p>If you have issues changing your password, ask the server operator to change your password.</p> - <form method="post" action="/login"> - <label for="username">Username:</label> - <input type="text" id="username" name="username"> - <label for="password">Current Password:</label> - <input type="password" id="password" name="password"> - <button type="submit">Login</button> + <p>If you have issues changing your password, ask the server operator to reset your password.</p> + <form method="post" action="/password/change"> + <label for="currentpassword">Current Password:</label> + <input type="password" id="currentpassword" name="currentpassword"> + <label for="newpassword">New Password:</label> + <input type="password" id="newpassword" name="newpassword"> + <label for="newpassword2">Confirm New Password:</label> + <input type="password" id="newpassword2" name="newpassword2"> + <button type="submit">Change Password</button> </form> + <a href="/" class="button">Dashboard</a> <% if (typeof error !== 'undefined') { %> <div class="error"><%= error %></div> <% } %> + </div> </body> -</html>
\ No newline at end of file +</html> diff --git a/views/register.ejs b/views/register.ejs index f417f82..d54013d 100644 --- a/views/register.ejs +++ b/views/register.ejs @@ -9,7 +9,7 @@ <body> <div class="background"></div> <div class="container"> - <img src="img/logo.png" alt="logo" width="200"> + <img src="/img/logo.png" alt="logo" width="200"> <h1>Welcome to bnbSO!</h1> <p>You will be sending the following information to register your bnbSO account</p> <p>Please verify that the following information is correct. You can only change your username <b>once</b>.</p> @@ -25,5 +25,6 @@ <% if (typeof error !== 'undefined') { %> <div class="error"><%= error %></div> <% } %> + </div> </body> -</html>
\ No newline at end of file +</html> diff --git a/views/success.ejs b/views/success.ejs index 2ec9771..f87ea2f 100644 --- a/views/success.ejs +++ b/views/success.ejs @@ -9,9 +9,10 @@ <body> <div class="background"></div> <div class="container"> - <img src="img/logo.png" alt="logo" width="200"> - <p>Created account successfully!</p> + <img src="/img/logo.png" alt="logo" width="200"> + <h1>Success!</h1> + <p class="success"><%= success %></p> <a href="/">Dashboard</a> </div> </body> -</html>
\ No newline at end of file +</html> |
