diff --git a/src/Web/autopilot-monitor-web/components/Navbar.tsx b/src/Web/autopilot-monitor-web/components/Navbar.tsx
index 6e863086..8c2b8622 100644
--- a/src/Web/autopilot-monitor-web/components/Navbar.tsx
+++ b/src/Web/autopilot-monitor-web/components/Navbar.tsx
@@ -104,6 +104,78 @@ export default function Navbar() {
return `${Math.floor(diffHours / 24)}d ago`;
};
+ const isTenantAdmin = user?.isTenantAdmin ?? false;
+
+ // Regular users (non-TenantAdmin): show minimal navbar with only Progress Portal
+ if (!isTenantAdmin && !user?.isGalacticAdmin) {
+ return (
+
+
+
+
+
+ Autopilot Monitor
+ v1.0.0
+
+
+
+ {/* User Menu */}
+
+
setShowUserMenu(!showUserMenu)} className="flex items-center space-x-2 p-2 rounded-lg hover:bg-gray-100 transition-colors">
+
+ {(() => {
+ if (user?.displayName) {
+ const names = user.displayName.split(' ');
+ if (names.length >= 2) {
+ return `${names[0].charAt(0)}${names[names.length - 1].charAt(0)}`.toUpperCase();
+ }
+ return user.displayName.charAt(0).toUpperCase();
+ }
+ return user?.upn?.charAt(0).toUpperCase() || 'U';
+ })()}
+
+
+
+
+
+ {showUserMenu && (
+
+
+
+ {(() => {
+ if (user?.displayName) {
+ const names = user.displayName.split(' ');
+ if (names.length >= 2) {
+ return `${names[0].charAt(0)}${names[names.length - 1].charAt(0)}`.toUpperCase();
+ }
+ return user.displayName.charAt(0).toUpperCase();
+ }
+ return user?.upn?.charAt(0).toUpperCase() || 'U';
+ })()}
+
+
+
{user?.displayName || 'User'}
+
{user?.upn}
+
+
+
+
{ logout(); setShowUserMenu(false); }} className="w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 flex items-center space-x-2">
+
+
+
+ Sign out
+
+
+
+ )}
+
+
+
+
+
+ );
+ }
+
return (
diff --git a/src/Web/autopilot-monitor-web/contexts/ThemeContext.tsx b/src/Web/autopilot-monitor-web/contexts/ThemeContext.tsx
index 089487b2..674a5284 100644
--- a/src/Web/autopilot-monitor-web/contexts/ThemeContext.tsx
+++ b/src/Web/autopilot-monitor-web/contexts/ThemeContext.tsx
@@ -17,14 +17,13 @@ const ThemeContext = createContext({
export function ThemeProvider({ children }: { children: React.ReactNode }) {
const [theme, setTheme] = useState("light");
- // Initialize from localStorage on mount
+ // Initialize from localStorage on mount, default is always "light"
useEffect(() => {
const stored = localStorage.getItem("theme") as Theme | null;
if (stored === "dark" || stored === "light") {
setTheme(stored);
- } else if (window.matchMedia("(prefers-color-scheme: dark)").matches) {
- setTheme("dark");
}
+ // No system preference fallback – default is always light
}, []);
// Apply class to and persist