diff --git a/.env.sample b/.env.sample index 4d54f0ad..65f5a816 100644 --- a/.env.sample +++ b/.env.sample @@ -21,7 +21,7 @@ BROWSER_TIMEOUT= IGNORE_UNAUTHORIZED_CA= IGNORE_HTTPS_ERRORS= IGNORE_URL_SIZE_LIMIT= -ADMINISTRATOR= +NEXT_PUBLIC_ADMIN= NEXT_PUBLIC_MAX_FILE_BUFFER= MONOLITH_MAX_BUFFER= MONOLITH_CUSTOM_OPTIONS= diff --git a/components/ProfileDropdown.tsx b/components/ProfileDropdown.tsx index c4e817b1..21ce54e7 100644 --- a/components/ProfileDropdown.tsx +++ b/components/ProfileDropdown.tsx @@ -11,6 +11,8 @@ export default function ProfileDropdown() { const { settings, updateSettings } = useLocalSettingsStore(); const { account } = useAccountStore(); + const isAdmin = account.id === Number(process.env.NEXT_PUBLIC_ADMIN || 1); + const handleToggle = () => { const newTheme = settings.theme === "dark" ? "light" : "dark"; updateSettings({ theme: newTheme }); @@ -29,7 +31,11 @@ export default function ProfileDropdown() { priority={true} /> -