refactor: apply biome formatting to apps/web (#27692)
* refactor: apply biome formatting to apps/web (batch 1) Formats apps/web non-modules directories: - apps/web/app - apps/web/lib - apps/web/pages - apps/web/styles - apps/web/server - apps/web/test - Root-level .ts and .mjs files Co-Authored-By: Claude Opus 4.5 <[email protected]> * refactor: apply biome formatting to apps/web/modules (batch 2) Formats smaller apps/web/modules directories: - onboarding, data-table, users, apps, auth - integration-attribute-sync, shell, availability - feature-flags, team, webhooks, getting-started - feature-opt-in, troubleshooter, schedules, notifications - signup-view.tsx Co-Authored-By: Claude Opus 4.5 <[email protected]> * refactor: apply biome formatting to apps/web/modules (batch 3) Formats medium apps/web/modules directories: - bookings - event-types - insights - embed Co-Authored-By: Claude Opus 4.5 <[email protected]> * refactor: apply biome formatting to apps/web/modules/ee (batch 4) Formats apps/web/modules/ee directory. Co-Authored-By: Claude Opus 4.5 <[email protected]> * refactor: apply biome formatting to apps/web (batch 5) Formats remaining apps/web directories: - apps/web/modules/settings - apps/web/modules/booking-audit - apps/web/playwright Co-Authored-By: Claude Opus 4.5 <[email protected]> * refactor: apply biome formatting to apps/web/components (batch 6) Formats remaining apps/web/components files. Co-Authored-By: Claude Opus 4.5 <[email protected]> * refactor: apply biome formatting to new apps/web files from main Formats newly added/modified files from main merge: - WorkflowStepContainer.tsx (resolved merge conflicts) - Newly moved files (blocklist, form-builder, schedules, etc.) - Other files modified in main Co-Authored-By: Claude Opus 4.5 <[email protected]> * refactor: apply biome formatting to new apps/web files from main Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: Claude Opus 4.5 <[email protected]> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
271 files changed
+3729
-4857
No files matched your search
@@ -45,16 +45,17 @@ export function UpgradeTip({
|
||||
return (
|
||||
<>
|
||||
<div className="relative flex min-h-[295px] w-full items-center justify-between overflow-hidden rounded-lg pb-10">
|
||||
<picture className="absolute min-h-full w-full rounded-lg object-cover">
|
||||
<picture className="absolute min-h-full w-full rounded-lg object-cover">
|
||||
{" "}
|
||||
<source srcSet={imageSrc} media="(prefers-color-scheme: dark)" />
|
||||
<source srcSet={imageSrc} media="(prefers-color-scheme: dark)" />
|
||||
<img
|
||||
className="absolute min-h-full w-full select-none rounded-lg object-cover object-left md:object-[45%_30%] lg:object-center" src={imageSrc}
|
||||
className="absolute min-h-full w-full select-none rounded-lg object-cover object-left md:object-[45%_30%] lg:object-center"
|
||||
src={imageSrc}
|
||||
loading="lazy"
|
||||
alt={title}
|
||||
/>
|
||||
</picture>
|
||||
<div className="relative my-4 w-full px-4 pb-4 sm:px-8 md:px-8 lg:px-14">
|
||||
<div className="relative my-4 w-full px-4 pb-4 sm:px-8 md:px-8 lg:px-14">
|
||||
<h1 className={classNames("font-cal mt-4 text-2xl sm:text-3xl")}>{title}</h1>
|
||||
<p className={classNames("mb-8 mt-4 max-w-sm text-sm sm:text-base")}>{description}</p>
|
||||
{buttons}
|
||||
|
||||
@@ -59,16 +59,24 @@ export function GatedFeaturesModal() {
|
||||
<div className="flex flex-col gap-1 ml-6">
|
||||
<ul className="list-disc">
|
||||
{features.map((feature) => (
|
||||
<li className="text-sm text-default font-medium" key={feature}>{t(feature)}</li>
|
||||
<li className="text-sm text-default font-medium" key={feature}>
|
||||
{t(feature)}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div className="w-full bg-muted border-subtle flex items-center justify-between rounded-b-2xl border-t px-6 py-5">
|
||||
<Button color="minimal" onClick={close}>{t("dismiss")}</Button>
|
||||
<Button color="minimal" onClick={close}>
|
||||
{t("dismiss")}
|
||||
</Button>
|
||||
<div className="flex gap-2">
|
||||
<Button color="secondary" target="_blank" rel="noopener noreferrer" href={learnMoreUrl}>{t("learn_more")}</Button>
|
||||
<Button color="primary" href={ctaUrl}>{t("upgrade")}</Button>
|
||||
<Button color="secondary" target="_blank" rel="noopener noreferrer" href={learnMoreUrl}>
|
||||
{t("learn_more")}
|
||||
</Button>
|
||||
<Button color="primary" href={ctaUrl}>
|
||||
{t("upgrade")}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</DialogContent>
|
||||
|
||||
@@ -15,11 +15,7 @@ import UnconfirmedBookingBadge from "../../bookings/components/UnconfirmedBookin
|
||||
import { KBarTrigger } from "../Kbar";
|
||||
import { TeamInviteBadge } from "../TeamInviteBadge";
|
||||
import type { NavigationItemType } from "./NavigationItem";
|
||||
import {
|
||||
NavigationItem,
|
||||
MobileNavigationItem,
|
||||
MobileNavigationMoreItem,
|
||||
} from "./NavigationItem";
|
||||
import { NavigationItem, MobileNavigationItem, MobileNavigationMoreItem } from "./NavigationItem";
|
||||
|
||||
export const MORE_SEPARATOR_NAME = "more";
|
||||
|
||||
@@ -68,10 +64,7 @@ const getNavigationItems = (
|
||||
moreOnMobile: true,
|
||||
isCurrent: ({ pathname: path, item }) => {
|
||||
// During Server rendering path is /v2/apps but on client it becomes /apps(weird..)
|
||||
return (
|
||||
(path?.startsWith(item.href) ?? false) &&
|
||||
!(path?.includes("routing-forms/") ?? false)
|
||||
);
|
||||
return (path?.startsWith(item.href) ?? false) && !(path?.includes("routing-forms/") ?? false);
|
||||
},
|
||||
child: [
|
||||
{
|
||||
@@ -117,8 +110,7 @@ const getNavigationItems = (
|
||||
name: "insights",
|
||||
href: "/insights",
|
||||
icon: "chart-bar",
|
||||
isCurrent: ({ pathname: path, item }) =>
|
||||
path?.startsWith(item.href) ?? false,
|
||||
isCurrent: ({ pathname: path, item }) => path?.startsWith(item.href) ?? false,
|
||||
moreOnMobile: true,
|
||||
child: hasAllInsightsAccess
|
||||
? [
|
||||
@@ -130,21 +122,18 @@ const getNavigationItems = (
|
||||
{
|
||||
name: "routing",
|
||||
href: "/insights/routing",
|
||||
isCurrent: ({ pathname: path }) =>
|
||||
path?.startsWith("/insights/routing") ?? false,
|
||||
isCurrent: ({ pathname: path }) => path?.startsWith("/insights/routing") ?? false,
|
||||
},
|
||||
{
|
||||
name: "router_position",
|
||||
href: "/insights/router-position",
|
||||
isCurrent: ({ pathname: path }) =>
|
||||
path?.startsWith("/insights/router-position") ?? false,
|
||||
isCurrent: ({ pathname: path }) => path?.startsWith("/insights/router-position") ?? false,
|
||||
},
|
||||
{
|
||||
name: "call_history",
|
||||
href: "/insights/call-history",
|
||||
// icon: "phone",
|
||||
isCurrent: ({ pathname: path }) =>
|
||||
path?.startsWith("/insights/call-history") ?? false,
|
||||
isCurrent: ({ pathname: path }) => path?.startsWith("/insights/call-history") ?? false,
|
||||
},
|
||||
]
|
||||
: [
|
||||
@@ -153,7 +142,7 @@ const getNavigationItems = (
|
||||
href: "/insights/call-history",
|
||||
// icon: "phone",
|
||||
isCurrent: ({ pathname: path }) => path?.startsWith("/insights/call-history") ?? false,
|
||||
}
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -217,19 +206,12 @@ const useNavigationItems = (isPlatformNavigation = false) => {
|
||||
? getNavigationItems(orgBranding, hasAllInsightsAccess)
|
||||
: platformNavigationItems;
|
||||
|
||||
const desktopNavigationItems = items.filter(
|
||||
(item) => item.name !== MORE_SEPARATOR_NAME
|
||||
);
|
||||
const desktopNavigationItems = items.filter((item) => item.name !== MORE_SEPARATOR_NAME);
|
||||
const mobileNavigationBottomItems = items.filter(
|
||||
(item) =>
|
||||
(!item.moreOnMobile && !item.onlyDesktop) ||
|
||||
item.name === MORE_SEPARATOR_NAME
|
||||
(item) => (!item.moreOnMobile && !item.onlyDesktop) || item.name === MORE_SEPARATOR_NAME
|
||||
);
|
||||
const mobileNavigationMoreItems = items.filter(
|
||||
(item) =>
|
||||
item.moreOnMobile &&
|
||||
!item.onlyDesktop &&
|
||||
item.name !== MORE_SEPARATOR_NAME
|
||||
(item) => item.moreOnMobile && !item.onlyDesktop && item.name !== MORE_SEPARATOR_NAME
|
||||
);
|
||||
|
||||
return {
|
||||
@@ -240,11 +222,7 @@ const useNavigationItems = (isPlatformNavigation = false) => {
|
||||
}, [hasPaidPlan, isPending, isPlatformNavigation, orgBranding]);
|
||||
};
|
||||
|
||||
export const Navigation = ({
|
||||
isPlatformNavigation = false,
|
||||
}: {
|
||||
isPlatformNavigation?: boolean;
|
||||
}) => {
|
||||
export const Navigation = ({ isPlatformNavigation = false }: { isPlatformNavigation?: boolean }) => {
|
||||
const { desktopNavigationItems } = useNavigationItems(isPlatformNavigation);
|
||||
|
||||
return (
|
||||
@@ -270,14 +248,9 @@ export function MobileNavigationContainer({
|
||||
return <MobileNavigation isPlatformNavigation={isPlatformNavigation} />;
|
||||
}
|
||||
|
||||
const MobileNavigation = ({
|
||||
isPlatformNavigation = false,
|
||||
}: {
|
||||
isPlatformNavigation?: boolean;
|
||||
}) => {
|
||||
const MobileNavigation = ({ isPlatformNavigation = false }: { isPlatformNavigation?: boolean }) => {
|
||||
const isEmbed = useIsEmbed();
|
||||
const { mobileNavigationBottomItems } =
|
||||
useNavigationItems(isPlatformNavigation);
|
||||
const { mobileNavigationBottomItems } = useNavigationItems(isPlatformNavigation);
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -285,8 +258,7 @@ const MobileNavigation = ({
|
||||
className={classNames(
|
||||
"pwa:pb-[max(0.25rem,env(safe-area-inset-bottom))] pwa:-mx-2 bg-cal-muted/40 border-subtle fixed bottom-0 left-0 z-30 flex w-full border-t px-1 shadow backdrop-blur-md md:hidden",
|
||||
isEmbed && "hidden"
|
||||
)}
|
||||
>
|
||||
)}>
|
||||
{mobileNavigationBottomItems.map((item) => (
|
||||
<MobileNavigationItem key={item.name} item={item} />
|
||||
))}
|
||||
|
||||
@@ -264,7 +264,6 @@ export const NavigationItem: React.FC<{
|
||||
</div>
|
||||
)}
|
||||
</Fragment>
|
||||
|
||||
);
|
||||
};
|
||||
|
||||
@@ -354,8 +353,7 @@ export const MobileNavigationMoreItem: React.FC<{
|
||||
<li key={childItem.name} className="border-subtle border-t">
|
||||
<Link
|
||||
href={childItem.href}
|
||||
className="hover:bg-cal-muted flex items-center p-4 pl-12 transition"
|
||||
>
|
||||
className="hover:bg-cal-muted flex items-center p-4 pl-12 transition">
|
||||
<span className="text-default font-medium">
|
||||
{isLocaleReady ? t(childItem.name) : <SkeletonText />}
|
||||
</span>
|
||||
@@ -366,7 +364,6 @@ export const MobileNavigationMoreItem: React.FC<{
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</>
|
||||
) : isActionItem ? (
|
||||
<button
|
||||
|
||||
@@ -20,4 +20,4 @@ export function useMobileMoreItems(): NavigationItemType[] {
|
||||
(item: NavigationItemType) => item.name !== "settings"
|
||||
);
|
||||
return filteredBottomNavItems;
|
||||
}
|
||||
}
|
||||
@@ -602,12 +602,7 @@ export function LinuxIcon({ className }: { className?: string }) {
|
||||
strokeWidth="0.3"
|
||||
strokeLinecap="round"
|
||||
/>
|
||||
<path
|
||||
d="M8.5 9.5C8.5 9.5 9 9.8 9.5 9.5"
|
||||
stroke="#020204"
|
||||
strokeWidth="0.2"
|
||||
strokeLinecap="round"
|
||||
/>
|
||||
<path d="M8.5 9.5C8.5 9.5 9 9.8 9.5 9.5" stroke="#020204" strokeWidth="0.2" strokeLinecap="round" />
|
||||
<path
|
||||
d="M10.5 9.5C10.5 9.5 11 9.8 11.5 9.5"
|
||||
stroke="#020204"
|
||||
|
||||
@@ -277,9 +277,7 @@ export function UserDropdown({ small }: UserDropdownProps) {
|
||||
)}
|
||||
|
||||
{!isPlatformPages && isPlatformUser && (
|
||||
<MenuItem
|
||||
render={<Link href="/settings/platform" />}
|
||||
className="todesktop:hidden hidden lg:flex">
|
||||
<MenuItem render={<Link href="/settings/platform" />} className="todesktop:hidden hidden lg:flex">
|
||||
<Icon name="blocks" />
|
||||
{t("platform")}
|
||||
</MenuItem>
|
||||
|
||||
Reference in new issue
Block a user