2023-08-18 13:58:29 -04:00
|
|
|
import { Dialog } from '@headlessui/react'
|
|
|
|
import { useStore } from '../useStore'
|
|
|
|
import { ActionButton } from './ActionButton'
|
|
|
|
|
2023-08-18 10:27:01 -04:00
|
|
|
const DownloadAppBanner = () => {
|
2023-08-18 13:58:29 -04:00
|
|
|
const { isBannerDismissed, setBannerDismissed } = useStore((s) => ({
|
|
|
|
isBannerDismissed: s.isBannerDismissed,
|
|
|
|
setBannerDismissed: s.setBannerDismissed,
|
|
|
|
}))
|
|
|
|
|
2023-08-18 10:27:01 -04:00
|
|
|
return (
|
2023-08-18 13:58:29 -04:00
|
|
|
<Dialog
|
|
|
|
className="fixed inset-0 top-auto z-50 bg-warn-20 text-warn-80 px-8 py-4"
|
|
|
|
open={!isBannerDismissed}
|
|
|
|
onClose={() => ({})}
|
|
|
|
>
|
|
|
|
<Dialog.Panel className="max-w-3xl mx-auto">
|
|
|
|
<div className="flex gap-2 justify-between items-start">
|
|
|
|
<h2 className="text-xl font-bold mb-4">
|
|
|
|
KittyCAD Modeling App is better as a desktop app!
|
|
|
|
</h2>
|
|
|
|
<ActionButton
|
|
|
|
Element="button"
|
|
|
|
onClick={() => setBannerDismissed(true)}
|
|
|
|
icon={{
|
2023-12-06 14:44:13 -05:00
|
|
|
icon: 'close',
|
|
|
|
className: 'p-1',
|
2023-08-18 13:58:29 -04:00
|
|
|
bgClassName:
|
|
|
|
'bg-warn-70 hover:bg-warn-80 dark:bg-warn-70 dark:hover:bg-warn-80',
|
|
|
|
iconClassName:
|
|
|
|
'text-warn-10 group-hover:text-warn-10 dark:text-warn-10 dark:group-hover:text-warn-10',
|
|
|
|
}}
|
|
|
|
className="!p-0 !bg-transparent !border-transparent"
|
|
|
|
/>
|
|
|
|
</div>
|
2023-08-18 10:27:01 -04:00
|
|
|
<p>
|
|
|
|
The browser version of the app only saves your data temporarily in{' '}
|
|
|
|
<code className="text-base inline-block px-0.5 bg-warn-30/50 rounded">
|
|
|
|
localStorage
|
|
|
|
</code>
|
|
|
|
, and isn't backed up anywhere! Visit{' '}
|
|
|
|
<a
|
2023-09-17 21:57:43 -07:00
|
|
|
href="https://kittycad.io/modeling-app/download"
|
2023-08-18 10:27:01 -04:00
|
|
|
rel="noopener noreferrer"
|
|
|
|
target="_blank"
|
|
|
|
className="text-warn-80 dark:text-warn-80 dark:hover:text-warn-70 underline"
|
|
|
|
>
|
2023-09-17 21:57:43 -07:00
|
|
|
our website
|
2023-08-18 10:27:01 -04:00
|
|
|
</a>{' '}
|
|
|
|
to download the app for the best experience.
|
|
|
|
</p>
|
2023-08-18 13:58:29 -04:00
|
|
|
</Dialog.Panel>
|
|
|
|
</Dialog>
|
2023-08-18 10:27:01 -04:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export default DownloadAppBanner
|