fix: Few minor UI issues in Orgs (#9919)

This commit is contained in:
Leo Giovanetti authored and GitHub committed 2023-07-04 22:07:45 +02:00
1 parent 5d73095060
commit 14aa0a2f2d
3 files changed
+59 -56

No files matched your search

@@ -150,7 +150,7 @@ export const CreateANewOrganizationForm = () => {
adminUsername: string; adminUsername: string;
}>({ }>({
defaultValues: { defaultValues: {
slug: `${slug}`, slug: `${slug ?? ""}`,
}, },
}); });
const watchAdminEmail = newOrganizationFormMethods.watch("adminEmail"); const watchAdminEmail = newOrganizationFormMethods.watch("adminEmail");
+57 -54
View File
@@ -948,62 +948,65 @@ export function ShellMain(props: LayoutProps) {
return ( return (
<> <>
<div {(props.heading || !!props.backPath) && (
className={classNames( <div
"flex items-center md:mb-6 md:mt-0", className={classNames(
props.smallHeading ? "lg:mb-7" : "lg:mb-8", "flex items-center md:mb-6 md:mt-0",
props.hideHeadingOnMobile ? "mb-0" : "mb-6" props.smallHeading ? "lg:mb-7" : "lg:mb-8",
)}> props.hideHeadingOnMobile ? "mb-0" : "mb-6"
{!!props.backPath && ( )}>
<Button {!!props.backPath && (
variant="icon" <Button
size="sm" variant="icon"
color="minimal" size="sm"
onClick={() => color="minimal"
typeof props.backPath === "string" ? router.push(props.backPath as string) : router.back() onClick={() =>
} typeof props.backPath === "string" ? router.push(props.backPath as string) : router.back()
StartIcon={ArrowLeft} }
aria-label="Go Back" StartIcon={ArrowLeft}
className="rounded-md ltr:mr-2 rtl:ml-2" aria-label="Go Back"
/> className="rounded-md ltr:mr-2 rtl:ml-2"
)} />
{props.heading && ( )}
<header {props.heading && (
className={classNames(props.large && "py-8", "flex w-full max-w-full items-center truncate")}> <header
{props.HeadingLeftIcon && <div className="ltr:mr-4">{props.HeadingLeftIcon}</div>} className={classNames(props.large && "py-8", "flex w-full max-w-full items-center truncate")}>
<div className={classNames("w-full truncate ltr:mr-4 rtl:ml-4 md:block", props.headerClassName)}> {props.HeadingLeftIcon && <div className="ltr:mr-4">{props.HeadingLeftIcon}</div>}
{props.heading && (
<h3
className={classNames(
"font-cal max-w-28 sm:max-w-72 md:max-w-80 text-emphasis inline truncate text-lg font-semibold tracking-wide sm:text-xl md:block xl:max-w-full",
props.smallHeading ? "text-base" : "text-xl",
props.hideHeadingOnMobile && "hidden"
)}>
{!isLocaleReady ? <SkeletonText invisible /> : props.heading}
</h3>
)}
{props.subtitle && (
<p className="text-default hidden text-sm md:block">
{!isLocaleReady ? <SkeletonText invisible /> : props.subtitle}
</p>
)}
</div>
{props.beforeCTAactions}
{props.CTA && (
<div <div
className={classNames( className={classNames("w-full truncate ltr:mr-4 rtl:ml-4 md:block", props.headerClassName)}>
props.backPath {props.heading && (
? "relative" <h3
: "pwa:bottom-24 fixed bottom-20 z-40 ltr:right-4 rtl:left-4 md:z-auto md:ltr:right-0 md:rtl:left-0", className={classNames(
"flex-shrink-0 md:relative md:bottom-auto md:right-auto" "font-cal max-w-28 sm:max-w-72 md:max-w-80 text-emphasis inline truncate text-lg font-semibold tracking-wide sm:text-xl md:block xl:max-w-full",
)}> props.smallHeading ? "text-base" : "text-xl",
{props.CTA} props.hideHeadingOnMobile && "hidden"
)}>
{!isLocaleReady ? <SkeletonText invisible /> : props.heading}
</h3>
)}
{props.subtitle && (
<p className="text-default hidden text-sm md:block">
{!isLocaleReady ? <SkeletonText invisible /> : props.subtitle}
</p>
)}
</div> </div>
)} {props.beforeCTAactions}
{props.actions && props.actions} {props.CTA && (
</header> <div
)} className={classNames(
</div> props.backPath
? "relative"
: "pwa:bottom-24 fixed bottom-20 z-40 ltr:right-4 rtl:left-4 md:z-auto md:ltr:right-0 md:rtl:left-0",
"flex-shrink-0 md:relative md:bottom-auto md:right-auto"
)}>
{props.CTA}
</div>
)}
{props.actions && props.actions}
</header>
)}
</div>
)}
{props.afterHeading && <>{props.afterHeading}</>} {props.afterHeading && <>{props.afterHeading}</>}
<div className={classNames(props.flexChildrenContainer && "flex flex-1 flex-col")}> <div className={classNames(props.flexChildrenContainer && "flex flex-1 flex-col")}>
{props.children} {props.children}
@@ -285,7 +285,7 @@ export const getByViewerHandler = async ({ ctx, input }: GetByViewerOptions) =>
...group.metadata, ...group.metadata,
teamId: group.teamId, teamId: group.teamId,
membershipRole: group.membershipRole, membershipRole: group.membershipRole,
image: `${CAL_URL}/${group.profile.slug}/avatar.png`, image: `${CAL_URL}${group.teamId ? "/team" : ""}/${group.profile.slug}/avatar.png`,
})), })),
}; };
}; };