Home page touch-ups (#2135)

* Save part images when navigating home

* Load part images in project cards if available

* Polish home page

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)

* Merge branch 'main' into franknoirot/project-images

* Mostly restored link + form functionality

* Working cards with images

* Comment out project image stuff

* Little style tweaks

* Remove unused imports

* More minor styling tweaks

* Merge branch 'main' into franknoirot/project-images

* Was using the wrong imported `Project` type

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)

* Revert any docs changes

* Revert wasm-lib divergences

* Move ProjectCard into its component folder

* Remove unused hook useSaveVideoFrame

* Remove "hideOnLevel" config from theme setting

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Frank Noirot
2024-05-23 11:47:02 -04:00
committed by GitHub
parent 5b7d707b26
commit 023ed1a687
11 changed files with 399 additions and 314 deletions

View File

@ -0,0 +1,53 @@
import { Dialog } from '@headlessui/react'
import { ActionButton } from 'components/ActionButton'
interface DeleteProjectDialogProps {
projectName: string
onConfirm: () => void
onDismiss: () => void
}
export function DeleteProjectDialog({
projectName,
onConfirm,
onDismiss,
}: DeleteProjectDialogProps) {
return (
<Dialog open={true} onClose={onDismiss} className="relative z-50">
<div className="fixed inset-0 grid bg-chalkboard-110/80 place-content-center">
<Dialog.Panel className="max-w-2xl p-4 border rounded bg-chalkboard-10 dark:bg-chalkboard-100 border-destroy-80">
<Dialog.Title as="h2" className="mb-4 text-2xl font-bold">
Delete File
</Dialog.Title>
<Dialog.Description>
This will permanently delete "{projectName || 'this file'}
".
</Dialog.Description>
<p className="my-4">
Are you sure you want to delete "{projectName || 'this file'}
"? This action cannot be undone.
</p>
<div className="flex justify-between">
<ActionButton
Element="button"
onClick={onConfirm}
iconStart={{
icon: 'trash',
bgClassName: 'bg-destroy-10 dark:bg-destroy-80',
iconClassName: '!text-destroy-80 dark:!text-destroy-20',
}}
className="hover:border-destroy-40 dark:hover:border-destroy-40 hover:bg-destroy-10/20 dark:hover:bg-destroy-80/20"
>
Delete
</ActionButton>
<ActionButton Element="button" onClick={onDismiss}>
Cancel
</ActionButton>
</div>
</Dialog.Panel>
</div>
</Dialog>
)
}