-
-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: html conversion absolute position support, better inline style s…
…upport feat: deploy button for html23
- Loading branch information
1 parent
c113440
commit a74e9bf
Showing
8 changed files
with
237 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import { ArrowRight, Rocket } from 'lucide-react' | ||
import { | ||
Dialog, | ||
DialogContent, | ||
DialogDescription, | ||
DialogFooter, | ||
DialogHeader, | ||
DialogTitle, | ||
DialogTrigger, | ||
} from './ui/dialog.js' | ||
import { Tooltip, TooltipContent, TooltipTrigger } from './ui/tooltip.js' | ||
import { Button } from './ui/button.js' | ||
import { Label } from './ui/label.js' | ||
import { DialogClose } from '@radix-ui/react-dialog' | ||
|
||
export function DeployDialog() { | ||
return ( | ||
<Dialog> | ||
<Tooltip> | ||
<TooltipTrigger asChild> | ||
<DialogTrigger asChild> | ||
<Button variant="outline" className="flex flex-row items-center gap-2 pl-3"> | ||
<Rocket /> | ||
Deploy | ||
</Button> | ||
</DialogTrigger> | ||
</TooltipTrigger> | ||
<TooltipContent>Deploy the Project</TooltipContent> | ||
</Tooltip> | ||
<DialogContent className="flex flex-col flex-shrink"> | ||
<DialogHeader> | ||
<DialogTitle className="text-2xl">Project deployment is not yet supported.</DialogTitle> | ||
<DialogDescription className="text-xl">Sorry 😔</DialogDescription> | ||
</DialogHeader> | ||
<div className="flex flex-col pb-4 flex-grow text-md gap-4"> | ||
<span className="text-lg">This project is Free and Open Source build by individuals</span> | ||
<hr /> | ||
<span className="text-lg"> | ||
We are evaluating if there's enough interest for pro features, such as <b>One Click Deployment</b>. | ||
</span> | ||
<span className="text-lg"> | ||
Interested in html23 pro features? | ||
<br />↳ Select ✅ and fill out the questionaire. | ||
</span> | ||
<span className="text-gray-400">Your responses will help us decide if html23 pro is demanded.</span> | ||
</div> | ||
<DialogFooter className="gap-2"> | ||
<DialogClose asChild> | ||
<Button className="bg-gray-400 w-full flex-basis-0" type="button"> | ||
❌ Not Interested | ||
</Button> | ||
</DialogClose> | ||
<a | ||
href="https://docs.google.com/forms/d/e/1FAIpQLSfVb1eBPEU2kMo2CqYpW6HrlwIe027bBHeSvLJmJpqMH6QWcQ/viewform" | ||
target="_blank" | ||
> | ||
<Button type="button" className="w-full flex-basis-0"> | ||
<span className="text-lg mr-3">✅</span> I am interested in Pro Features | ||
</Button> | ||
</a> | ||
</DialogFooter> | ||
</DialogContent> | ||
</Dialog> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
import * as React from "react" | ||
import * as DialogPrimitive from "@radix-ui/react-dialog" | ||
import { X } from "lucide-react" | ||
|
||
import { cn } from "@/lib/utils" | ||
|
||
const Dialog = DialogPrimitive.Root | ||
|
||
const DialogTrigger = DialogPrimitive.Trigger | ||
|
||
const DialogPortal = DialogPrimitive.Portal | ||
|
||
const DialogClose = DialogPrimitive.Close | ||
|
||
const DialogOverlay = React.forwardRef< | ||
React.ElementRef<typeof DialogPrimitive.Overlay>, | ||
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay> | ||
>(({ className, ...props }, ref) => ( | ||
<DialogPrimitive.Overlay | ||
ref={ref} | ||
className={cn( | ||
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", | ||
className | ||
)} | ||
{...props} | ||
/> | ||
)) | ||
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName | ||
|
||
const DialogContent = React.forwardRef< | ||
React.ElementRef<typeof DialogPrimitive.Content>, | ||
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> | ||
>(({ className, children, ...props }, ref) => ( | ||
<DialogPortal> | ||
<DialogOverlay /> | ||
<DialogPrimitive.Content | ||
ref={ref} | ||
className={cn( | ||
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", | ||
className | ||
)} | ||
{...props} | ||
> | ||
{children} | ||
<DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"> | ||
<X className="h-4 w-4" /> | ||
<span className="sr-only">Close</span> | ||
</DialogPrimitive.Close> | ||
</DialogPrimitive.Content> | ||
</DialogPortal> | ||
)) | ||
DialogContent.displayName = DialogPrimitive.Content.displayName | ||
|
||
const DialogHeader = ({ | ||
className, | ||
...props | ||
}: React.HTMLAttributes<HTMLDivElement>) => ( | ||
<div | ||
className={cn( | ||
"flex flex-col space-y-1.5 text-center sm:text-left", | ||
className | ||
)} | ||
{...props} | ||
/> | ||
) | ||
DialogHeader.displayName = "DialogHeader" | ||
|
||
const DialogFooter = ({ | ||
className, | ||
...props | ||
}: React.HTMLAttributes<HTMLDivElement>) => ( | ||
<div | ||
className={cn( | ||
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", | ||
className | ||
)} | ||
{...props} | ||
/> | ||
) | ||
DialogFooter.displayName = "DialogFooter" | ||
|
||
const DialogTitle = React.forwardRef< | ||
React.ElementRef<typeof DialogPrimitive.Title>, | ||
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title> | ||
>(({ className, ...props }, ref) => ( | ||
<DialogPrimitive.Title | ||
ref={ref} | ||
className={cn( | ||
"text-lg font-semibold leading-none tracking-tight", | ||
className | ||
)} | ||
{...props} | ||
/> | ||
)) | ||
DialogTitle.displayName = DialogPrimitive.Title.displayName | ||
|
||
const DialogDescription = React.forwardRef< | ||
React.ElementRef<typeof DialogPrimitive.Description>, | ||
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description> | ||
>(({ className, ...props }, ref) => ( | ||
<DialogPrimitive.Description | ||
ref={ref} | ||
className={cn("text-sm text-muted-foreground", className)} | ||
{...props} | ||
/> | ||
)) | ||
DialogDescription.displayName = DialogPrimitive.Description.displayName | ||
|
||
export { | ||
Dialog, | ||
DialogPortal, | ||
DialogOverlay, | ||
DialogClose, | ||
DialogTrigger, | ||
DialogContent, | ||
DialogHeader, | ||
DialogFooter, | ||
DialogTitle, | ||
DialogDescription, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.