Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(wallet-dashboard): add styles for non visual assets #3761

Merged
Changes from 2 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
b0c9983
feat(wallet-dashboard): add protected layout
VmMad Oct 25, 2024
670f496
feat: add missing TopNav
VmMad Oct 28, 2024
d43a921
fix: tests
VmMad Oct 28, 2024
5ba9405
Merge branch 'develop' into tooling-dashboard/add-connected-layout
VmMad Oct 28, 2024
1100c2c
fix: imports
VmMad Oct 28, 2024
0f30b19
Merge branch 'develop' into tooling-dashboard/add-connected-layout
evavirseda Oct 28, 2024
a74ff0e
feat(wallet-dashboard): add assets page
VmMad Oct 28, 2024
9d4abe6
Merge branch 'tooling-dashboard/add-connected-layout' into tooling-da…
VmMad Oct 28, 2024
37ce97e
fix: add missing themes
VmMad Oct 28, 2024
8a8f711
Merge branch 'tooling-dashboard/add-connected-layout' into tooling-da…
VmMad Oct 28, 2024
6de4fc2
feat: improve connect button size
VmMad Oct 28, 2024
bc4612b
revert: "feat: improve connect button size"
VmMad Oct 28, 2024
516126f
Merge branch 'develop' into tooling-dashboard/add-assets-layout
VmMad Oct 29, 2024
551b48f
feat(wallet-dashboard): add grid for visual assets
VmMad Oct 29, 2024
546ac20
feat(Wallet-dashboard): add styles for non visual assets
VmMad Oct 29, 2024
ea32c22
refactor: remove unnecessary useMemo
VmMad Oct 30, 2024
8b5348a
fix: remove commented lines
VmMad Oct 30, 2024
f6ddc10
Merge branch 'develop' into tooling-dashboard/add-assets-layout
evavirseda Oct 30, 2024
a4db526
Merge branch 'tooling-dashboard/add-assets-layout' into tooling-dashb…
VmMad Nov 4, 2024
0753921
fix: improve type
VmMad Nov 6, 2024
f0131a0
Merge branch 'develop' into tooling-dashboard/add-assets-styles
VmMad Nov 6, 2024
9c5032e
fix: update IotaLogo
VmMad Nov 6, 2024
c88f22f
Merge branch 'tooling-dashboard/add-assets-styles' into tooling-dashb…
cpl121 Nov 6, 2024
eca8997
refactor: use explorer link and remove unnecessary code
VmMad Nov 7, 2024
f05b525
Merge branch 'develop' into tooling-dashboard/add-other-assets-styles
VmMad Nov 7, 2024
3540091
fix: bring back more details for visual sset details
VmMad Nov 7, 2024
889fe4e
fix: update to make it as reviewed
VmMad Nov 7, 2024
92f2afa
refactor: move explorer link generation logic to core
VmMad Nov 7, 2024
c1c5264
fix: update imports
VmMad Nov 7, 2024
79e89ba
fix: copy comment
VmMad Nov 8, 2024
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
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ import { AssetCard, Button, RouteLink, SendAssetPopup } from '@/components';
import { isAssetTransferable, useGetObject } from '@iota/core';
import { usePopups } from '@/hooks';
import { useCurrentAccount } from '@iota/dapp-kit';
import { ASSETS_ROUTE } from '@/lib/constants/routes.constants';

const VisualAssetDetailPage = () => {
const params = useParams();
@@ -28,7 +29,7 @@ const VisualAssetDetailPage = () => {

return (
<div className="flex h-full w-full flex-col space-y-4 px-40">
<RouteLink path="/assets" title="Back" />
<RouteLink path={ASSETS_ROUTE.path} title="Back" />
{asset?.data ? (
<AssetCard key={asset.data.objectId} asset={asset.data} />
) : (
Original file line number Diff line number Diff line change
@@ -4,17 +4,19 @@
'use client';

import type { ProtectedRoute } from '@/lib/interfaces';
import { NavbarItem } from '@iota/apps-ui-kit';
import { NavbarItem, Tooltip, TooltipPosition } from '@iota/apps-ui-kit';
import { usePathname } from 'next/navigation';
import Link from 'next/link';

export function SidebarItem({ icon, path }: ProtectedRoute) {
export function SidebarItem({ icon, title, path }: ProtectedRoute) {
const pathname = usePathname();
const RouteIcon = icon;
const isActive = pathname === path;
return (
<Link href={path} className="px-sm py-xxs">
<NavbarItem isSelected={isActive} icon={<RouteIcon />} />
</Link>
<Tooltip text={title} position={TooltipPosition.Right}>
<Link href={path} className="relative px-sm py-xxs">
<NavbarItem isSelected={isActive} icon={<RouteIcon />} />
</Link>
</Tooltip>
);
}
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ import { Settings } from '@iota/ui-icons';

export function TopNav() {
return (
<div className="flex w-full flex-row items-center justify-end gap-md py-xs--rs">
<div className="flex h-[52px] w-full flex-row items-center justify-end gap-md py-xs--rs">
<Badge label="Mainnet" type={BadgeType.PrimarySoft} />
<ConnectButton />
<Button icon={<Settings />} type={ButtonType.Ghost} />
17 changes: 14 additions & 3 deletions apps/wallet-dashboard/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ import { Inter } from 'next/font/google';

import './globals.css';

import { IotaClientProvider, WalletProvider } from '@iota/dapp-kit';
import { IotaClientProvider, lightTheme, darkTheme, WalletProvider } from '@iota/dapp-kit';
import { getAllNetworks, getDefaultNetwork } from '@iota/iota-sdk/client';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import React from 'react';
@@ -22,16 +22,27 @@ export default function RootLayout({
children: React.ReactNode;
}>) {
const [queryClient] = React.useState(() => new QueryClient());
const bodyRef = React.useRef<HTMLBodyElement>(null);

const allNetworks = getAllNetworks();
const defaultNetwork = getDefaultNetwork();

return (
<html lang="en">
<body className={inter.className}>
<body className={inter.className} ref={bodyRef}>
<QueryClientProvider client={queryClient}>
<IotaClientProvider networks={allNetworks} defaultNetwork={defaultNetwork}>
<WalletProvider>
<WalletProvider
theme={[
{
variables: lightTheme,
},
{
selector: '.dark',
variables: darkTheme,
},
]}
>
<PopupProvider>
{children}
<Popup />
1 change: 1 addition & 0 deletions sdk/dapp-kit/src/index.ts
Original file line number Diff line number Diff line change
@@ -25,6 +25,7 @@ export * from './hooks/wallet/useReportTransactionEffects.js';
export * from './hooks/wallet/useSwitchAccount.js';
export * from './hooks/wallet/useWallets.js';
export * from './themes/lightTheme.js';
export * from './themes/darkTheme.js';
export * from './types.js';

export type { Theme, ThemeVars, DynamicTheme } from './themes/themeContract.js';