diff --git a/src/app/(static)/grid/page.tsx b/src/app/(static)/grid/page.tsx index 55cd675d..9d5b4c14 100644 --- a/src/app/(static)/grid/page.tsx +++ b/src/app/(static)/grid/page.tsx @@ -14,6 +14,7 @@ import { IS_PRO_MODE } from '@/site/config'; import PhotoTag from '@/tag/PhotoTag'; import { Metadata } from 'next'; +// Limit edge runtime to Pro due to function size limit export const runtime = IS_PRO_MODE ? 'edge' : 'nodejs'; export async function generateMetadata(): Promise { diff --git a/src/app/(static)/page.tsx b/src/app/(static)/page.tsx index 2c2ea68c..3c1462ef 100644 --- a/src/app/(static)/page.tsx +++ b/src/app/(static)/page.tsx @@ -8,6 +8,7 @@ import PhotosEmptyState from '@/photo/PhotosEmptyState'; import { IS_PRO_MODE } from '@/site/config'; import { Metadata } from 'next'; +// Limit edge runtime to Pro due to function size limit export const runtime = IS_PRO_MODE ? 'edge' : 'nodejs'; export async function generateMetadata(): Promise { diff --git a/src/components/Checklist.tsx b/src/components/Checklist.tsx index fcf813b1..fd0d27cc 100644 --- a/src/components/Checklist.tsx +++ b/src/components/Checklist.tsx @@ -1,21 +1,27 @@ +import { ReactNode } from 'react'; import { cc } from '@/utility/css'; export default function Checklist({ title, + icon, children, }: { - title?: string - children: React.ReactNode + title: string + icon?: ReactNode + children: ReactNode }) { return (
- {title && -
+
+ {icon} +
{title} -
} +
+
-
- {isPending - ?
- -
- :
- {status - ? '✅' - : optional ? '⚠️' : '❌'} -
} -
+
-
- {title}{optional && ' (optional)'} +
+ {title} + {optional && ' (optional)'}
{children} diff --git a/src/components/StatusIcon.tsx b/src/components/StatusIcon.tsx new file mode 100644 index 00000000..ffd5579b --- /dev/null +++ b/src/components/StatusIcon.tsx @@ -0,0 +1,44 @@ +import { + BiSolidCheckboxChecked, + BiSolidCheckboxMinus, + BiSolidXSquare, +} from 'react-icons/bi'; +import Spinner from './Spinner'; + +export default function StatusIcon({ + type, + loading, +}: { + type: 'checked' | 'missing' | 'optional' + loading?: boolean +}) { + const getIcon = () => { + switch (type) { + case 'checked': + return ; + case 'missing': + return ; + case 'optional': + return ; + } + }; + + return ( +
+ {loading + ?
+ +
+ : getIcon()} +
+ ); +} diff --git a/src/site/SiteChecklistClient.tsx b/src/site/SiteChecklistClient.tsx index d4faea51..45807419 100644 --- a/src/site/SiteChecklistClient.tsx +++ b/src/site/SiteChecklistClient.tsx @@ -5,7 +5,14 @@ import { useRouter } from 'next/navigation'; import { cc } from '@/utility/css'; import ChecklistRow from '../components/ChecklistRow'; import { FiCheckSquare, FiExternalLink } from 'react-icons/fi'; -import { BiCopy, BiRefresh } from 'react-icons/bi'; +import { + BiCog, + BiCopy, + BiData, + BiLockAlt, + BiPencil, + BiRefresh, +} from 'react-icons/bi'; import IconButton from '@/components/IconButton'; import { toast } from 'sonner'; import InfoBlock from '@/components/InfoBlock'; @@ -18,6 +25,8 @@ export default function SiteChecklistClient({ hasBlob, hasAuth, hasAdminUser, + showRepoLink, + isProMode, showRefreshButton, secret, }: { @@ -27,6 +36,8 @@ export default function SiteChecklistClient({ hasBlob: boolean hasAuth: boolean hasAdminUser: boolean + showRepoLink: boolean + isProMode: boolean showRefreshButton?: boolean secret: string }) { @@ -100,8 +111,11 @@ export default function SiteChecklistClient({
; return ( -
- +
+ } + > - + } + > - + } + > - {showRefreshButton && -
- -
}
+ } + > + + Set environment variable to {'"1"'} to hide footer link: + {renderEnvVars(['NEXT_PUBLIC_HIDE_REPO_LINK'])} + + + Set environment variable to {'"1"'} to enable Pro Mode + (includes additional edge functions and higher quality images): + {renderEnvVars(['NEXT_PUBLIC_PRO_MODE'])} + + + {showRefreshButton && +
+ +
}
Changes to environment variables require a redeploy or reboot of local dev server