added new combined buttons on all pages (#4328)
Co-authored-by: sean-brydon <[email protected]>
This commit is contained in:
1 parent
b0de653166
commit
83f0ba7ba4
12 files changed
+197
-216
No files matched your search
@@ -136,7 +136,8 @@ export const FormActionsDropdown = ({ form, children }: { form: RoutingForm; chi
|
||||
<Button
|
||||
type="button"
|
||||
size="icon"
|
||||
color="minimal"
|
||||
color="secondary"
|
||||
combined
|
||||
className={classNames(disabled && " opacity-30")}
|
||||
StartIcon={Icon.FiMoreHorizontal}
|
||||
/>
|
||||
@@ -344,7 +345,7 @@ export const FormAction = forwardRef(function FormAction<T extends typeof Button
|
||||
return <></>;
|
||||
}
|
||||
return (
|
||||
<div {...restProps}>
|
||||
<div {...restProps} className="mx-2 self-center rounded-md p-2 hover:bg-gray-200">
|
||||
<Switch
|
||||
checked={!routingForm.disabled}
|
||||
label={label}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { AppGetServerSidePropsContext, AppPrisma, AppUser } from "@calcom/types/AppGetServerSideProps";
|
||||
import { Icon } from "@calcom/ui/Icon";
|
||||
import { DropdownMenuSeparator, Tooltip } from "@calcom/ui/v2";
|
||||
import { ButtonGroup, DropdownMenuSeparator, Tooltip } from "@calcom/ui/v2";
|
||||
import { EmptyScreen } from "@calcom/ui/v2";
|
||||
import { Badge } from "@calcom/ui/v2";
|
||||
import { List, ListLinkItem } from "@calcom/ui/v2/core/List";
|
||||
@@ -27,10 +27,7 @@ export default function RoutingForms({
|
||||
);
|
||||
}
|
||||
return (
|
||||
<ShellMain
|
||||
heading="Routing Forms"
|
||||
CTA={<NewFormButton />}
|
||||
subtitle="You can see all routing forms and create one here.">
|
||||
<ShellMain heading="Routing Forms" CTA={<NewFormButton />} subtitle={t("routing_forms_description")}>
|
||||
<FormActionsProvider appUrl={appUrl}>
|
||||
<div className="-mx-4 md:-mx-8">
|
||||
<div className="mb-10 w-full px-4 pb-2 sm:px-6 md:px-8">
|
||||
@@ -63,74 +60,72 @@ export default function RoutingForms({
|
||||
subHeading={description}
|
||||
actions={
|
||||
<>
|
||||
<FormAction
|
||||
className="self-center border-r-2 border-gray-300 pr-5 "
|
||||
action="toggle"
|
||||
routingForm={form}
|
||||
/>
|
||||
<Tooltip content={t("preview")}>
|
||||
<FormAction className="self-center" action="toggle" routingForm={form} />
|
||||
<ButtonGroup combined>
|
||||
<Tooltip content={t("preview")}>
|
||||
<FormAction
|
||||
action="preview"
|
||||
routingForm={form}
|
||||
target="_blank"
|
||||
StartIcon={Icon.FiExternalLink}
|
||||
color="secondary"
|
||||
combined
|
||||
size="icon"
|
||||
disabled={disabled}
|
||||
/>
|
||||
</Tooltip>
|
||||
<FormAction
|
||||
action="preview"
|
||||
className="ml-3"
|
||||
routingForm={form}
|
||||
target="_blank"
|
||||
StartIcon={Icon.FiExternalLink}
|
||||
color="minimal"
|
||||
action="copyLink"
|
||||
color="secondary"
|
||||
combined
|
||||
size="icon"
|
||||
StartIcon={Icon.FiLink}
|
||||
disabled={disabled}
|
||||
tooltip={t("copy_link")}
|
||||
/>
|
||||
</Tooltip>
|
||||
<FormAction
|
||||
routingForm={form}
|
||||
action="copyLink"
|
||||
color="minimal"
|
||||
size="icon"
|
||||
StartIcon={Icon.FiLink}
|
||||
disabled={disabled}
|
||||
tooltip={t("copy_link")}
|
||||
/>
|
||||
|
||||
<FormActionsDropdown form={form}>
|
||||
<FormAction
|
||||
action="edit"
|
||||
routingForm={form}
|
||||
color="minimal"
|
||||
StartIcon={Icon.FiEdit}>
|
||||
{t("edit")}
|
||||
</FormAction>
|
||||
<FormAction
|
||||
action="download"
|
||||
routingForm={form}
|
||||
color="minimal"
|
||||
StartIcon={Icon.FiDownload}>
|
||||
{t("download_responses")}
|
||||
</FormAction>
|
||||
<FormAction
|
||||
action="embed"
|
||||
routingForm={form}
|
||||
color="minimal"
|
||||
className="w-full"
|
||||
StartIcon={Icon.FiCode}>
|
||||
{t("embed")}
|
||||
</FormAction>
|
||||
<FormAction
|
||||
action="duplicate"
|
||||
routingForm={form}
|
||||
color="minimal"
|
||||
className="w-full"
|
||||
StartIcon={Icon.FiCopy}>
|
||||
{t("duplicate")}
|
||||
</FormAction>
|
||||
<DropdownMenuSeparator className="h-px bg-gray-200" />
|
||||
<FormAction
|
||||
action="_delete"
|
||||
routingForm={form}
|
||||
color="destructive"
|
||||
className="w-full"
|
||||
StartIcon={Icon.FiTrash}>
|
||||
{t("delete")}
|
||||
</FormAction>
|
||||
</FormActionsDropdown>
|
||||
<FormActionsDropdown form={form}>
|
||||
<FormAction
|
||||
action="edit"
|
||||
routingForm={form}
|
||||
color="minimal"
|
||||
StartIcon={Icon.FiEdit}>
|
||||
{t("edit")}
|
||||
</FormAction>
|
||||
<FormAction
|
||||
action="download"
|
||||
routingForm={form}
|
||||
color="minimal"
|
||||
StartIcon={Icon.FiDownload}>
|
||||
{t("download_responses")}
|
||||
</FormAction>
|
||||
<FormAction
|
||||
action="embed"
|
||||
routingForm={form}
|
||||
color="minimal"
|
||||
className="w-full"
|
||||
StartIcon={Icon.FiCode}>
|
||||
{t("embed")}
|
||||
</FormAction>
|
||||
<FormAction
|
||||
action="duplicate"
|
||||
routingForm={form}
|
||||
color="minimal"
|
||||
className="w-full"
|
||||
StartIcon={Icon.FiCopy}>
|
||||
{t("duplicate")}
|
||||
</FormAction>
|
||||
<DropdownMenuSeparator className="h-px bg-gray-200" />
|
||||
<FormAction
|
||||
action="_delete"
|
||||
routingForm={form}
|
||||
color="destructive"
|
||||
className="w-full"
|
||||
StartIcon={Icon.FiTrash}>
|
||||
{t("delete")}
|
||||
</FormAction>
|
||||
</FormActionsDropdown>
|
||||
</ButtonGroup>
|
||||
</>
|
||||
}>
|
||||
<div className="flex flex-wrap gap-1">
|
||||
|
||||
Reference in new issue
Block a user