diff --git a/frontend/public/images/infisical-update-september-2023.png b/frontend/public/images/infisical-update-september-2023.png new file mode 100644 index 000000000..c11852762 Binary files /dev/null and b/frontend/public/images/infisical-update-september-2023.png differ diff --git a/frontend/src/layouts/AppLayout/AppLayout.tsx b/frontend/src/layouts/AppLayout/AppLayout.tsx index a3541471a..19fb964f8 100644 --- a/frontend/src/layouts/AppLayout/AppLayout.tsx +++ b/frontend/src/layouts/AppLayout/AppLayout.tsx @@ -7,9 +7,10 @@ // @ts-nocheck import crypto from "crypto"; -import { useEffect } from "react"; +import { useEffect, useState } from "react"; import { Controller, useForm } from "react-hook-form"; import { useTranslation } from "react-i18next"; +import Image from "next/image"; import Link from "next/link"; import { useRouter } from "next/router"; import { faGithub, faSlack } from "@fortawesome/free-brands-svg-icons"; @@ -68,8 +69,10 @@ import { useGetOrgTrialUrl, useGetSecretApprovalRequestCount, useLogoutUser, + useRegisterUserAction, useUploadWsKey } from "@app/hooks/api"; +import { fetchUserAction } from "@app/hooks/api/users/queries"; interface LayoutProps { children: React.ReactNode; @@ -116,7 +119,7 @@ export const AppLayout = ({ children }: LayoutProps) => { const { user } = useUser(); const { subscription } = useSubscription(); const workspaceId = currentWorkspace?._id || ""; - // const [ isLearningNoteOpen, setIsLearningNoteOpen ] = useState(true); + const [ isLearningNoteOpen, setIsLearningNoteOpen ] = useState(false); const { data: secretApprovalReqCount } = useGetSecretApprovalRequestCount({ workspaceId }); const isAddingProjectsAllowed = subscription?.workspaceLimit @@ -143,6 +146,23 @@ export const AppLayout = ({ children }: LayoutProps) => { const { t } = useTranslation(); + const registerUserAction = useRegisterUserAction(); + + useEffect(async () => { + const checkLearningNote = async () => { + const userUpdateClosedCheck = await fetchUserAction( + "september_update_closed" + ); + setIsLearningNoteOpen(!userUpdateClosedCheck); + } + checkLearningNote(); + }) + + const closeUpdate = async () => { + await registerUserAction.mutateAsync("september_update_closed"); + setIsLearningNoteOpen(false); + } + const logout = useLogoutUser(); const logOutUser = async () => { try { @@ -546,19 +566,6 @@ export const AppLayout = ({ children }: LayoutProps) => { - {/* {workspaces.map(project => - - - {project.name} - - -
- {project.name} -
- )} */} { : "mb-4" } flex w-full cursor-default flex-col items-center px-3 text-sm text-mineshaft-400`} > - {/*
+ {/*
-
-
-
Kubernetes Operator
-
Integrate Infisical into your Kubernetes infrastructure
-
- kubernetes image + {router.asPath.includes("org") && (
null} diff --git a/frontend/src/pages/login/index.tsx b/frontend/src/pages/login/index.tsx index 8fd27c429..4416700de 100644 --- a/frontend/src/pages/login/index.tsx +++ b/frontend/src/pages/login/index.tsx @@ -9,7 +9,7 @@ export default function LoginPage() { const { t } = useTranslation(); return ( -
+
{t("common.head-title", { title: t("login.title") })} @@ -23,6 +23,7 @@ export default function LoginPage() {
+
); } diff --git a/frontend/src/views/Login/components/InitialStep/InitialStep.tsx b/frontend/src/views/Login/components/InitialStep/InitialStep.tsx index 3cc26fb4e..148018436 100644 --- a/frontend/src/views/Login/components/InitialStep/InitialStep.tsx +++ b/frontend/src/views/Login/components/InitialStep/InitialStep.tsx @@ -112,7 +112,7 @@ export const InitialStep = ({ setStep, email, setEmail, password, setPassword }:

Login to Infisical

-
+
-
+
-
+
-
+
@@ -194,10 +194,10 @@ export const InitialStep = ({ setStep, email, setEmail, password, setPassword }: placeholder="Enter your email..." isRequired autoComplete="username" - className="h-11" + className="h-10" />
-
+
setPassword(e.target.value)} @@ -206,15 +206,15 @@ export const InitialStep = ({ setStep, email, setEmail, password, setPassword }: isRequired autoComplete="current-password" id="current-password" - className="select:-webkit-autofill:focus h-11" + className="select:-webkit-autofill:focus h-10" />
-
+