Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
263 changes: 244 additions & 19 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
},
"dependencies": {
"@ant-design/cssinjs": "^1.20.0",
"@svgr/webpack": "^8.1.0",
"@t3-oss/env-nextjs": "^0.10.1",
"antd": "^5.18.0",
"geist": "^1.3.0",
Expand All @@ -24,6 +23,7 @@
"zod": "^3.23.3"
},
"devDependencies": {
"@svgr/webpack": "^8.1.0",
"@types/eslint": "^8.56.2",
"@types/node": "^20.11.20",
"@types/react": "^18.2.57",
Expand Down
Binary file added public/assets/count.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/eth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/modal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/nvir.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/proxima.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/svgs/history.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/svgs/home.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/svgs/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/svgs/message.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions public/svgs/setting.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/svgs/wallet.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions src/app/mike/dashboard/container/DashboardContainer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { useRouter } from "next/navigation";
import { useState } from "react";
import { PageWithModalTemplate } from "~/components/Templates/PageWithModal/PageWithModalTemplate";
import ModalStore from "~/store/ModalStore";

export const DashboardContainer = () => {
const router = useRouter();

const [isCustomModalOpen, setIsCustomModalOpen] = useState(false);

const pagewithmodalTemplateProps: React.ComponentProps<
typeof PageWithModalTemplate
> = {
pageWithModalHeaderModuleProps: {
title: "Proxima OS",
onClickLeftIcon: () => router.back(),
onClickRightIcon: () => setIsCustomModalOpen(true),
},
pageWithModalContentModuleProps: {
onOpenSnapshotModal: () =>
ModalStore.open("TitleAndContent", {
TitleAndContent: {
title: "Modal Title",
description: "Modal Content",
},
}),
modalProps: {
modalProps: {
isModalOpen: isCustomModalOpen,
setModalOpen: setIsCustomModalOpen,
},
title: "Custom Modal Title",
description: "Custom Modal Description",
},
},
emptyFooterModuleProps: {
footerProps: {},
},
};

return <PageWithModalTemplate {...pagewithmodalTemplateProps} />;
};
8 changes: 8 additions & 0 deletions src/app/mike/dashboard/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"use client";
import { DashboardContainer } from "./container/DashboardContainer";

const Dashboard = () => {
return <DashboardContainer />;
};

export default Dashboard;
47 changes: 44 additions & 3 deletions src/components/Atoms/FooterAtom/FooterAtom.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,52 @@
import HomeSVG from "@svgs/home.svg";
import MessageSVG from "@svgs/message.svg";
import WalletSVG from "@svgs/wallet.svg";
import HistorySVG from "@svgs/history.svg";

type Props = {
title: string;
onHomeClick?: () => void;
onMessageClick?: () => void;
onWalletClick?: () => void;
onHistoryClick?: () => void;
};

export const FooterAtom = (props: Props) => {
return (
<div className="flex h-full items-center justify-center bg-[#FFC96F]">
<div>{props.title}</div>
<div className='relative flex h-full items-center justify-between bg-[#262626] p-4'>
{/* Home Tab */}
<div
className='flex flex-1 cursor-pointer justify-center'
onClick={props.onHomeClick}
>
<HomeSVG width={24} height={24} fill='#8C8C8C' />
</div>

{/* Message Tab */}
<div
className='flex flex-1 cursor-pointer justify-center'
onClick={props.onMessageClick}
>
<MessageSVG width={24} height={24} fill='#8C8C8C' />
</div>

{/* Wallet Tab with Full Width Tab Indicator */}
<div
className='relative flex flex-1 cursor-pointer justify-center'
onClick={props.onWalletClick}
>
{/* Slim Top Indicator for the Wallet Tab */}
<div className='absolute -top-4 left-0 h-[2px] w-full bg-[#00EC97]' />
{/* Wallet Icon */}
<WalletSVG width={24} height={24} fill='#FFFFFF' />
</div>

{/* History Tab */}
<div
className='flex flex-1 cursor-pointer justify-center'
onClick={props.onHistoryClick}
>
<HistorySVG width={24} height={24} fill='#8C8C8C' />
</div>
</div>
);
};
17 changes: 11 additions & 6 deletions src/components/Atoms/HeaderAtom/HeaderAtom.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { SettingOutlined } from "@ant-design/icons";
import SVGAtom from "../SVGAtom/SVGAtom";
import IconSVG from "@svgs/icon.svg";
import SettingSVG from "@svgs/setting.svg";

type Props = {
title: string;
Expand All @@ -9,26 +11,29 @@ type Props = {

export const HeaderAtom = (props: Props) => {
return (
<div className="relative flex h-full w-full items-center justify-center bg-[#FFC96F]">
<div className="relative flex h-full w-full items-center justify-center bg-[#000000]">
{/* Sample using custom svg */}
{props.onClickLeftIcon && (
<div
className="absolute left-0 z-[1] flex w-[50px] cursor-pointer items-center justify-center"
onClick={props.onClickLeftIcon}
//onClick={props.onClickLeftIcon}
onClick={() => console.log("Left icon clicked")}
>
<SVGAtom iconName="arrowLeft" width={20} height={20} color="black" />
<IconSVG width={20} height={20} fill="#BFBFBF" />
</div>
)}

<div>{props.title}</div>
<div className="text-white">{props.title}</div>

{/* Sample using Antd icon */}
{props.onClickRightIcon && (
<div
className="absolute right-0 z-[1] flex w-[50px] cursor-pointer items-center justify-center"
onClick={() => console.log("Antd icon clicked")}
//
onClick={props.onClickRightIcon}
>
<SettingOutlined className="!text-gray-header cursor-pointer text-[20px]" />

<SettingSVG width={20} height={20} fill="#BFBFBF" />
</div>
)}
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,39 @@
import { Button } from "antd";
import Modal from "~/components/Atoms/Modal/Modal";
import Image from "next/image";
import modalIMG from "@assets/modal.png";

type Props = {
modalProps: React.ComponentProps<typeof Modal>;
title: string;
description: string;
};

export const PageWithModalContentCustomModal = (props: Props) => {
return (
<Modal {...props.modalProps}>
<div className="flex h-fit w-80 flex-col gap-4 p-8">
<h1 className="text-2xl">{props.title}</h1>
<p>{props.description}</p>
<Button onClick={() => props.modalProps.setModalOpen(false)}>
close
</Button>
<Modal
{...props.modalProps}
containerClassName='shadow-none bg-transparent'
>
<div className='flex h-fit w-80 flex-col gap-4 rounded-[14px] bg-[#2C2D30] p-8'>
{/* Title */}
<h1 className='text-center text-2xl text-white'>
Transaction processing
</h1>

{/* Image Section */}
<div className='h-[154px] w-full shadow-none'>
{/* Image */}
<Image
src={modalIMG}
alt='Processing Alt'
className='h-full w-full object-cover'
/>
</div>

{/* Description Text */}
<p className='text-center text-base text-white'>
Uploading your transaction to the node. please wait for a moment...
This may take up to 2 minutes.
</p>
</div>
</Modal>
);
Expand Down
11 changes: 11 additions & 0 deletions src/components/Modules/Dashboard/DashboardContentModule.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from "react";

const DashboardContentModule = () => {
return (
<main>
<h1>Dashboard Home</h1>
</main>
);
};

export default DashboardContentModule;
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,13 @@ import { Button } from "antd";
import { PageWithModalContentCustomModal } from "~/components/Components/PageWithModalContentCustomModal/PageWithModalContentCustomModal";

type Props = {
onOpenSnapshotModal: () => void;
modalProps: React.ComponentProps<typeof PageWithModalContentCustomModal>;
};

export const PageWithModalContentModule = (props: Props) => {
return (
<div className="flex h-full w-full justify-around">
<div className='flex h-full w-full justify-around'>
<div>
<Button
className="my-3"
type="primary"
onClick={props.onOpenSnapshotModal}
>
Open Snapshot Modal
</Button>
</div>

<div>
<Button
className="my-3"
type="primary"
onClick={() => props.modalProps.modalProps.setModalOpen(true)}
>
Open Modal
</Button>
<PageWithModalContentCustomModal {...props.modalProps} />
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ import { HeaderAtom } from "~/components/Atoms/HeaderAtom/HeaderAtom";

type Props = {
title: string;
onClickLeftIcon: () => void;
onClickLeftIcon: () =>void;
onClickRightIcon: () => void;
};

export const PageWithModalHeaderModule = (props: Props) => {
return (
<HeaderAtom title={props.title} onClickLeftIcon={props.onClickLeftIcon} />
<HeaderAtom title={props.title} onClickLeftIcon={props.onClickLeftIcon} onClickRightIcon={props.onClickRightIcon} />
);
};
Loading