Added user icon even if the autologin is off
This commit is contained in:
parent
7311bd3224
commit
ec94bed45e
1 changed files with 60 additions and 40 deletions
|
|
@ -168,7 +168,7 @@ export default function Header(): JSX.Element {
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
{!autoLogin && (
|
|
||||||
<>
|
<>
|
||||||
<Separator orientation="vertical" />
|
<Separator orientation="vertical" />
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
|
|
@ -177,13 +177,32 @@ export default function Header(): JSX.Element {
|
||||||
className={
|
className={
|
||||||
"h-7 w-7 rounded-full focus-visible:outline-0 " +
|
"h-7 w-7 rounded-full focus-visible:outline-0 " +
|
||||||
(userData?.profile_image ??
|
(userData?.profile_image ??
|
||||||
gradients[
|
(userData?.id
|
||||||
|
? gradients[
|
||||||
parseInt(userData?.id ?? "", 30) % gradients.length
|
parseInt(userData?.id ?? "", 30) % gradients.length
|
||||||
])
|
]
|
||||||
|
: "bg-gray-500"))
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</DropdownMenuTrigger>
|
</DropdownMenuTrigger>
|
||||||
<DropdownMenuContent>
|
<DropdownMenuContent>
|
||||||
|
<DropdownMenuLabel>General</DropdownMenuLabel>
|
||||||
|
<DropdownMenuSeparator />
|
||||||
|
<DropdownMenuItem
|
||||||
|
className="cursor-pointer"
|
||||||
|
onClick={() => navigate("/global-variables")}
|
||||||
|
>
|
||||||
|
Global Variables
|
||||||
|
</DropdownMenuItem>
|
||||||
|
|
||||||
|
<DropdownMenuItem
|
||||||
|
className="cursor-pointer"
|
||||||
|
onClick={() => navigate("/shortcuts")}
|
||||||
|
>
|
||||||
|
Shortcuts
|
||||||
|
</DropdownMenuItem>
|
||||||
|
{!autoLogin && (
|
||||||
|
<>
|
||||||
<DropdownMenuLabel>My Account</DropdownMenuLabel>
|
<DropdownMenuLabel>My Account</DropdownMenuLabel>
|
||||||
<DropdownMenuSeparator />
|
<DropdownMenuSeparator />
|
||||||
{isAdmin && (
|
{isAdmin && (
|
||||||
|
|
@ -208,10 +227,11 @@ export default function Header(): JSX.Element {
|
||||||
>
|
>
|
||||||
Sign Out
|
Sign Out
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</DropdownMenuContent>
|
</DropdownMenuContent>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
</>
|
</>
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue