From b6461b3d628d9e8859d7bd5281bce971c0bf38e8 Mon Sep 17 00:00:00 2001 From: Z User Date: Sat, 28 Mar 2026 00:52:21 +0000 Subject: [PATCH] Add admin button to dashboard (visible only for admins) --- dashboard.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dashboard.html b/dashboard.html index 6f972c7..5fbc186 100644 --- a/dashboard.html +++ b/dashboard.html @@ -110,6 +110,9 @@
+ @@ -292,6 +295,11 @@ document.getElementById('userEmail').textContent = user.email || ''; document.getElementById('welcomeName').textContent = user.name || 'User'; + // Show admin button if user is admin + if (user.role === 'admin') { + document.getElementById('adminBtn').classList.remove('hidden'); + } + // Avatar const avatar = document.getElementById('userAvatar'); if (user.picture) {