misc: display wish feature only on cloud

This commit is contained in:
Sheen Capadngan
2024-07-05 19:42:38 +08:00
parent da0d8fdbfc
commit 1a6a5280a0
2 changed files with 6 additions and 7 deletions
+2 -5
View File
@@ -758,11 +758,8 @@ export const AppLayout = ({ children }: LayoutProps) => {
: "mb-4" : "mb-4"
} flex w-full cursor-default flex-col items-center px-3 text-sm text-mineshaft-400`} } flex w-full cursor-default flex-col items-center px-3 text-sm text-mineshaft-400`}
> >
{/* <div className={`${isLearningNoteOpen ? "block" : "hidden"} z-0 absolute h-60 w-[9.9rem] ${router.asPath.includes("org") ? "bottom-[8.4rem]" : "bottom-[5.4rem]"} bg-mineshaft-900 border border-mineshaft-600 mb-4 rounded-md opacity-30`}/> {(window.location.origin.includes("https://app.infisical.com") ||
<div className={`${isLearningNoteOpen ? "block" : "hidden"} z-0 absolute h-60 w-[10.7rem] ${router.asPath.includes("org") ? "bottom-[8.15rem]" : "bottom-[5.15rem]"} bg-mineshaft-900 border border-mineshaft-600 mb-4 rounded-md opacity-50`}/> window.location.origin.includes("https://gamma.infisical.com")) && <WishForm />}
<div className={`${isLearningNoteOpen ? "block" : "hidden"} z-0 absolute h-60 w-[11.5rem] ${router.asPath.includes("org") ? "bottom-[7.9rem]" : "bottom-[4.9rem]"} bg-mineshaft-900 border border-mineshaft-600 mb-4 rounded-md opacity-70`}/>
<div className={`${isLearningNoteOpen ? "block" : "hidden"} z-0 absolute h-60 w-[12.3rem] ${router.asPath.includes("org") ? "bottom-[7.65rem]" : "bottom-[4.65rem]"} bg-mineshaft-900 border border-mineshaft-600 mb-4 rounded-md opacity-90`}/> */}
<WishForm />
{router.asPath.includes("org") && ( {router.asPath.includes("org") && (
<div <div
onKeyDown={() => null} onKeyDown={() => null}
@@ -71,7 +71,9 @@ export const WishForm = () => {
</PopoverTrigger> </PopoverTrigger>
<PopoverContent <PopoverContent
hideCloseBtn hideCloseBtn
className="ml-2 mb-2 w-auto border border-mineshaft-600 bg-mineshaft-900 p-4 drop-shadow-2xl" align="start"
alignOffset={25}
className="mb-1 w-auto border border-mineshaft-600 bg-mineshaft-900 p-4 drop-shadow-2xl"
sticky="always" sticky="always"
> >
<form onSubmit={handleSubmit(createWish)}> <form onSubmit={handleSubmit(createWish)}>
@@ -91,7 +93,7 @@ export const WishForm = () => {
/> />
</FormControl> </FormControl>
<div className="mt-2 flex justify-between border-t border-mineshaft-500 pt-4"> <div className="mt-2 flex justify-between border-t border-mineshaft-500 pt-4">
<PopoverPrimitive.Close> <PopoverPrimitive.Close asChild>
<Button className="mr-2 w-min" colorSchema="secondary"> <Button className="mr-2 w-min" colorSchema="secondary">
Cancel Cancel
</Button> </Button>