feat: Plain chat (#18284)

* plain custom desin

* No display on card

* dynamic plain chat component and hmac hash

* re-route users to plain.com chat instead of intercom chat when going to /support

* provider errors

* yarn lock fix

* plain chat removed unneeded hmac

* fix ts error

* error handling improved

* remove intercome provider from app-dir

* Create getting-started.mdx (#18342)

* Delete help directory (#18343)

* chore: moved docs/help to /help (#18345)

* chore: Delete unused guides directory (#18346)

* feat: booking filters (#18303)

Co-authored-by: Syed Ali Shahbaz <[email protected]>

* chore: Remove `HeadSeo` components where no longer needed + improve app router metadata logic (#18348)

* remove HeadSeo for already migrated pages and refactor prepareMetadata

* create _generateMetadataWithoutImage and refactor _generateMetadata

* chore: app router - /bookings status page (#18183)

* chore: app router - /bookings page

* remove env vars

* fix

* Update middleware.ts

* revert unneeded change

* refactor for the better

* fix

* cache i18n instances (#18309)

* feat: virtual queues tab in insights (#18260)

Co-authored-by: CarinaWolli <[email protected]>
Co-authored-by: sean-brydon <[email protected]>
Co-authored-by: sean-brydon <[email protected]>
Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: Omar López <[email protected]>

* feat: update translations via @replexica (#18361)

Co-authored-by: Replexica <[email protected]>

* update OOO e2e tests to remove flakiness (#18367)

* fix: metadata is overwritten for child managed eventType when updating parent (#18059)

* fix: metadata is overwirten

* Update

* type error

* Update

* fix test

* fix type error

* chore: added routing support link (#18369)

* Added routing form support link

* small change

* Type fix

---------

Co-authored-by: Joe Au-Yeung <[email protected]>

* chore: refactor handling logic for embeds in app router (#18362)

* refactor handling logic for embeds in app router

* fix type checks

* add test for withEmbedSsrAppDir

* fix

* review changes

* yarn lock

---------

Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: Calcom Bot <[email protected]>
Co-authored-by: Udit Takkar <[email protected]>
Co-authored-by: Syed Ali Shahbaz <[email protected]>
Co-authored-by: Benny Joo <[email protected]>
Co-authored-by: Carina Wollendorfer <[email protected]>
Co-authored-by: CarinaWolli <[email protected]>
Co-authored-by: sean-brydon <[email protected]>
Co-authored-by: sean-brydon <[email protected]>
Co-authored-by: Omar López <[email protected]>
Co-authored-by: Replexica <[email protected]>
Co-authored-by: Vijay <[email protected]>
Co-authored-by: Anik Dhabal Babu <[email protected]>
Co-authored-by: Joe Au-Yeung <[email protected]>
Co-authored-by: Alex van Andel <[email protected]>
This commit is contained in:
12 files changed
+7767 -210

No files matched your search

@@ -2,9 +2,8 @@ import { signOut } from "next-auth/react";
import { usePathname } from "next/navigation";
import { useEffect, useState } from "react";
import HelpMenuItem from "@calcom/features/ee/support/components/HelpMenuItem";
import { classNames } from "@calcom/lib";
import { JOIN_COMMUNITY, ROADMAP, DESKTOP_APP_LINK } from "@calcom/lib/constants";
import { ROADMAP, DESKTOP_APP_LINK } from "@calcom/lib/constants";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import useMeQuery from "@calcom/trpc/react/hooks/useMeQuery";
import {
@@ -23,6 +22,16 @@ import { useGetUserAttributes } from "@calcom/web/components/settings/platform/h
import FreshChatProvider from "../../ee/support/lib/freshchat/FreshChatProvider";
declare global {
interface Window {
Plain?: {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
init: (config: any) => void;
open: () => void;
};
}
}
interface UserDropdownProps {
small?: boolean;
}
@@ -44,11 +53,12 @@ export function UserDropdown({ small }: UserDropdownProps) {
});
});
const [helpOpen, setHelpOpen] = useState(false);
const [menuOpen, setMenuOpen] = useState(false);
const onHelpItemSelect = () => {
setHelpOpen(false);
const handleHelpClick = () => {
if (window.Plain) {
window.Plain.open();
}
setMenuOpen(false);
};
@@ -108,110 +118,88 @@ export function UserDropdown({ small }: UserDropdownProps) {
align="start"
onInteractOutside={() => {
setMenuOpen(false);
setHelpOpen(false);
}}
className="group overflow-hidden rounded-md">
{helpOpen ? (
<HelpMenuItem onHelpItemSelect={() => onHelpItemSelect()} />
) : (
<>
{!isPlatformPages && (
<>
<DropdownMenuItem>
<DropdownItem
type="button"
CustomStartIcon={
<Icon name="user" className="text-default h-4 w-4" aria-hidden="true" />
}
href="/settings/my-account/profile">
{t("my_profile")}
</DropdownItem>
</DropdownMenuItem>
<DropdownMenuItem>
<DropdownItem
type="button"
CustomStartIcon={
<Icon name="settings" className="text-default h-4 w-4" aria-hidden="true" />
}
href="/settings/my-account/general">
{t("my_settings")}
</DropdownItem>
</DropdownMenuItem>
<DropdownMenuItem>
<DropdownItem
type="button"
CustomStartIcon={
<Icon name="moon" className="text-default h-4 w-4" aria-hidden="true" />
}
href="/settings/my-account/out-of-office">
{t("out_of_office")}
</DropdownItem>
</DropdownMenuItem>
<DropdownMenuSeparator />
</>
)}
<DropdownMenuItem>
<DropdownItem
StartIcon="messages-square"
target="_blank"
rel="noreferrer"
href={JOIN_COMMUNITY}>
{t("join_our_community")}
</DropdownItem>
</DropdownMenuItem>
<DropdownMenuItem>
<DropdownItem StartIcon="map" target="_blank" href={ROADMAP}>
{t("visit_roadmap")}
</DropdownItem>
</DropdownMenuItem>
<DropdownMenuItem>
<DropdownItem
type="button"
StartIcon="circle-help"
aria-hidden="true"
onClick={() => setHelpOpen(true)}>
{t("help")}
</DropdownItem>
</DropdownMenuItem>
{!isPlatformPages && (
<DropdownMenuItem className="todesktop:hidden hidden lg:flex">
<>
{!isPlatformPages && (
<>
<DropdownMenuItem>
<DropdownItem
StartIcon="download"
target="_blank"
rel="noreferrer"
href={DESKTOP_APP_LINK}>
{t("download_desktop_app")}
type="button"
CustomStartIcon={
<Icon name="user" className="text-default h-4 w-4" aria-hidden="true" />
}
href="/settings/my-account/profile">
{t("my_profile")}
</DropdownItem>
</DropdownMenuItem>
)}
{!isPlatformPages && isPlatformUser && (
<DropdownMenuItem className="todesktop:hidden hidden lg:flex">
<DropdownMenuItem>
<DropdownItem
StartIcon="blocks"
target="_blank"
rel="noreferrer"
href="/settings/platform">
Platform
type="button"
CustomStartIcon={
<Icon name="settings" className="text-default h-4 w-4" aria-hidden="true" />
}
href="/settings/my-account/general">
{t("my_settings")}
</DropdownItem>
</DropdownMenuItem>
)}
<DropdownMenuSeparator />
<DropdownMenuItem>
<DropdownItem
type="button"
CustomStartIcon={
<Icon name="moon" className="text-default h-4 w-4" aria-hidden="true" />
}
href="/settings/my-account/out-of-office">
{t("out_of_office")}
</DropdownItem>
</DropdownMenuItem>
<DropdownMenuSeparator />
</>
)}
<DropdownMenuItem>
<DropdownItem
type="button"
StartIcon="log-out"
aria-hidden="true"
onClick={() => {
signOut({ callbackUrl: "/auth/logout" });
}}>
{t("sign_out")}
<DropdownMenuItem>
<DropdownItem StartIcon="map" target="_blank" href={ROADMAP}>
{t("visit_roadmap")}
</DropdownItem>
</DropdownMenuItem>
<DropdownMenuItem>
<DropdownItem
type="button"
StartIcon="circle-help"
aria-hidden="true"
onClick={handleHelpClick}>
{t("help")}
</DropdownItem>
</DropdownMenuItem>
{!isPlatformPages && (
<DropdownMenuItem className="todesktop:hidden hidden lg:flex">
<DropdownItem StartIcon="download" target="_blank" rel="noreferrer" href={DESKTOP_APP_LINK}>
{t("download_desktop_app")}
</DropdownItem>
</DropdownMenuItem>
</>
)}
)}
{!isPlatformPages && isPlatformUser && (
<DropdownMenuItem className="todesktop:hidden hidden lg:flex">
<DropdownItem StartIcon="blocks" target="_blank" rel="noreferrer" href="/settings/platform">
Platform
</DropdownItem>
</DropdownMenuItem>
)}
<DropdownMenuSeparator />
<DropdownMenuItem>
<DropdownItem
type="button"
StartIcon="log-out"
aria-hidden="true"
onClick={() => {
signOut({ callbackUrl: "/auth/logout" });
}}>
{t("sign_out")}
</DropdownItem>
</DropdownMenuItem>
</>
</DropdownMenuContent>
</FreshChatProvider>
</DropdownMenuPortal>