Add the 'Download the app' button back on web (#7528)
* Add the 'Download the app' button back on web Fixes #7527 * Update snapshots * Update snapshots --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
|
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 135 KiB |
|
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 135 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 69 KiB |
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 69 KiB |
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 65 KiB |
@ -6,6 +6,8 @@ export type DownloadAppToastProps = {
|
|||||||
onDismiss: () => void
|
onDismiss: () => void
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const desktopAppPitchMessage = `The present web app is limited in features. We don't want you to miss out!`
|
||||||
|
|
||||||
export function DownloadAppToast({
|
export function DownloadAppToast({
|
||||||
onAccept,
|
onAccept,
|
||||||
onDismiss,
|
onDismiss,
|
||||||
@ -20,8 +22,7 @@ export function DownloadAppToast({
|
|||||||
<section>
|
<section>
|
||||||
<h2>Zoo Design Studio is primarily a desktop app</h2>
|
<h2>Zoo Design Studio is primarily a desktop app</h2>
|
||||||
<p className="text-sm text-chalkboard-70 dark:text-chalkboard-30">
|
<p className="text-sm text-chalkboard-70 dark:text-chalkboard-30">
|
||||||
The present web app is limited in features. We don't want you to
|
{desktopAppPitchMessage}
|
||||||
miss out!
|
|
||||||
</p>
|
</p>
|
||||||
{!navigator?.userAgent.includes('Chrome') && (
|
{!navigator?.userAgent.includes('Chrome') && (
|
||||||
<p className="mt-2 text-sm font-semibold text-chalkboard-70 dark:text-chalkboard-30">
|
<p className="mt-2 text-sm font-semibold text-chalkboard-70 dark:text-chalkboard-30">
|
||||||
|
|||||||
@ -11,6 +11,10 @@ import { BillingDialog } from '@src/components/BillingDialog'
|
|||||||
import { Popover } from '@headlessui/react'
|
import { Popover } from '@headlessui/react'
|
||||||
import Tooltip from '@src/components/Tooltip'
|
import Tooltip from '@src/components/Tooltip'
|
||||||
import { HelpMenu } from '@src/components/HelpMenu'
|
import { HelpMenu } from '@src/components/HelpMenu'
|
||||||
|
import { isDesktop } from '@src/lib/isDesktop'
|
||||||
|
import { VITE_KC_SITE_BASE_URL } from '@src/env'
|
||||||
|
import { APP_DOWNLOAD_PATH } from '@src/lib/constants'
|
||||||
|
import { desktopAppPitchMessage } from '@src/components/DownloadAppToast'
|
||||||
|
|
||||||
export const defaultGlobalStatusBarItems = ({
|
export const defaultGlobalStatusBarItems = ({
|
||||||
location,
|
location,
|
||||||
@ -19,15 +23,26 @@ export const defaultGlobalStatusBarItems = ({
|
|||||||
location: Location
|
location: Location
|
||||||
filePath?: string
|
filePath?: string
|
||||||
}): StatusBarItemType[] => [
|
}): StatusBarItemType[] => [
|
||||||
{
|
isDesktop()
|
||||||
id: 'version',
|
? {
|
||||||
element: 'externalLink',
|
id: 'version',
|
||||||
label: `v${APP_VERSION}`,
|
element: 'externalLink',
|
||||||
href: `https://github.com/KittyCAD/modeling-app/releases/tag/v${APP_VERSION}`,
|
label: `v${APP_VERSION}`,
|
||||||
toolTip: {
|
href: `https://github.com/KittyCAD/modeling-app/releases/tag/v${APP_VERSION}`,
|
||||||
children: 'View the release notes on GitHub',
|
toolTip: {
|
||||||
},
|
children: 'View the release notes on GitHub',
|
||||||
},
|
},
|
||||||
|
}
|
||||||
|
: {
|
||||||
|
id: 'download-desktop-app',
|
||||||
|
element: 'externalLink',
|
||||||
|
label: 'Download the app',
|
||||||
|
href: `${VITE_KC_SITE_BASE_URL}/${APP_DOWNLOAD_PATH}`,
|
||||||
|
icon: 'download',
|
||||||
|
toolTip: {
|
||||||
|
children: desktopAppPitchMessage,
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: 'telemetry',
|
id: 'telemetry',
|
||||||
element: 'link',
|
element: 'link',
|
||||||
|
|||||||