setOpen(!open)}>
- {/* Username and Role*/}
- {sampleData.map((data, index) => {
- return (
-
-
{data.name}
-
{data.role}
-
- );
- })}
- {/* User profile*/}
-
+
setOpen(!open)}
+ >
+ {/* Username and Role*/}
+ {sampleData.map((data, index) => {
+ return (
+
+
{data.name}
+
{data.role}
+
+ );
+ })}
+
+ {/* User profile*/}
+
- )}
+
{/* Mobile Ellipsis */}
- {isMobile && (
-
setOpen(!open)}
- >
-
-
- )}
+
+
setOpen(!open)}
+ >
+
+
{/* Dropdown */}
{open &&
}
diff --git a/frontend/src/app/components/navbar/navright/styles.module.css b/frontend/src/app/components/navbar/navright/styles.module.css
index ab949f0..288f9d3 100644
--- a/frontend/src/app/components/navbar/navright/styles.module.css
+++ b/frontend/src/app/components/navbar/navright/styles.module.css
@@ -7,7 +7,8 @@
cursor: pointer;
position: relative;
}
-.profileBadge {
+.profileBadge,
+.profileBadgeButton {
display: flex;
padding: 6px 0 6px 8px;
justify-content: flex-end;
@@ -153,6 +154,9 @@
.rotated {
transform: rotate(90deg);
}
+.mobileEllipsis {
+ display: none;
+}
.mobileEllipsis.active {
color: #959aff;
}
@@ -183,7 +187,9 @@
cursor: pointer;
color: #85869b;
}
-
+ .profileBadgeButton {
+ display: none;
+ }
.profileBadge {
display: flex;
padding: 12px 16px;
diff --git a/frontend/src/app/components/navbar/styles.module.css b/frontend/src/app/components/navbar/styles.module.css
index a834977..ad94451 100644
--- a/frontend/src/app/components/navbar/styles.module.css
+++ b/frontend/src/app/components/navbar/styles.module.css
@@ -9,14 +9,154 @@
}
/* Mobile */
+
+.hamburgerMenu {
+ display: none;
+ height: 61px;
+ padding-left: 16px;
+ align-items: center;
+ gap: 10px;
+ flex-shrink: 0;
+ cursor: pointer;
+}
+.active path {
+ color: #8187ff;
+}
+.dropDownMenu {
+ display: flex;
+ width: 100vw;
+ flex-direction: column;
+ align-items: center;
+ position: absolute;
+ background: linear-gradient(0deg, #2d3143 0%, #191a24 100%);
+ left: 0;
+ z-index: 2;
+ top: 60px;
+ animation-name: dropDownAnimation;
+ animation-duration: 200ms;
+}
+.headings {
+ display: flex;
+ padding: 32px 16px 16px 16px;
+ flex-direction: column;
+ align-items: center;
+ gap: 24px;
+ align-self: stretch;
+}
+.headings > div {
+ display: flex;
+ padding-right: 6px;
+ align-items: center;
+ gap: 8px;
+ align-self: stretch;
+}
+.logoContainer {
+ display: flex;
+ width: 50px;
+ height: 50px;
+ justify-content: center;
+ align-items: center;
+ gap: 9px;
+ aspect-ratio: 1/1;
+}
+
+.info {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: flex-start;
+ gap: 4px;
+ flex: 1 0 0;
+}
+
+.info p {
+ color: #85869b;
+ font-size: 14px;
+ font-style: normal;
+ font-weight: 400;
+ line-height: normal;
+ letter-spacing: 0.07px;
+}
+.info > p:nth-child(1) {
+ color: #fff;
+ font-size: 18px;
+ font-weight: 500;
+ line-height: 18px; /* 100% */
+}
+.navs {
+ display: flex;
+ padding: 16px 0;
+ flex-direction: column;
+ align-items: flex-start;
+ align-self: stretch;
+}
+.nav {
+ display: flex;
+ padding: 8px 16px;
+ align-items: center;
+ gap: 16px;
+ align-self: stretch;
+}
+.nav:hover {
+ background: rgba(149, 154, 255, 0.05);
+}
+.nav path {
+ stroke: #858699;
+}
+.nav:hover path {
+ stroke: #d2d3e0;
+}
+.nav p {
+ color: #d2d3e1;
+ font-size: 18px;
+ font-weight: 400;
+ line-height: normal;
+}
+.footer {
+ display: flex;
+ padding: 16px;
+ flex-direction: column;
+ align-items: flex-start;
+ gap: 10px;
+ align-self: stretch;
+}
+.footer > div {
+ display: flex;
+ padding: 12px 16px;
+ flex-direction: column;
+ align-items: flex-start;
+ gap: 24px;
+ align-self: stretch;
+ border-radius: 8px;
+ background: #1d1e2c;
+}
+.footer > div > div {
+ display: flex;
+ height: 24px;
+ justify-content: space-between;
+ align-items: center;
+ align-self: stretch;
+}
+
+@keyframes dropDownAnimation {
+ 0% {
+ opacity: 0;
+ transform: translateY(-5%);
+ }
+ 100% {
+ opacity: 1;
+ transform: translateY(0);
+ }
+}
@media (max-width: 768px) {
.mobileHamburger {
display: flex;
height: 61px;
- padding-left: 16px;
+
align-items: center;
gap: 10px;
flex-shrink: 0;
+ position: relative;
}
.mainContainer {
@@ -25,4 +165,7 @@
align-items: center;
border-bottom: none;
}
+ .hamburgerMenu {
+ display: flex;
+ }
}
diff --git a/frontend/src/app/components/sidebar/Sidebar.jsx b/frontend/src/app/components/sidebar/Sidebar.jsx
index b10e182..79b6fc1 100644
--- a/frontend/src/app/components/sidebar/Sidebar.jsx
+++ b/frontend/src/app/components/sidebar/Sidebar.jsx
@@ -13,31 +13,19 @@ import AgentIcon from "../icons/agent";
import DownloadIcon from "../icons/download";
import LogoIcon from "../icons/logo";
import ArrowDownIcon from "../icons/arrowDown";
+import useNavigations from "@/app/hooks/useNagivation";
const Sidebar = () => {
- const router = useRouter();
const [isCollapsed, setIsCollapsed] = useState(false);
- const navToHome = () => {
- router.push("/home");
- };
- const navToOrganization = () => {
- router.push("/organization");
- };
- const navToProject = () => {
- router.push("/projects");
- };
- const navToUsers = () => {
- router.push("/users");
- };
- const navToRoles = () => {
- router.push("/roles");
- };
- const navToCredentials = () => {
- router.push("/credentials");
- };
- const navToAgents = () => {
- router.push("/agents");
- };
+ const {
+ navToAgents,
+ navToCredentials,
+ navToProject,
+ navToRoles,
+ navToHome,
+ navToOrganization,
+ navToUsers,
+ } = useNavigations();
const pathname = usePathname();
return (
diff --git a/frontend/src/app/globals.css b/frontend/src/app/globals.css
index 3bf291a..73a4924 100644
--- a/frontend/src/app/globals.css
+++ b/frontend/src/app/globals.css
@@ -55,7 +55,7 @@ a {
}
@media (max-width: 900px) {
:root {
- --table-font-size: 9px;
+ --table-font-size: 10px;
}
}
@media (max-width: 500px) {
diff --git a/frontend/src/app/hooks/useIsMobile.jsx b/frontend/src/app/hooks/useIsMobile.jsx
index 32b0027..c174472 100644
--- a/frontend/src/app/hooks/useIsMobile.jsx
+++ b/frontend/src/app/hooks/useIsMobile.jsx
@@ -1,7 +1,7 @@
import { useState, useEffect } from "react";
export default function useIsMobile(breakpoint = 768) {
- const [isMobile, setIsMobile] = useState(false);
+ const [isMobile, setIsMobile] = useState(true);
useEffect(() => {
const checkScreen = () => {
diff --git a/frontend/src/app/hooks/useNagivation.jsx b/frontend/src/app/hooks/useNagivation.jsx
new file mode 100644
index 0000000..c857141
--- /dev/null
+++ b/frontend/src/app/hooks/useNagivation.jsx
@@ -0,0 +1,36 @@
+import { useRouter } from "next/navigation";
+const useNavigations = () => {
+ const router = useRouter();
+ const navToHome = () => {
+ router.push("/home");
+ };
+ const navToOrganization = () => {
+ router.push("/organization");
+ };
+ const navToProject = () => {
+ router.push("/projects");
+ };
+ const navToUsers = () => {
+ router.push("/users");
+ };
+ const navToRoles = () => {
+ router.push("/roles");
+ };
+ const navToCredentials = () => {
+ router.push("/credentials");
+ };
+ const navToAgents = () => {
+ router.push("/agents");
+ };
+
+ return {
+ navToHome,
+ navToAgents,
+ navToCredentials,
+ navToOrganization,
+ navToProject,
+ navToRoles,
+ navToUsers,
+ };
+};
+export default useNavigations;
diff --git a/frontend/src/app/organization/page.jsx b/frontend/src/app/organization/page.jsx
index 8ea1c70..be07122 100644
--- a/frontend/src/app/organization/page.jsx
+++ b/frontend/src/app/organization/page.jsx
@@ -68,26 +68,26 @@ const OrganizationPage = () => {
topbarTitle="Organization"
requiredButtons={["title", "add", "search"]}
/>
- {isMobile ? (
-
-
- {sampleData.map((data, key) => (
-
- ))}
-
- ) : (
-
-
-
-
- | Organization Name |
- Date Created |
- |
-
-
-
- {sampleData.map((org, index) => {
+
+
+ {isMobile &&
+ sampleData.map((data, key) => )}
+
+
+
+
+
+
+ | Organization Name |
+ Date Created |
+ |
+
+
+
+
+ {!isMobile &&
+ sampleData.map((org, index) => {
return (
| {org.organizationName} |
@@ -100,10 +100,9 @@ const OrganizationPage = () => {
);
})}
-
-
-
- )}
+
+
+