From 792ab3cc4056bc2cde3daad3d03cf0087622e652 Mon Sep 17 00:00:00 2001 From: Akmal Isomadinov Date: Mon, 29 Jul 2024 18:28:14 +0500 Subject: [PATCH 1/4] Doceditor:CompletedForm Fixed scroll and styles --- .../completed-form/CompletedForm.styled.ts | 64 ++++-- .../completed-form/CompletedForm.tsx | 213 ++++++++++-------- 2 files changed, 166 insertions(+), 111 deletions(-) diff --git a/packages/doceditor/src/components/completed-form/CompletedForm.styled.ts b/packages/doceditor/src/components/completed-form/CompletedForm.styled.ts index e63e06b173..10dcdcfaba 100644 --- a/packages/doceditor/src/components/completed-form/CompletedForm.styled.ts +++ b/packages/doceditor/src/components/completed-form/CompletedForm.styled.ts @@ -27,33 +27,61 @@ import styled from "styled-components"; -import { mobile } from "@docspace/shared/utils"; +import { mobile, mobileMore } from "@docspace/shared/utils"; import type { CompletedFormLayoutProps } from "./CompletedForm.types"; -export const CompletedFormLayout = styled.section` - display: flex; - align-items: center; - flex-direction: column; - +export const ContainerCompletedForm = styled.section` box-sizing: border-box; * { box-sizing: border-box; } - width: 100%; - min-height: 100dvh; - padding: 100px 16px 16px; - background-image: ${(props) => props.bgPattern}; background-repeat: no-repeat; background-attachment: fixed; background-size: cover; background-position: center; + width: 100%; + min-height: 100dvh; + height: 100%; + + .scroller { + > .scroll-body { + display: flex; + flex-direction: column; + padding-inline-end: 16px !important; + } + } + + .completed-form__default-layout { + padding: clamp(42px, 8vh, 100px) 16px 16px; + + picture { + } + } + + @media ${mobile} { + .completed-form__default-layout { + padding: 0px 16px 16px; + } + + background-image: none; + } +`; + +export const CompletedFormLayout = styled.div` + display: flex; + align-items: center; + flex-direction: column; + + padding: clamp(42px, 8vh, 100px) 0px 16px 16px; + picture { - margin-bottom: clamp(40px, 10vh, 125px); + margin-bottom: clamp(40px, 8vh, 125px); + user-select: none; } .link { @@ -68,9 +96,14 @@ export const CompletedFormLayout = styled.section` margin-top: 24px; } - @media ${mobile} { - background-image: none; + @media ${mobileMore} and (max-height: 650px) { + padding-top: 42px; + .completed-form__logo { + margin-bottom: 40px; + } + } + @media ${mobile} { padding-top: 0px; .completed-form__icon { @@ -95,6 +128,11 @@ export const CompletedFormLayout = styled.section` align-self: center; } } + + .completed-form__empty { + gap: 20px; + margin-top: 24px; + } } `; diff --git a/packages/doceditor/src/components/completed-form/CompletedForm.tsx b/packages/doceditor/src/components/completed-form/CompletedForm.tsx index fa36983c63..040391af8f 100644 --- a/packages/doceditor/src/components/completed-form/CompletedForm.tsx +++ b/packages/doceditor/src/components/completed-form/CompletedForm.tsx @@ -69,9 +69,11 @@ import { FormNumberWrapper, ManagerWrapper, MainContent, + ContainerCompletedForm, } from "./CompletedForm.styled"; import type { CompletedFormProps } from "./CompletedForm.types"; +import { Scrollbar } from "@docspace/shared/components/scrollbar"; export const CompletedForm = ({ session, @@ -92,25 +94,29 @@ export const CompletedForm = ({ if (!session) return ( - - - - - logo - - icon - - {t("CompletedForm:Title")} - {t("CompletedForm:Description")} - - + + + + + + logo + + icon + + + {t("CompletedForm:Title")} + + {t("CompletedForm:Description")} + + + ); const { @@ -172,85 +178,96 @@ export const CompletedForm = ({ }); return ( - - - - - logo - - - - {t("CompletedForm:FormCompletedSuccessfully")} - - - {isAnonim - ? t("CompletedForm:DescriptionForAnonymous") - : t("CompletedForm:DescriptionForRegisteredUser")} - - - - - - - {completedForm.title} - - - - - {t("CompletedForm:FormNumber")} - - {formNumber} - - - - {t("CompletedForm:FormOwner")} - - - - {decode(manager.displayName)} + + + + + + + logo + + + + {t("CompletedForm:FormCompletedSuccessfully")} - - - {manager.email} - - - - - -