Merge branch 'Logo-addition' of Controls/CMS-Client into master

This commit is contained in:
2023-10-18 10:44:32 +00:00
committed by Gogs
18 changed files with 72 additions and 56 deletions
@@ -104,7 +104,7 @@ const ForgotPasswordForm = () => {
<Box as="div" textAlign="center" mt="20px">
<Link
href="/authentication/sign-in/"
href="/auth/sign-in/"
className="primaryColor text-decoration-none"
>
<i className="ri-arrow-left-s-line"></i> Back to Sign in
+1 -1
View File
@@ -128,7 +128,7 @@ const SignInForm = () => {
<Grid item xs={6} sm={6} textAlign="end">
<Link
href="/authentication/forgot-password"
href="/auth/forgot-password"
className="primaryColor text-decoration-none"
>
Forgot your password?
+2 -2
View File
@@ -45,7 +45,7 @@ const SignUpForm = () => {
<Typography fontSize="15px" mb="30px">
Already have an account?{" "}
<Link
href="/authentication/sign-in/"
href="/auth/sign-in/"
className="primaryColor text-decoration-none"
>
Sign in
@@ -204,7 +204,7 @@ const SignUpForm = () => {
<Grid item xs={6} sm={6} textAlign="end">
<Link
href="/authentication/forgot-password"
href="/auth/forgot-password"
className="primaryColor text-decoration-none"
>
Forgot your password?
+32 -24
View File
@@ -1,4 +1,4 @@
import React, { useState } from "react";
import React, { useEffect, useState } from "react";
import Head from "next/head";
import { useRouter } from "next/router";
import LeftSidebar from "@/components/_App/LeftSidebar";
@@ -12,20 +12,30 @@ const Layout = ({ children }) => {
const router = useRouter();
const [active, setActive] = useState(false);
const [isAuthenticationPage, setIsAuthenticationPage] = useState(false);
const toggleActive = () => {
setActive(!active);
};
const isAuthenticationPage = [
"/authentication/sign-in",
"/authentication/sign-up",
"/authentication/forgot-password",
"/authentication/lock-screen",
"/authentication/confirm-mail",
"/authentication/logout",
].includes(router.pathname);
useEffect(() => {
const authenticationPages = [
"/auth",
"/auth/sign-in",
"/auth/sign-up",
"/auth/forgot-password",
"/auth/lock-screen",
"/auth/confirm-mail",
"/auth/logout",
];
const title = isAuthenticationPage ? "CMC - Authentication" : "CMC - Client";
setIsAuthenticationPage(authenticationPages.includes(router.pathname));
}, [router.pathname]);
// Debugging: Log the value of isAuthenticationPage
console.log("isAuthenticationPage:", isAuthenticationPage, router.pathname);
const title = isAuthenticationPage ? "CMC - auth" : "CMC - dashboard";
return (
<>
@@ -34,24 +44,22 @@ const Layout = ({ children }) => {
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
</Head>
<AuthRoute>
<div className={`main-wrapper-content ${active ? "active" : ""}`}>
{!isAuthenticationPage && (
<>
<TopNavbar toggleActive={toggleActive} />
<LeftSidebar toggleActive={toggleActive} />
</>
)}
<div className={`main-wrapper-content ${active ? "active" : ""}`}>
{!isAuthenticationPage && (
<>
<TopNavbar toggleActive={toggleActive} />
<LeftSidebar toggleActive={toggleActive} />
</>
)}
<div className="main-content">{children}</div>
<div className="main-content">{children}</div>
{!isAuthenticationPage && <Footer />}
</div>
{!isAuthenticationPage && <Footer />}
</div>
<ScrollToTop />
<ScrollToTop />
{!isAuthenticationPage && <ControlPanelModal />}
</AuthRoute>
{!isAuthenticationPage && <ControlPanelModal />}
</>
);
};
+6 -6
View File
@@ -450,7 +450,7 @@ export const SidebarData = [
},
{
title: "Authentication",
path: "/authentication/sign-in/",
path: "/auth/sign-in/",
icon: <LockIcon />,
iconClosed: <KeyboardArrowRightIcon />,
iconOpened: <KeyboardArrowDownIcon />,
@@ -458,23 +458,23 @@ export const SidebarData = [
subNav: [
{
title: "Sign Up",
path: "/authentication/sign-up/",
path: "/auth/sign-up/",
},
{
title: "Forgot Password",
path: "/authentication/forgot-password/",
path: "/auth/forgot-password/",
},
{
title: "Lock Screen",
path: "/authentication/lock-screen/",
path: "/auth/lock-screen/",
},
{
title: "Confirm Mail",
path: "/authentication/confirm-mail/",
path: "/auth/confirm-mail/",
},
{
title: "Logout",
path: "/authentication/logout/",
path: "/auth/logout/",
},
],
},
+4 -3
View File
@@ -29,7 +29,7 @@ const SidebarWrap = styled("div")(({ theme }) => ({
width: '100%'
}));
const Sidebar = ({ toogleActive }) => {
const Sidebar = ({ toggleActive }) => {
return (
<>
<div className='leftSidebarDark'>
@@ -58,11 +58,12 @@ const Sidebar = ({ toogleActive }) => {
</Link>
<IconButton
onClick={toogleActive}
onClick={toggleActive}
size="small"
sx={{
background: 'rgb(253, 237, 237)',
display: { lg: 'none' }
display: { lg: 'none' },
marginLeft: "1rem"
}}
>
<ClearIcon />
+1 -1
View File
@@ -183,7 +183,7 @@ const Profile = () => {
</ListItemIcon>
<Link
href="/authentication/logout/"
href="/auth/logout/"
fontSize="13px"
color="inherit"
underline="none"
+2 -2
View File
@@ -7,7 +7,7 @@ import Profile from "./Profile";
import Tooltip from "@mui/material/Tooltip";
import CurrentDate from "./CurrentDate";
const TopNavbar = ({ toogleActive }) => {
const TopNavbar = ({ toggleActive }) => {
return (
<>
<div className="topNavbarDark">
@@ -28,7 +28,7 @@ const TopNavbar = ({ toogleActive }) => {
size="sm"
edge="start"
color="inherit"
onClick={toogleActive}
onClick={toggleActive}
>
<i className="ri-align-left"></i>
</IconButton>
+1 -1
View File
@@ -96,7 +96,7 @@ RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
&& yarn --version
COPY docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["docker-entrypoint.sh"]
# ENTRYPOINT ["docker-entrypoint.sh"]
# COPY docker-entrypoint.sh /usr/local/bin/
# ENTRYPOINT ["docker-entrypoint.sh"]
+1 -1
View File
@@ -14,7 +14,7 @@ const AuthRoute = ({ children }) => {
const isAuthenticated = true; // In a real application, this would be determined based on the user's authentication status.
if (!isAuthenticated) {
router.push("/authentication/sign-in/");
router.push("/auth/");
}
}, [router]);
+15 -13
View File
@@ -1,34 +1,36 @@
import React from 'react';
import '../styles/remixicon.css'
import 'react-tabs/style/react-tabs.css';
import React from "react";
import "../styles/remixicon.css";
import "react-tabs/style/react-tabs.css";
import "swiper/css";
import "swiper/css/bundle";
// Chat Styles
import '../styles/chat.css'
import "../styles/chat.css";
// Globals Styles
import '../styles/globals.css'
import "../styles/globals.css";
// Rtl Styles
import '../styles/rtl.css'
import "../styles/rtl.css";
// Dark Mode Styles
import '../styles/dark.css'
import "../styles/dark.css";
// Theme Styles
import theme from '../styles/theme'
import theme from "../styles/theme";
import { ThemeProvider, CssBaseline } from "@mui/material";
import Layout from "@/components/_App/Layout";
import AuthRoute from "middlewares/AuthRoute";
function MyApp({ Component, pageProps }) {
return (
<>
<ThemeProvider theme={theme}>
<CssBaseline />
<Layout>
<Component {...pageProps} />
</Layout>
<AuthRoute>
<Layout>
<Component {...pageProps} />
</Layout>
</AuthRoute>
</ThemeProvider>
</>
);
}
export default MyApp
export default MyApp;
+5
View File
@@ -0,0 +1,5 @@
import SignInForm from "@/components/Authentication/SignInForm";
export default function Index() {
return <SignInForm />;
}
@@ -51,7 +51,7 @@ export default function Logout() {
</Typography>
<Button
href="/authentication/sign-in/"
href="/auth/sign-in/"
fullWidth
variant="contained"
sx={{