mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 18:27:19 +00:00
Merge pull request #3908 from Infisical/fix/ui-small-catches
feat: added autoplay to loading lottie and fixed tooltip in project select
This commit is contained in:
@@ -33,7 +33,7 @@ export const ContentLoader = ({ text, frequency = 2000, className }: Props) => {
|
|||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<Lottie icon="infisical_loading" className="h-32 w-32" />
|
<Lottie isAutoPlay icon="infisical_loading" className="h-32 w-32" />
|
||||||
{text && isTextArray && (
|
{text && isTextArray && (
|
||||||
<AnimatePresence mode="wait">
|
<AnimatePresence mode="wait">
|
||||||
<motion.div
|
<motion.div
|
||||||
|
|||||||
@@ -43,23 +43,25 @@ export const Tooltip = ({
|
|||||||
onOpenChange={onOpenChange}
|
onOpenChange={onOpenChange}
|
||||||
>
|
>
|
||||||
<TooltipPrimitive.Trigger asChild={asChild}>{children}</TooltipPrimitive.Trigger>
|
<TooltipPrimitive.Trigger asChild={asChild}>{children}</TooltipPrimitive.Trigger>
|
||||||
<TooltipPrimitive.Content
|
<TooltipPrimitive.Portal>
|
||||||
side={position}
|
<TooltipPrimitive.Content
|
||||||
align="center"
|
side={position}
|
||||||
sideOffset={5}
|
align="center"
|
||||||
{...props}
|
sideOffset={5}
|
||||||
className={twMerge(
|
{...props}
|
||||||
"z-50 max-w-[15rem] select-none border border-mineshaft-600 bg-mineshaft-800 font-light text-bunker-200 shadow-md data-[state=delayed-open]:data-[side=bottom]:animate-slideUpAndFade data-[state=delayed-open]:data-[side=left]:animate-slideRightAndFade data-[state=delayed-open]:data-[side=right]:animate-slideLeftAndFade data-[state=delayed-open]:data-[side=top]:animate-slideDownAndFade",
|
className={twMerge(
|
||||||
isDisabled && "!hidden",
|
"z-50 max-w-[15rem] select-none border border-mineshaft-600 bg-mineshaft-800 font-light text-bunker-200 shadow-md data-[state=delayed-open]:data-[side=bottom]:animate-slideUpAndFade data-[state=delayed-open]:data-[side=left]:animate-slideRightAndFade data-[state=delayed-open]:data-[side=right]:animate-slideLeftAndFade data-[state=delayed-open]:data-[side=top]:animate-slideDownAndFade",
|
||||||
center && "text-center",
|
isDisabled && "!hidden",
|
||||||
size === "sm" && "rounded-sm px-2 py-1 text-xs",
|
center && "text-center",
|
||||||
size === "md" && "rounded-md px-4 py-2 text-sm",
|
size === "sm" && "rounded-sm px-2 py-1 text-xs",
|
||||||
className
|
size === "md" && "rounded-md px-4 py-2 text-sm",
|
||||||
)}
|
className
|
||||||
>
|
)}
|
||||||
{content}
|
>
|
||||||
<TooltipPrimitive.Arrow width={11} height={5} className="fill-mineshaft-600" />
|
{content}
|
||||||
</TooltipPrimitive.Content>
|
<TooltipPrimitive.Arrow width={11} height={5} className="fill-mineshaft-600" />
|
||||||
|
</TooltipPrimitive.Content>
|
||||||
|
</TooltipPrimitive.Portal>
|
||||||
</TooltipPrimitive.Root>
|
</TooltipPrimitive.Root>
|
||||||
) : (
|
) : (
|
||||||
// eslint-disable-next-line react/jsx-no-useless-fragment
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ export const ProjectSelect = () => {
|
|||||||
<div>
|
<div>
|
||||||
<FontAwesomeIcon icon={faCube} className="text-xs" />
|
<FontAwesomeIcon icon={faCube} className="text-xs" />
|
||||||
</div>
|
</div>
|
||||||
<Tooltip content={currentWorkspace.name}>
|
<Tooltip content={currentWorkspace.name} className="max-w-96">
|
||||||
<div className="max-w-32 overflow-hidden text-ellipsis whitespace-nowrap">
|
<div className="max-w-32 overflow-hidden text-ellipsis whitespace-nowrap">
|
||||||
{currentWorkspace?.name}
|
{currentWorkspace?.name}
|
||||||
</div>
|
</div>
|
||||||
@@ -176,7 +176,7 @@ export const ProjectSelect = () => {
|
|||||||
>
|
>
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
<div className="flex flex-1 items-center justify-between overflow-hidden">
|
<div className="flex flex-1 items-center justify-between overflow-hidden">
|
||||||
<Tooltip content={workspace.name}>
|
<Tooltip side="right" className="break-words" content={workspace.name}>
|
||||||
<div className="max-w-40 overflow-hidden truncate whitespace-nowrap">
|
<div className="max-w-40 overflow-hidden truncate whitespace-nowrap">
|
||||||
{workspace.name}
|
{workspace.name}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ const router = createRouter({
|
|||||||
context: { serverConfig: null, queryClient },
|
context: { serverConfig: null, queryClient },
|
||||||
defaultPendingComponent: () => (
|
defaultPendingComponent: () => (
|
||||||
<div className="flex h-screen w-screen items-center justify-center bg-bunker-800">
|
<div className="flex h-screen w-screen items-center justify-center bg-bunker-800">
|
||||||
<Lottie icon="infisical_loading" className="h-32 w-32" />
|
<Lottie isAutoPlay icon="infisical_loading" className="h-32 w-32" />
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
defaultNotFoundComponent: NotFoundPage,
|
defaultNotFoundComponent: NotFoundPage,
|
||||||
|
|||||||
@@ -891,7 +891,7 @@ export const OverviewPage = () => {
|
|||||||
if (isProjectV3 && visibleEnvs.length > 0 && isOverviewLoading) {
|
if (isProjectV3 && visibleEnvs.length > 0 && isOverviewLoading) {
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto flex h-screen w-full items-center justify-center px-8 text-mineshaft-50 dark:[color-scheme:dark]">
|
<div className="container mx-auto flex h-screen w-full items-center justify-center px-8 text-mineshaft-50 dark:[color-scheme:dark]">
|
||||||
<Lottie icon="infisical_loading" className="h-32 w-32" />
|
<Lottie isAutoPlay icon="infisical_loading" className="h-32 w-32" />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -253,7 +253,7 @@ export const SecretDropzone = ({
|
|||||||
>
|
>
|
||||||
{isLoading ? (
|
{isLoading ? (
|
||||||
<div className="mb-16 flex items-center justify-center pt-16">
|
<div className="mb-16 flex items-center justify-center pt-16">
|
||||||
<Lottie icon="infisical_loading" className="h-32 w-32" />
|
<Lottie isAutoPlay icon="infisical_loading" className="h-32 w-32" />
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className="flex flex-col items-center justify-center space-y-2">
|
<div className="flex flex-col items-center justify-center space-y-2">
|
||||||
|
|||||||
Reference in New Issue
Block a user