Update Oscars year to 2026 and add admin page
Co-authored-by: mathieumoran1 <[email protected]>
This commit is contained in:
co-authored by
mathieumoran1
parent
6108c8a40f
commit
f07547cc59
@@ -1,5 +1,5 @@
|
||||
window.onload = async function () {
|
||||
const targetDate = new Date('March 2, 2025');
|
||||
const targetDate = new Date('March 15, 2026');
|
||||
const currentDate = new Date();
|
||||
const timeDifference = targetDate - currentDate;
|
||||
const daysLeft = Math.floor(timeDifference / (1000 * 60 * 60 * 24));
|
||||
@@ -11,6 +11,10 @@ window.onload = async function () {
|
||||
const decoded = JSON.parse(atob(token.split('.')[1]));
|
||||
const userName = decoded.name;
|
||||
document.getElementById('user-name').textContent = userName;
|
||||
if (decoded.admin) {
|
||||
const adminLink = document.getElementById('admin-control-link');
|
||||
if (adminLink) adminLink.classList.remove('d-none');
|
||||
}
|
||||
|
||||
const currentTime = Math.floor(Date.now() / 1000);
|
||||
if (decoded.exp && decoded.exp < currentTime) {
|
||||
|
||||
Reference in New Issue
Block a user