From e731c332351b7c53f9cba590a8e631c6511f63f0 Mon Sep 17 00:00:00 2001 From: "GitStart-Cal.com" <121884634+gitstart-calcom@users.noreply.github.com> Date: Thu, 29 Jun 2023 15:47:16 +0800 Subject: [PATCH] feat: Add divider and set spacing on modals with the type=creation prop (feat-add-divider) ## What does this PR do? - Add the prop customDividerClassName to customize the CSS Divider if needed - Add a divider on all modals with type="creation" prop, following the [figma](https://www.figma.com/file/9MOufQNLtdkpnDucmNX10R/1.-Cal-DS?type=design&node-id=29898%3A100590&t=62LvZCZAEZm5zDdw-1) design - Some type="creation" modals seem not to be this type, we pushed all changes with screenshots, if you want us to revert the changes on some modals we will revert ![image](https://github.com/calcom/cal.com/assets/121884634/6674016e-819d-49da-9d44-14eefb4160ee) - Inline Embed: ![image](https://github.com/calcom/cal.com/assets/121884634/191c94ea-257f-44ba-8c7a-3815550e36f1) - Enable Two-Factor Authentication: ![image](https://github.com/calcom/cal.com/assets/121884634/3b9246be-52ab-4c9d-af12-eda82541e837) -Enable Two-Factor Authentication (step 2): ![image](https://github.com/calcom/cal.com/assets/121884634/a3b7934b-fd66-441d-b9d7-c5ba2fc7fa91) -Enable Two-Factor Authentication (step 3): ![image](https://github.com/calcom/cal.com/assets/121884634/77367ae7-0967-497a-858a-f18a91b62077) - Disable Two-Factor Authentication: ![image](https://github.com/calcom/cal.com/assets/121884634/8fc31cc2-e3ca-4c74-8ac6-c4832f9116d9) - Delete Account: ![image](https://github.com/calcom/cal.com/assets/121884634/5146f605-523e-4c49-aeeb-7c5dd533844d) - Update Timezone: ![image](https://github.com/calcom/cal.com/assets/121884634/f5acb9f0-2550-4d48-8c02-5cf1b94aaf33) - Duplicate Event Type: ![image](https://github.com/calcom/cal.com/assets/121884634/078d40a5-5e35-4d4a-8d0e-77d7b8c21d6d) - Add a New Form: ![image](https://github.com/calcom/cal.com/assets/121884634/5b6352e0-a1c1-46e3-af18-dc84e83fdecd) - Change Team Member Role: ![image](https://github.com/calcom/cal.com/assets/121884634/dc8b8ba1-7986-4980-ab78-6027aca350ca) - Impersonate: ![image](https://github.com/calcom/cal.com/assets/121884634/ffd28b83-0c9b-47a1-8894-29d35add9c27) - Bulk Update Event Types: ![image](https://github.com/calcom/cal.com/assets/121884634/ba864dcc-0c73-426e-bc49-3ac81a55d3ea) - Connecting with MS Teams: ![image](https://github.com/calcom/cal.com/assets/121884634/d6666cbf-cc36-4fe5-90bb-9d69de26248d) - Set a Default App Link: ![image](https://github.com/calcom/cal.com/assets/121884634/f4f7093c-839c-4ae1-a4f3-ecd266238115) - OIDC configuration: ![image](https://github.com/calcom/cal.com/assets/121884634/a689acd7-2488-423e-a57d-5610d683d11d) - SAML Configuration: ![image](https://github.com/calcom/cal.com/assets/121884634/61480037-1733-4ba9-8dfd-429819e7eac9) - How to use booking questions as variables? ![image](https://github.com/calcom/cal.com/assets/121884634/2982ace4-41b0-4849-878b-b2ceabf59469) ![image](https://github.com/calcom/cal.com/assets/121884634/65888a13-d9a7-4df5-a8b7-56becc61882e) - Invite Link Settings: ![image](https://github.com/calcom/cal.com/assets/121884634/3f81fcd1-f862-4106-a79c-70808090f055) - Add Action: ![image](https://github.com/calcom/cal.com/assets/121884634/ec5f9490-dccc-4c8e-bc8e-b48f8a29144b) - Edit Keys: ![245192220-c669e6fe-01ba-4a66-9b03-96ab4e8f1809](https://github.com/calcom/cal.com/assets/121884634/bfff69b3-831a-4a5c-9835-0569109b8386) - Create an Api Key: ![image](https://github.com/calcom/cal.com/assets/121884634/fbdf7494-6da4-49da-ba41-5f9a6393bb72) - API key created successfully: ![image](https://github.com/calcom/cal.com/assets/121884634/81e6a5c2-5d9d-40ad-a78e-ed1ab2128a26) - Invite Team Member: ![image](https://github.com/calcom/cal.com/assets/121884634/9e4ceea9-f708-4958-a6d7-e00304beacbf) - Add a Question: ![image](https://github.com/calcom/cal.com/assets/121884634/8329c593-8203-484e-a4dd-c9bd5210d8db) - Add a new event type: ![image](https://github.com/calcom/cal.com/assets/121884634/19a72734-aa79-4828-81bb-f534d46a5fc5) --- apps/web/components/Embed.tsx | 12 +- .../settings/DisableTwoFactorModal.tsx | 14 +- .../settings/EnableTwoFactorModal.tsx | 18 +- .../web/pages/settings/my-account/profile.tsx | 62 ++--- .../components/AccountDialog.tsx | 2 +- .../routing-forms/components/FormActions.tsx | 15 +- packages/features/apps/AdminAppsList.tsx | 2 +- .../components/AppSetDefaultLinkDialog.tsx | 4 +- .../components/event-meta/Occurences.tsx | 10 +- .../weeklyview/components/Calendar.tsx | 2 +- .../components/DateValues/index.tsx | 2 +- .../api-keys/components/ApiKeyDialogForm.tsx | 10 +- .../ee/sso/components/OIDCConnection.tsx | 12 +- .../ee/sso/components/SAMLConnection.tsx | 4 +- .../components/InviteLinkSettingsModal.tsx | 4 +- .../components/MemberChangeRoleModal.tsx | 16 +- .../components/MemberInvitationModal.tsx | 8 +- .../ee/teams/components/MemberListItem.tsx | 2 +- .../workflows/components/AddActionDialog.tsx | 241 +++++++++--------- .../components/WorkflowStepContainer.tsx | 13 +- .../BulkEditDefaultConferencingModal.tsx | 4 +- .../components/CreateEventTypeDialog.tsx | 2 +- .../eventtypes/components/DuplicateDialog.tsx | 20 +- .../features/form-builder/FormBuilder.tsx | 2 +- .../settings/TimezoneChangeDialog.tsx | 3 +- packages/ui/components/dialog/Dialog.tsx | 11 +- 26 files changed, 258 insertions(+), 237 deletions(-) diff --git a/apps/web/components/Embed.tsx b/apps/web/components/Embed.tsx index 3ad578c85c..88c5cf48c2 100644 --- a/apps/web/components/Embed.tsx +++ b/apps/web/components/Embed.tsx @@ -17,6 +17,7 @@ import { Button, Dialog, DialogClose, + DialogFooter, DialogContent, HorizontalTabs, Label, @@ -1206,8 +1207,12 @@ const EmbedTypeCodeAndPreviewDialogContent = ({ /> )} -
-
+
+ + {tab.type === "code" ? (
+
); })} diff --git a/apps/web/components/settings/DisableTwoFactorModal.tsx b/apps/web/components/settings/DisableTwoFactorModal.tsx index f6db328236..6b6f47236f 100644 --- a/apps/web/components/settings/DisableTwoFactorModal.tsx +++ b/apps/web/components/settings/DisableTwoFactorModal.tsx @@ -3,7 +3,7 @@ import { useForm } from "react-hook-form"; import { ErrorCode } from "@calcom/features/auth/lib/ErrorCode"; import { useLocale } from "@calcom/lib/hooks/useLocale"; -import { Button, Dialog, DialogContent, Form, PasswordField } from "@calcom/ui"; +import { Button, Dialog, DialogContent, DialogFooter, Form, PasswordField } from "@calcom/ui"; import TwoFactor from "@components/auth/TwoFactor"; @@ -74,7 +74,7 @@ const DisableTwoFactorAuthModal = ({
-
+
{errorMessage}

}
-
- + -
+ +
diff --git a/apps/web/components/settings/EnableTwoFactorModal.tsx b/apps/web/components/settings/EnableTwoFactorModal.tsx index 36a5db71b3..c6ad80254f 100644 --- a/apps/web/components/settings/EnableTwoFactorModal.tsx +++ b/apps/web/components/settings/EnableTwoFactorModal.tsx @@ -4,7 +4,7 @@ import { useForm } from "react-hook-form"; import { ErrorCode } from "@calcom/features/auth/lib/ErrorCode"; import { useLocale } from "@calcom/lib/hooks/useLocale"; -import { Button, Dialog, DialogContent, Form, TextField } from "@calcom/ui"; +import { Button, Dialog, DialogContent, DialogFooter, Form, TextField } from "@calcom/ui"; import TwoFactor from "@components/auth/TwoFactor"; @@ -150,20 +150,20 @@ const EnableTwoFactorModal = ({ onEnable, onCancel, open, onOpenChange }: Enable <> -
+
{ // eslint-disable-next-line @next/next/no-img-element }
-

+

{secret}

-
+
{errorMessage && ( @@ -173,7 +173,10 @@ const EnableTwoFactorModal = ({ onEnable, onCancel, open, onOpenChange }: Enable )}
-
+ + -
+ diff --git a/apps/web/pages/settings/my-account/profile.tsx b/apps/web/pages/settings/my-account/profile.tsx index c44b8d2279..d7e1004fc1 100644 --- a/apps/web/pages/settings/my-account/profile.tsx +++ b/apps/web/pages/settings/my-account/profile.tsx @@ -243,36 +243,38 @@ const ProfileView = () => { type="creation" Icon={AlertTriangle}> <> -

- {t("delete_account_confirmation_message", { appName: APP_NAME })} -

- {isCALIdentityProviver && ( - - )} +
+

+ {t("delete_account_confirmation_message", { appName: APP_NAME })} +

+ {isCALIdentityProviver && ( + + )} - {user?.twoFactorEnabled && isCALIdentityProviver && ( -
- - - )} + {user?.twoFactorEnabled && isCALIdentityProviver && ( +
+ + + )} - {hasDeleteErrors && } - + {hasDeleteErrors && } +
+ + - @@ -285,7 +287,7 @@ const ProfileView = () => { description={t("confirm_password_change_email")} type="creation" Icon={AlertTriangle}> - <> +
{ /> {confirmPasswordErrorMessage && } - - - - - +
+ + + + diff --git a/packages/app-store/office365video/components/AccountDialog.tsx b/packages/app-store/office365video/components/AccountDialog.tsx index f5a5062708..257f14eedb 100644 --- a/packages/app-store/office365video/components/AccountDialog.tsx +++ b/packages/app-store/office365video/components/AccountDialog.tsx @@ -12,7 +12,7 @@ export function AccountDialog(props: DialogProps) { type="creation" title="Connecting with MS Teams requires a work/school Microsoft account." description="If you continue with a personal account you will receive an error"> - + <> -
-