From a6b099a83a67d43b8bc12bc1ac7f215d6540849e Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Sat, 27 Apr 2024 13:40:41 -0500 Subject: [PATCH] Show simplified configuration view on installation --- src/photo/PhotosEmptyState.tsx | 2 +- src/site/SiteChecklist.tsx | 7 +- src/site/SiteChecklistClient.tsx | 314 ++++++++++++++++--------------- 3 files changed, 166 insertions(+), 157 deletions(-) diff --git a/src/photo/PhotosEmptyState.tsx b/src/photo/PhotosEmptyState.tsx index 7c495295..4c723560 100644 --- a/src/photo/PhotosEmptyState.tsx +++ b/src/photo/PhotosEmptyState.tsx @@ -27,7 +27,7 @@ export default function PhotosEmptyState() { {!IS_SITE_READY ? 'Finish Setup' : 'Setup Complete!'} {!IS_SITE_READY - ? + ? :
diff --git a/src/site/SiteChecklist.tsx b/src/site/SiteChecklist.tsx index 6dd042b6..5ff9344b 100644 --- a/src/site/SiteChecklist.tsx +++ b/src/site/SiteChecklist.tsx @@ -2,11 +2,16 @@ import { generateAuthSecret } from '@/auth'; import SiteChecklistClient from './SiteChecklistClient'; import { CONFIG_CHECKLIST_STATUS } from '@/site/config'; -export default async function SiteChecklist() { +export default async function SiteChecklist({ + simplifiedView, +}: { + simplifiedView?: boolean +}) { const secret = await generateAuthSecret(); return ( ); diff --git a/src/site/SiteChecklistClient.tsx b/src/site/SiteChecklistClient.tsx index a60f7b87..00f647b1 100644 --- a/src/site/SiteChecklistClient.tsx +++ b/src/site/SiteChecklistClient.tsx @@ -50,9 +50,11 @@ export default function SiteChecklistClient({ isOgTextBottomAligned, gridAspectRatio, hasGridAspectRatio, + simplifiedView, showRefreshButton, secret, }: ConfigChecklistStatus & { + simplifiedView?: boolean showRefreshButton?: boolean secret: string }) { @@ -272,166 +274,168 @@ export default function SiteChecklistClient({ {renderEnvVars(['NEXT_PUBLIC_SITE_DOMAIN'])} - } - experimental - optional - > - - Store your OpenAI secret key in order to add experimental support - for AI-generated text descriptions and enable an invisible field - called {'"Semantic Description"'} used to support CMD-K search - {renderEnvVars(['OPENAI_SECRET_KEY'])} - - - {renderLink( - // eslint-disable-next-line max-len - 'https://vercel.com/docs/storage/vercel-kv/quickstart#create-a-kv-database', - 'Create Vercel KV store', - )} - {' '} - and connect to project in order to enable rate limiting - - - Comma-separated fields to auto-generate when - uploading photos. Accepted values: title, caption, - tags, description, all, or none (default is {'"all"'}). - {renderEnvVars(['AI_TEXT_AUTO_GENERATED_FIELDS'])} - - - } - optional - > - - Set environment variable to {'"1"'} to enable - higher quality image storage: - {renderEnvVars(['NEXT_PUBLIC_PRO_MODE'])} - - + } experimental - > - Set environment variable to {'"1"'} to enable - static optimization, i.e., build pages ahead of time: - {renderEnvVars(['NEXT_PUBLIC_STATICALLY_OPTIMIZE'])} - - - Set environment variable to {'"1"'} to prevent - image blur data being stored and displayed - {renderEnvVars(['NEXT_PUBLIC_BLUR_DISABLED'])} - - + Store your OpenAI secret key in order to add experimental support + for AI-generated text descriptions and enable an invisible field + called {'"Semantic Description"'} used to support CMD-K search + {renderEnvVars(['OPENAI_SECRET_KEY'])} + + + {renderLink( + // eslint-disable-next-line max-len + 'https://vercel.com/docs/storage/vercel-kv/quickstart#create-a-kv-database', + 'Create Vercel KV store', + )} + {' '} + and connect to project in order to enable rate limiting + + + Comma-separated fields to auto-generate when + uploading photos. Accepted values: title, caption, + tags, description, all, or none (default is {'"all"'}). + {renderEnvVars(['AI_TEXT_AUTO_GENERATED_FIELDS'])} + + + } optional > - Set environment variable to {'"1"'} to disable - collection/display of location-based data - {renderEnvVars(['NEXT_PUBLIC_GEO_PRIVACY'])} - - - Set environment variable to {'"1"'} to prevent - priority order photo field affecting photo order - {renderEnvVars(['NEXT_PUBLIC_IGNORE_PRIORITY_ORDER'])} - - - Set environment variable to {'"1"'} to enable - a public API available at /api: - {renderEnvVars(['NEXT_PUBLIC_PUBLIC_API'])} - - - Set environment variable to {'"1"'} to hide footer link: - {renderEnvVars(['NEXT_PUBLIC_HIDE_REPO_LINK'])} - - - Set environment variable to {'"1"'} to prevent - simulations showing up in /grid sidebar: - {renderEnvVars(['NEXT_PUBLIC_HIDE_FILM_SIMULATIONS'])} - - - Set environment variable to {'"1"'} to hide EXIF data: - {renderEnvVars(['NEXT_PUBLIC_HIDE_EXIF_DATA'])} - - - Set environment variable to any number to enforce aspect ratio - {' '} - (default is {'"1"'}, i.e., square)—set to {'"0"'} to disable: - {renderEnvVars(['NEXT_PUBLIC_GRID_ASPECT_RATIO'])} - - - Set environment variable to {'"BOTTOM"'} to - keep OG image text bottom aligned (default is {'"top"'}): - {renderEnvVars(['NEXT_PUBLIC_OG_TEXT_ALIGNMENT'])} - - + + Set environment variable to {'"1"'} to enable + higher quality image storage: + {renderEnvVars(['NEXT_PUBLIC_PRO_MODE'])} + + + Set environment variable to {'"1"'} to enable + static optimization, i.e., build pages ahead of time: + {renderEnvVars(['NEXT_PUBLIC_STATICALLY_OPTIMIZE'])} + + + Set environment variable to {'"1"'} to prevent + image blur data being stored and displayed + {renderEnvVars(['NEXT_PUBLIC_BLUR_DISABLED'])} + + + Set environment variable to {'"1"'} to disable + collection/display of location-based data + {renderEnvVars(['NEXT_PUBLIC_GEO_PRIVACY'])} + + + Set environment variable to {'"1"'} to prevent + priority order photo field affecting photo order + {renderEnvVars(['NEXT_PUBLIC_IGNORE_PRIORITY_ORDER'])} + + + Set environment variable to {'"1"'} to enable + a public API available at /api: + {renderEnvVars(['NEXT_PUBLIC_PUBLIC_API'])} + + + Set environment variable to {'"1"'} to hide footer link: + {renderEnvVars(['NEXT_PUBLIC_HIDE_REPO_LINK'])} + + + Set environment variable to {'"1"'} to prevent + simulations showing up in /grid sidebar: + {renderEnvVars(['NEXT_PUBLIC_HIDE_FILM_SIMULATIONS'])} + + + Set environment variable to {'"1"'} to hide EXIF data: + {renderEnvVars(['NEXT_PUBLIC_HIDE_EXIF_DATA'])} + + + Set environment variable to any number to enforce aspect ratio + {' '} + (default is {'"1"'}, i.e., square)—set to {'"0"'} to disable: + {renderEnvVars(['NEXT_PUBLIC_GRID_ASPECT_RATIO'])} + + + Set environment variable to {'"BOTTOM"'} to + keep OG image text bottom aligned (default is {'"top"'}): + {renderEnvVars(['NEXT_PUBLIC_OG_TEXT_ALIGNMENT'])} + + + } {showRefreshButton &&