|
| 1 | +import { Head, router } from '@inertiajs/react' |
| 2 | +import AppLayout from '~/layouts/AppLayout' |
| 3 | +import StyledButton from '~/components/StyledButton' |
| 4 | +import Alert from '~/components/Alert' |
| 5 | +import useInternetStatus from '~/hooks/useInternetStatus' |
| 6 | +import useServiceInstallationActivity from '~/hooks/useServiceInstallationActivity' |
| 7 | +import InstallActivityFeed from '~/components/InstallActivityFeed' |
| 8 | +import ActiveDownloads from '~/components/ActiveDownloads' |
| 9 | +import StyledSectionHeader from '~/components/StyledSectionHeader' |
| 10 | + |
| 11 | +export default function EasySetupWizardComplete() { |
| 12 | + const { isOnline } = useInternetStatus() |
| 13 | + const installActivity = useServiceInstallationActivity() |
| 14 | + |
| 15 | + return ( |
| 16 | + <AppLayout> |
| 17 | + <Head title="Easy Setup Wizard Complete" /> |
| 18 | + {!isOnline && ( |
| 19 | + <Alert |
| 20 | + title="No Internet Connection" |
| 21 | + message="It looks like you're not connected to the internet. Installing apps and downloading content will require an internet connection." |
| 22 | + type="warning" |
| 23 | + variant="solid" |
| 24 | + className="mb-8" |
| 25 | + /> |
| 26 | + )} |
| 27 | + <div className="max-w-7xl mx-auto px-4 py-8"> |
| 28 | + <div className="bg-white rounded-md shadow-md p-6"> |
| 29 | + <StyledSectionHeader title="App Installation Activity" className=" mb-4" /> |
| 30 | + <InstallActivityFeed |
| 31 | + activity={installActivity} |
| 32 | + className="!shadow-none border-desert-stone-light border" |
| 33 | + /> |
| 34 | + <ActiveDownloads withHeader /> |
| 35 | + <Alert |
| 36 | + title="Running in the Background" |
| 37 | + message='Feel free to leave this page at any time - your app installs and downloads will continue in the background!' |
| 38 | + type="info" |
| 39 | + variant="solid" |
| 40 | + className='mt-12' |
| 41 | + /> |
| 42 | + <div className="flex justify-center mt-8 pt-4 border-t border-desert-stone-light"> |
| 43 | + <div className="flex space-x-4"> |
| 44 | + <StyledButton onClick={() => router.visit('/home')} icon="HomeIcon"> |
| 45 | + Go to Home |
| 46 | + </StyledButton> |
| 47 | + </div> |
| 48 | + </div> |
| 49 | + </div> |
| 50 | + </div> |
| 51 | + </AppLayout> |
| 52 | + ) |
| 53 | +} |
0 commit comments