Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
927d036
feat: update account page to display faucet, activity and iexec account
ErwanDecoster Nov 25, 2025
0e05a81
feat: rename Faucet and Manage iExec Account file
ErwanDecoster Nov 25, 2025
cacfaef
feat: add dropdown menu to Navbar and update account management UI
ErwanDecoster Nov 25, 2025
d6adb2a
refactor: format options parameter in truncateAddress function for im…
ErwanDecoster Nov 25, 2025
e46490a
feat: update style
ErwanDecoster Nov 26, 2025
3613389
feat: add @clerk/themes dependency and integrate shadcn theme in Fauc…
ErwanDecoster Nov 26, 2025
a52c43d
feat: enhance account layout with wallet connection prompt and improv…
ErwanDecoster Nov 26, 2025
d148880
refactor: remove unused Breadcrumb components from Account and Faucet…
ErwanDecoster Nov 26, 2025
f5520d0
refactor: rename 'iExec Account' to 'Account' for consistency across …
ErwanDecoster Nov 26, 2025
4d729bb
refactor: update wallet connection rendering in account layout
ErwanDecoster Nov 26, 2025
e39964f
feat: add fallback redirect URL for SignIn component in Faucet module
ErwanDecoster Dec 4, 2025
17c9c0b
Merge branch 'main' into feature/update-account
ErwanDecoster Dec 4, 2025
7e86950
chore: update package-lock
ErwanDecoster Dec 4, 2025
572449e
chore: update package-lock
ErwanDecoster Dec 4, 2025
16a202a
feat: implement ManageIexecAccount component with wallet and account …
ErwanDecoster Dec 4, 2025
b592af0
feat: rename ManageIexecAccount component
ErwanDecoster Dec 4, 2025
8e2cd30
fix: update Navbar button to toggle menu instead of linking to account
ErwanDecoster Dec 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15,944 changes: 8,510 additions & 7,434 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@
},
"dependencies": {
"@clerk/clerk-react": "^5.51.0",
"@clerk/themes": "^2.4.40",
"@fontsource-variable/anybody": "^5.2.6",
"@fontsource-variable/mulish": "^5.2.6",
"@fontsource/space-mono": "^5.2.8",
"@hookform/resolvers": "^5.2.1",
"@icons-pack/react-simple-icons": "^13.7.0",
"@multiformats/multiaddr": "^12.5.1",
"@radix-ui/react-dialog": "^1.1.14",
"@radix-ui/react-dropdown-menu": "^2.1.16",
"@radix-ui/react-label": "^2.1.7",
"@radix-ui/react-select": "^2.2.5",
"@radix-ui/react-slot": "^1.2.3",
Expand Down
78 changes: 54 additions & 24 deletions src/components/navbar/NavBar.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
import { LogOut } from 'lucide-react';
import { cn } from '@/lib/utils.ts';
import { ArrowDown, LogOut } from 'lucide-react';
import { useState } from 'react';
import { useLoginLogout } from '@/hooks/useLoginLogout';
import useUserStore from '@/stores/useUser.store';
import { getAvatarVisualNumber } from '@/utils/getAvatarVisualNumber.ts';
import { truncateAddress } from '@/utils/truncateAddress.ts';
import iExecLogo from '../../assets/iexec-logo.svg';
import { ChainLink } from '../ChainLink.tsx';
import { ModeToggle } from '../ModeToggle.tsx';
import { Button } from '../ui/button.tsx';
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from '../ui/dropdown-menu.tsx';
import { AddressChip } from './AddressChip.tsx';
import { ChainSelector } from './ChainSelector.tsx';
import avatarStyles from './profile.module.css';

export function Navbar() {
const { isConnected, address: userAddress } = useUserStore();
Expand All @@ -17,6 +27,10 @@ export function Navbar() {
setMenuOpen((prevState) => !prevState);
};

const avatarVisualBg = getAvatarVisualNumber({
address: userAddress!,
});

return (
<nav className="flex items-center justify-between py-6">
<ChainLink to="/" className="-m-2 flex items-center gap-2 p-2 font-mono">
Expand All @@ -25,36 +39,51 @@ export function Navbar() {
</ChainLink>
<div className="mr-8 flex items-center gap-4 md:mr-0">
<Button variant="link" asChild className="text-foreground -mr-4">
<ChainLink to="/faucet">Faucet</ChainLink>
<ChainLink to="/account?accountTab=Faucet">Faucet</ChainLink>
</Button>
{isConnected && (
<div className="-mr-4 hidden md:flex">
<Button variant="link" asChild className="text-foreground">
<ChainLink to={`/address/${userAddress}?from=my_activity`}>
My activity
</ChainLink>
</Button>
<Button variant="link" asChild className="text-foreground">
<ChainLink to="/account">iExec Account</ChainLink>
</Button>
</div>
)}
<span className="border-secondary h-9 border-l" />
<div className="content hidden gap-4 md:flex">
<ModeToggle />
<ChainSelector />
</div>
{isConnected ? (
<div className="flex max-w-[1260px] items-center gap-2">
<AddressChip address={userAddress!} />

<button
type="button"
className="hover:drop-shadow-link-hover p-1"
onClick={() => logout()}
>
<LogOut size="20" />
</button>
<DropdownMenu>
<DropdownMenuTrigger className="text-primary bg-popover flex items-center gap-2 rounded-lg px-2 py-2">
<div
className={cn(
avatarStyles[avatarVisualBg],
'bg-background relative z-10 size-4 rounded-full bg-cover'
)}
/>
<span className="text-sm">
{truncateAddress(userAddress!, { startLen: 5, endLen: 3 })}
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The truncateAddress is called with explicit options { startLen: 5, endLen: 3 }, but these values aren't part of the predefined union type in the updated truncateAddress function signature. While the function now accepts number as a type (line 4-5 of truncateAddress.ts), this creates inconsistency. Consider using the predefined values or documenting why custom values are needed here.

Suggested change
{truncateAddress(userAddress!, { startLen: 5, endLen: 3 })}
{truncateAddress(userAddress!, { startLen: 4, endLen: 2 })}

Copilot uses AI. Check for mistakes.
</span>
<ArrowDown className="text-foreground" size={16} />
</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuItem>
<ChainLink to="/account?accountTab=Wallet+Activity">
Wallet Activity
</ChainLink>
</DropdownMenuItem>
<DropdownMenuItem>
<ChainLink to="/account?accountTab=Manage+iExec+Account">
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The URL parameter accountTab=Manage+iExec+Account doesn't match any tab titleText in the account page. The tabs array in account.tsx (line 132-156) defines tabs with titleText values: 'Faucet', 'Account', 'Wallet Activity', and 'Log out'. The value "Manage+iExec+Account" (or "Manage iExec Account") is not in this list, which means clicking this link will not navigate to the correct tab.

Suggested change
<ChainLink to="/account?accountTab=Manage+iExec+Account">
<ChainLink to="/account?accountTab=Account">

Copilot uses AI. Check for mistakes.
Account
</ChainLink>
</DropdownMenuItem>
<DropdownMenuItem>
<button
type="button"
className="inline-flex items-center gap-2"
onClick={() => logout()}
>
Logout
<LogOut size="20" />
</button>
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
</div>
) : (
<Button onClick={login}>
Expand Down Expand Up @@ -112,8 +141,9 @@ export function Navbar() {
variant="link"
asChild
className="text-foreground justify-baseline px-3"
onClick={handleMenuToggle}
>
<ChainLink to="/account">iExec Account</ChainLink>
<ChainLink to="/account?accountTab=Faucet">Faucet</ChainLink>
</Button>
<ChainSelector className="w-full border-0" />
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const alertVariants = cva(
variant: {
default: 'bg-card text-card-foreground',
destructive:
'text-destructive bg-danger border-danger-border [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90 border-l-4',
'text-destructive bg-destructive/5 border-danger-border [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90 border-l-4',
},
},
defaultVariants: {
Expand Down
Loading
Loading