diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..e5cdb77 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "window.zoomLevel": -1.5 +} \ No newline at end of file diff --git a/app/panel/(layout)/dashboard/page.js b/app/panel/(layout)/dashboard/page.js index 1682f23..51f3f40 100644 --- a/app/panel/(layout)/dashboard/page.js +++ b/app/panel/(layout)/dashboard/page.js @@ -1,3 +1,5 @@ +'use client'; + import DashboardPage from "@/components/panel/dashboard"; import Information from '@/data/information.json'; diff --git a/app/panel/(layout)/layout.js b/app/panel/(layout)/layout.js index f5e0850..779e094 100644 --- a/app/panel/(layout)/layout.js +++ b/app/panel/(layout)/layout.js @@ -1,24 +1,46 @@ 'use client'; +import { useEffect, useState } from "react"; import Header from "@/components/layoutPanel/header"; import Sidebar from "@/components/layoutPanel/sidebar"; import Information from '@/data/information.json'; import UserDetail from "@/components/layoutPanel/userDetail"; import { usePathname } from "next/navigation"; -import { useState } from "react"; +import BgGray from "@/components/layoutPanel/sidebar/BgGray"; function LayoutPanel({ children }) { const pathname = usePathname(); const [active, setActive] = useState(false); + const [open, setOpen] = useState(false); + const [loading, setLoading] = useState(true); + + useEffect(() => { + setTimeout(() => { + setLoading(false); + }, 2000); + }, []); + return (
-
+ +
{pathname.includes('dashboard') && ( - + )}
) diff --git a/components/dashboard/index.js b/components/dashboard/index.js index 21284cb..3220892 100644 --- a/components/dashboard/index.js +++ b/components/dashboard/index.js @@ -9,6 +9,7 @@ function DashboardPage({ user, isTurnsDetails, setIsTurnsDetails, children, valu name='dashboard' isSidebar={true} setValue={setValue} + disableFooter={true} isOpenSide={isOpenSide} setIsOpenSide={setIsOpenSide} isTurnsDetails={isTurnsDetails} diff --git a/components/dashboard/userAccount/tabs/comments/Comment.js b/components/dashboard/userAccount/tabs/comments/Comment.js index 5d68d0d..86b3c4f 100644 --- a/components/dashboard/userAccount/tabs/comments/Comment.js +++ b/components/dashboard/userAccount/tabs/comments/Comment.js @@ -7,7 +7,7 @@ import TextLoading from "@/app/component/loading/Text" import CustomLoading from "@/app/component/loading/Custom" import MultilineLoading from "@/app/component/loading/Multiline" -function Comment({ data, loading }) { +function Comment({ data, loading, idx, length }) { return (
  • @@ -57,7 +57,9 @@ function Comment({ data, loading }) {

    {data.date}

    - + {length > idx + 1 && ( + + )}
  • ) } diff --git a/components/dashboard/userAccount/tabs/comments/index.js b/components/dashboard/userAccount/tabs/comments/index.js index 719cbf6..36dfdff 100644 --- a/components/dashboard/userAccount/tabs/comments/index.js +++ b/components/dashboard/userAccount/tabs/comments/index.js @@ -6,8 +6,10 @@ function Comments({ user, loading }) { {user.comments.map((item, idx) => ( ))} diff --git a/components/dashboard/userAccount/tabs/messages/Message.js b/components/dashboard/userAccount/tabs/messages/Message.js index 423cece..f10eee9 100644 --- a/components/dashboard/userAccount/tabs/messages/Message.js +++ b/components/dashboard/userAccount/tabs/messages/Message.js @@ -4,7 +4,7 @@ import CalndarD from '@/components/icons/CalndarD' import MessageNotifd from '@/components/icons/MessageNotifD' import React from 'react' -function Message({ data, loading }) { +function Message({ data, loading, length, idx }) { return (
  • @@ -28,7 +28,9 @@ function Message({ data, loading }) {
    - + {length > idx + 1 && ( + + )}
  • ) } diff --git a/components/dashboard/userAccount/tabs/messages/index.js b/components/dashboard/userAccount/tabs/messages/index.js index bf3708b..a0814ad 100644 --- a/components/dashboard/userAccount/tabs/messages/index.js +++ b/components/dashboard/userAccount/tabs/messages/index.js @@ -6,8 +6,10 @@ function Messages({ user, loading }) { {user.messages.map((item, idx) => ( ))} diff --git a/components/icons/ArrowLeftPH.js b/components/icons/ArrowLeftPH.js new file mode 100644 index 0000000..6c4873a --- /dev/null +++ b/components/icons/ArrowLeftPH.js @@ -0,0 +1,9 @@ +function ArrowLeftPH({ active }) { + return ( + + + + ) +} + +export default ArrowLeftPH \ No newline at end of file diff --git a/components/icons/ArrowRightPH.js b/components/icons/ArrowRightPH.js new file mode 100644 index 0000000..2c761b7 --- /dev/null +++ b/components/icons/ArrowRightPH.js @@ -0,0 +1,10 @@ +function ArrowRightPH() { + return ( + + + + + ) +} + +export default ArrowRightPH \ No newline at end of file diff --git a/components/layout/header/list/col/index.js b/components/layout/header/list/col/index.js index a6c33f5..b24c234 100644 --- a/components/layout/header/list/col/index.js +++ b/components/layout/header/list/col/index.js @@ -9,7 +9,6 @@ function Col({ isActive, setIsActive, name }) { {/* */} -
    }, ]; + const [open, setOpen] = useState(false); + const handleOpen = () => setOpen(true); + const handleClose = () => setOpen(false); + return (
      + {listMenu.map((item, idx) => (
    • +
    + +

    آیا مطمئن هستید که می‌خواهید از حساب کاربری خود خارج شوید؟

    +
    + + +
    + + + ) +} + +export default ModalLogout \ No newline at end of file diff --git a/components/layoutPanel/sidebar/BgGray.js b/components/layoutPanel/sidebar/BgGray.js new file mode 100644 index 0000000..a7947e7 --- /dev/null +++ b/components/layoutPanel/sidebar/BgGray.js @@ -0,0 +1,13 @@ +function BgGray({ isActive, setIsActive }) { + return ( +
    setIsActive(false)} + className={` + md:hidden ${isActive ? 'bg-[#232323] opacity-40 flex' : 'bg-transparent opacity-40 hidden'} + absolute z-[25] cursor-pointer transition-all duration-500 left-0 top-0 w-screen h-screen + `} + >
    + ) +} + +export default BgGray \ No newline at end of file diff --git a/components/layoutPanel/sidebar/Links.js b/components/layoutPanel/sidebar/Links.js index 5b9c713..fe1084d 100644 --- a/components/layoutPanel/sidebar/Links.js +++ b/components/layoutPanel/sidebar/Links.js @@ -29,16 +29,16 @@ function Links({ open }) { variant="text" className={` !p-[8px] !flex !items-center !justify-start !gap-[8px] !text-[16px] !rounded-[8px] !transition-all !duration-500 - ${item.src === pathname ? '!bg-[#5559CE] !text-[#FAFAFA] !font-bold' : '!text-[#525252] !font-medium'} + ${item.src === pathname ? '!bg-[#5559CE]' : ''} `} > -
    {item.icon}

    {item.name}

    diff --git a/components/layoutPanel/sidebar/index.js b/components/layoutPanel/sidebar/index.js index 796b4b7..e77db45 100644 --- a/components/layoutPanel/sidebar/index.js +++ b/components/layoutPanel/sidebar/index.js @@ -1,34 +1,28 @@ -import { useState } from "react"; - import Links from "./Links"; import HeadMd from "./HeadMd"; import HeadSm from "./HeadSm"; import { Button } from "@mui/material"; import LogoutOrangeP from "@/components/icons/LogoutOrangeP"; -function Sidebar({ active, setActive }) { - - const [open, setOpen] = useState(false); - +function Sidebar({ active, setActive, open, setOpen }) { return (