From a1746542972865f2d2ca0d457ccb846bfa90ce60 Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Tue, 11 Feb 2025 18:06:15 -0600 Subject: [PATCH] Refactor app/site/admin code paths --- __tests__/github.test.ts | 2 +- __tests__/path.test.ts | 2 +- src/admin/AdminAddAllUploads.tsx | 2 +- src/admin/AdminAppConfiguration.tsx | 20 +++ .../AdminAppConfigurationClient.tsx} | 48 +++---- .../AdminAppConfigurationServer.tsx} | 10 +- src/admin/AdminAppInsights.tsx | 28 +++- src/admin/AdminAppInsightsClient.tsx | 126 ++++++++++++------ src/admin/AdminAppMenu.tsx | 2 +- src/admin/AdminBatchEditPanelClient.tsx | 2 +- src/admin/AdminCTA.tsx | 2 +- src/admin/AdminNav.tsx | 2 +- src/admin/AdminNavClient.tsx | 2 +- src/admin/AdminOutdatedClient.tsx | 4 +- src/admin/AdminPhotoMenuClient.tsx | 2 +- src/admin/AdminPhotosClient.tsx | 4 +- src/admin/AdminPhotosTable.tsx | 2 +- src/admin/AdminPhotosTableInfinite.tsx | 2 +- src/admin/AdminTagTable.tsx | 2 +- src/admin/AdminUploadsTable.tsx | 2 +- src/admin/DeleteBlobButton.tsx | 2 +- src/admin/ExifSyncButton.tsx | 2 +- src/admin/PhotoSyncButton.tsx | 2 +- src/admin/actions.ts | 4 +- src/admin/github/GitHubForkStatusBadge.tsx | 2 +- .../github/GitHubForkStatusBadgeServer.tsx | 2 +- src/admin/github/index.ts | 2 +- src/{site => app-core}/CommandK.tsx | 0 src/{site => app-core}/Footer.tsx | 4 +- src/{site => app-core}/IconFeed.tsx | 0 src/{site => app-core}/IconGrSync.tsx | 0 src/{site => app-core}/IconGrid.tsx | 0 src/{site => app-core}/IconSearch.tsx | 0 src/{site => app-core}/Nav.tsx | 4 +- src/{site => app-core}/SecretGenerator.tsx | 0 src/{site => app-core}/ThemeSwitcher.tsx | 0 src/{site => app-core}/ViewSwitcher.tsx | 6 +- src/{site => app-core}/api.ts | 0 src/{site => app-core}/config.ts | 12 +- src/{site => app-core}/font.ts | 0 src/{site => app-core}/paths.ts | 0 src/app/admin/configuration/page.tsx | 6 +- src/app/admin/insights/page.tsx | 5 +- src/app/admin/outdated/page.tsx | 2 +- src/app/admin/photos/[photoId]/edit/page.tsx | 4 +- src/app/admin/tags/[tag]/edit/page.tsx | 2 +- src/app/admin/uploads/[uploadPath]/page.tsx | 4 +- src/app/api/route.ts | 4 +- .../api/storage/presigned-url/[key]/route.ts | 2 +- src/app/film/[simulation]/[photoId]/page.tsx | 2 +- src/app/film/[simulation]/image/route.tsx | 4 +- src/app/film/[simulation]/page.tsx | 4 +- src/app/focal/[focal]/[photoId]/page.tsx | 2 +- src/app/focal/[focal]/image/route.tsx | 4 +- src/app/focal/[focal]/page.tsx | 6 +- src/app/home-image/route.tsx | 2 +- src/app/layout.tsx | 8 +- src/app/p/[photoId]/image/route.tsx | 4 +- src/app/p/[photoId]/page.tsx | 4 +- src/app/page.tsx | 2 +- .../shot-on/[make]/[model]/[photoId]/page.tsx | 2 +- .../shot-on/[make]/[model]/image/route.tsx | 4 +- src/app/shot-on/[make]/[model]/page.tsx | 4 +- src/app/sign-in/page.tsx | 2 +- src/app/tag/[tag]/[photoId]/page.tsx | 2 +- src/app/tag/[tag]/image/route.tsx | 4 +- src/app/tag/[tag]/page.tsx | 6 +- src/app/tag/hidden/[photoId]/page.tsx | 2 +- src/app/tag/hidden/page.tsx | 2 +- src/app/template-image-tight/route.tsx | 2 +- src/app/template-image/route.tsx | 2 +- src/auth/actions.ts | 2 +- src/auth/index.ts | 2 +- src/camera/CameraOGTile.tsx | 2 +- src/camera/CameraShareModal.tsx | 2 +- src/camera/PhotoCamera.tsx | 2 +- src/camera/meta.ts | 2 +- .../{Checklist.tsx => ChecklistGroup.tsx} | 2 +- src/components/Container.tsx | 12 +- src/components/HttpStatusPage.tsx | 2 +- src/components/Modal.tsx | 4 +- src/components/SwitcherItem.tsx | 2 +- src/components/cmdk/CommandKClient.tsx | 4 +- src/components/image/ImageLarge.tsx | 2 +- src/components/image/ImageWithFallback.tsx | 2 +- src/components/image/useImageZoomControls.ts | 2 +- src/focal/FocalLengthOGTile.tsx | 2 +- src/focal/FocalLengthShareModal.tsx | 2 +- src/focal/PhotoFocalLength.tsx | 2 +- src/focal/index.ts | 2 +- src/image-response/HomeImageResponse.tsx | 2 +- src/image-response/PhotoImageResponse.tsx | 2 +- src/image-response/TemplateImageResponse.tsx | 4 +- .../components/ImageCaption.tsx | 2 +- .../components/ImagePhotoGrid.tsx | 2 +- src/middleware.ts | 2 +- src/photo/InfinitePhotoScroll.tsx | 2 +- src/photo/PhotoEditPageClient.tsx | 2 +- src/photo/PhotoEscapeHandler.tsx | 2 +- src/photo/PhotoGrid.tsx | 2 +- src/photo/PhotoGridPage.tsx | 2 +- src/photo/PhotoGridSidebar.tsx | 2 +- src/photo/PhotoLarge.tsx | 4 +- src/photo/PhotoLink.tsx | 2 +- src/photo/PhotoMedium.tsx | 4 +- src/photo/PhotoOGTile.tsx | 2 +- src/photo/PhotoPrevNext.tsx | 2 +- src/photo/PhotoShareModal.tsx | 2 +- src/photo/PhotoSmall.tsx | 4 +- src/photo/PhotoUpload.tsx | 2 +- src/photo/PhotosEmptyState.tsx | 8 +- src/photo/PhotosLargeInfinite.tsx | 2 +- src/photo/StaggeredOgPhotosInfinite.tsx | 2 +- src/photo/UploadPageClient.tsx | 2 +- src/photo/actions.ts | 4 +- src/photo/cache.ts | 2 +- src/photo/data.ts | 2 +- src/photo/db/index.ts | 2 +- src/photo/db/query.ts | 2 +- src/photo/form/PhotoForm.tsx | 4 +- src/photo/form/index.ts | 2 +- src/photo/index.ts | 8 +- src/photo/server.ts | 5 +- src/services/next-image.ts | 2 +- src/services/openai.ts | 2 +- src/services/postgres.ts | 2 +- src/services/storage/index.ts | 4 +- src/services/storage/vercel-blob.ts | 2 +- src/share/ShareModal.tsx | 2 +- src/share/index.ts | 2 +- src/simulation/FilmSimulationOGTile.tsx | 2 +- src/simulation/FilmSimulationShareModal.tsx | 2 +- src/simulation/PhotoFilmSimulation.tsx | 2 +- src/simulation/index.ts | 2 +- src/site/SiteChecklist.tsx | 20 --- src/state/AppStateProvider.tsx | 2 +- src/tag/FavsTag.tsx | 2 +- src/tag/HiddenTag.tsx | 2 +- src/tag/PhotoTag.tsx | 2 +- src/tag/TagForm.tsx | 2 +- src/tag/TagOGTile.tsx | 2 +- src/tag/TagShareModal.tsx | 2 +- src/tag/index.ts | 2 +- src/{site => utility}/useMetaThemeColor.ts | 0 src/utility/vercel.ts | 2 +- 145 files changed, 341 insertions(+), 277 deletions(-) create mode 100644 src/admin/AdminAppConfiguration.tsx rename src/{site/SiteChecklistClient.tsx => admin/AdminAppConfigurationClient.tsx} (96%) rename src/{site/SiteChecklistServer.tsx => admin/AdminAppConfigurationServer.tsx} (51%) rename src/{site => app-core}/CommandK.tsx (100%) rename src/{site => app-core}/Footer.tsx (95%) rename src/{site => app-core}/IconFeed.tsx (100%) rename src/{site => app-core}/IconGrSync.tsx (100%) rename src/{site => app-core}/IconGrid.tsx (100%) rename src/{site => app-core}/IconSearch.tsx (100%) rename src/{site => app-core}/Nav.tsx (96%) rename src/{site => app-core}/SecretGenerator.tsx (100%) rename src/{site => app-core}/ThemeSwitcher.tsx (100%) rename src/{site => app-core}/ViewSwitcher.tsx (93%) rename src/{site => app-core}/api.ts (100%) rename src/{site => app-core}/config.ts (98%) rename src/{site => app-core}/font.ts (100%) rename src/{site => app-core}/paths.ts (100%) rename src/components/{Checklist.tsx => ChecklistGroup.tsx} (97%) delete mode 100644 src/site/SiteChecklist.tsx rename src/{site => utility}/useMetaThemeColor.ts (100%) diff --git a/__tests__/github.test.ts b/__tests__/github.test.ts index 2f7a0442..552ea006 100644 --- a/__tests__/github.test.ts +++ b/__tests__/github.test.ts @@ -1,5 +1,5 @@ import { getGitHubMetaWithFallback, getGitHubPublicFork } from '@/admin/github'; -import { TEMPLATE_BASE_OWNER, TEMPLATE_BASE_REPO } from '@/site/config'; +import { TEMPLATE_BASE_OWNER, TEMPLATE_BASE_REPO } from '@/app-core/config'; describe('GitHub', () => { it('fetches base repo meta', async () => { diff --git a/__tests__/path.test.ts b/__tests__/path.test.ts index 5aeead2f..77f2c737 100644 --- a/__tests__/path.test.ts +++ b/__tests__/path.test.ts @@ -12,7 +12,7 @@ import { isPathProtected, isPathTag, isPathTagPhoto, -} from '@/site/paths'; +} from '@/app-core/paths'; import { TAG_HIDDEN } from '@/tag'; const PHOTO_ID = 'UsKSGcbt'; diff --git a/src/admin/AdminAddAllUploads.tsx b/src/admin/AdminAddAllUploads.tsx index b14f6939..71b31d56 100644 --- a/src/admin/AdminAddAllUploads.tsx +++ b/src/admin/AdminAddAllUploads.tsx @@ -4,7 +4,7 @@ import ErrorNote from '@/components/ErrorNote'; import FieldSetWithStatus from '@/components/FieldSetWithStatus'; import Container from '@/components/Container'; import { addAllUploadsAction } from '@/photo/actions'; -import { PATH_ADMIN_PHOTOS } from '@/site/paths'; +import { PATH_ADMIN_PHOTOS } from '@/app-core/paths'; import { Tags } from '@/tag'; import { generateLocalNaivePostgresString, diff --git a/src/admin/AdminAppConfiguration.tsx b/src/admin/AdminAppConfiguration.tsx new file mode 100644 index 00000000..bc4dbc69 --- /dev/null +++ b/src/admin/AdminAppConfiguration.tsx @@ -0,0 +1,20 @@ +import { Suspense } from 'react'; +import { APP_CONFIGURATION } from '@/app-core/config'; +import AdminAppConfigurationServer from './AdminAppConfigurationServer'; +import AdminAppConfigurationClient from './AdminAppConfigurationClient'; + +export default function AdminAppConfiguration({ + simplifiedView, +}: { + simplifiedView?: boolean +}) { + return ( + }> + + + ); +} diff --git a/src/site/SiteChecklistClient.tsx b/src/admin/AdminAppConfigurationClient.tsx similarity index 96% rename from src/site/SiteChecklistClient.tsx rename to src/admin/AdminAppConfigurationClient.tsx index 315bbfc0..5dbb6505 100644 --- a/src/site/SiteChecklistClient.tsx +++ b/src/admin/AdminAppConfigurationClient.tsx @@ -14,8 +14,8 @@ import { BiPencil, } from 'react-icons/bi'; import { HiOutlineCog } from 'react-icons/hi'; -import Checklist from '@/components/Checklist'; -import { ConfigChecklistStatus } from './config'; +import ChecklistGroup from '@/components/ChecklistGroup'; +import { ConfigChecklistStatus } from '../app-core/config'; import StatusIcon from '@/components/StatusIcon'; import { labelForStorage } from '@/services/storage'; import { HiSparkles } from 'react-icons/hi'; @@ -24,13 +24,13 @@ import ErrorNote from '@/components/ErrorNote'; import WarningNote from '@/components/WarningNote'; import { RiSpeedMiniLine } from 'react-icons/ri'; import Link from 'next/link'; -import SecretGenerator from './SecretGenerator'; +import SecretGenerator from '../app-core/SecretGenerator'; import CopyButton from '@/components/CopyButton'; import { PiPaintBrushHousehold } from 'react-icons/pi'; import { IoMdGrid } from 'react-icons/io'; import { CgDebug } from 'react-icons/cg'; -export default function SiteChecklistClient({ +export default function AdminAppConfigurationClient({ // Storage hasDatabase, isPostgresSslEnabled, @@ -215,7 +215,7 @@ export default function SiteChecklistClient({ return (
- } > @@ -300,8 +300,8 @@ export default function SiteChecklistClient({ )} )} - - + } > @@ -331,8 +331,8 @@ export default function SiteChecklistClient({ 'ADMIN_PASSWORD', ])} - - + } > @@ -373,9 +373,9 @@ export default function SiteChecklistClient({ Store in environment variable (seen in grid sidebar): {renderEnvVars(['NEXT_PUBLIC_SITE_ABOUT'])} - + {!simplifiedView && <> - } @@ -429,8 +429,8 @@ export default function SiteChecklistClient({ (default: {'"title, tags, semantic"'}): {renderEnvVars(['AI_TEXT_AUTO_GENERATED_FIELDS'])} - - + } optional @@ -490,8 +490,8 @@ export default function SiteChecklistClient({ image blur data being stored and displayed: {renderEnvVars(['NEXT_PUBLIC_BLUR_DISABLED'])} - - + } optional @@ -518,8 +518,8 @@ export default function SiteChecklistClient({ of each photo, and display a surrounding border: {renderEnvVars(['NEXT_PUBLIC_MATTE_PHOTOS'])} - - + } optional @@ -578,8 +578,8 @@ export default function SiteChecklistClient({ Set environment variable to {'"1"'} to hide footer link: {renderEnvVars(['NEXT_PUBLIC_HIDE_REPO_LINK'])} - - + } optional @@ -613,8 +613,8 @@ export default function SiteChecklistClient({ aspect ratio): {renderEnvVars(['NEXT_PUBLIC_SHOW_LARGE_THUMBNAILS'])} - - + } optional @@ -664,9 +664,9 @@ export default function SiteChecklistClient({ keep OG image text bottom aligned (default is {'"top"'}): {renderEnvVars(['NEXT_PUBLIC_OG_TEXT_ALIGNMENT'])} - + {areInternalToolsEnabled && - } optional @@ -698,7 +698,7 @@ export default function SiteChecklistClient({ console output for all sql queries: {renderEnvVars(['ADMIN_SQL_DEBUG'])} - } + } }
diff --git a/src/site/SiteChecklistServer.tsx b/src/admin/AdminAppConfigurationServer.tsx similarity index 51% rename from src/site/SiteChecklistServer.tsx rename to src/admin/AdminAppConfigurationServer.tsx index e50255ab..0f19eb2c 100644 --- a/src/site/SiteChecklistServer.tsx +++ b/src/admin/AdminAppConfigurationServer.tsx @@ -1,8 +1,8 @@ -import SiteChecklistClient from './SiteChecklistClient'; -import { CONFIG_CHECKLIST_STATUS } from '@/site/config'; +import AdminAppConfigurationClient from './AdminAppConfigurationClient'; +import { APP_CONFIGURATION } from '@/app-core/config'; import { testConnectionsAction } from '@/admin/actions'; -export default async function SiteChecklistServer({ +export default async function AdminAppConfigurationServer({ simplifiedView, }: { simplifiedView?: boolean @@ -10,8 +10,8 @@ export default async function SiteChecklistServer({ const connectionErrors = await testConnectionsAction().catch(() => ({})); return ( - diff --git a/src/admin/AdminAppInsights.tsx b/src/admin/AdminAppInsights.tsx index 6aea957a..9d489ba3 100644 --- a/src/admin/AdminAppInsights.tsx +++ b/src/admin/AdminAppInsights.tsx @@ -6,7 +6,7 @@ import { getUniqueTags, } from '@/photo/db/query'; import AdminAppInsightsClient from './AdminAppInsightsClient'; - +import { APP_CONFIGURATION, IS_DEVELOPMENT } from '@/app-core/config'; export default async function AdminAppInsights() { const [ { count, dateRange }, @@ -22,14 +22,28 @@ export default async function AdminAppInsights() { getUniqueLenses(), ]); + const { + isAiTextGenerationEnabled, + hasVercelBlobStorage, + } = APP_CONFIGURATION; + return ( ); } diff --git a/src/admin/AdminAppInsightsClient.tsx b/src/admin/AdminAppInsightsClient.tsx index 4f868cc4..329635d4 100644 --- a/src/admin/AdminAppInsightsClient.tsx +++ b/src/admin/AdminAppInsightsClient.tsx @@ -1,63 +1,103 @@ 'use client'; +import IconGrSync from '@/app-core/IconGrSync'; import Note from '@/components/Note'; +import WarningNote from '@/components/WarningNote'; import { dateRangeForPhotos, PhotoDateRange } from '@/photo'; import clsx from 'clsx/lite'; -import { FaCodeFork } from 'react-icons/fa6'; +import { HiSparkles } from 'react-icons/hi'; + +type Recommendation = + 'fork' | + 'forkBehind' | + 'ai' | + 'aiRateLimiting'; export default function AdminAppInsightsClient({ - photosCount, - tagsCount, - camerasCount, - filmSimulationsCount, - lensesCount, - dateRange, + recommendations: { + fork, + forkBehind, + ai, + aiRateLimiting, + }, + photoStats: { + photosCount, + tagsCount, + camerasCount, + filmSimulationsCount, + lensesCount, + dateRange, + }, + debug, }: { - photosCount: number - tagsCount: number - camerasCount: number - filmSimulationsCount: number - lensesCount: number - dateRange?: PhotoDateRange + recommendations: Record, + photoStats: { + photosCount: number + tagsCount: number + camerasCount: number + filmSimulationsCount: number + lensesCount: number + dateRange?: PhotoDateRange + }, + debug?: boolean, }) { + const { descriptionWithSpaces } = dateRangeForPhotos(undefined, dateRange); + const renderTitle = (title: string) => +
+ {title} +
; + return (
-
- Template Recommendations -
- } - className="w-[clamp(300px,80%,1000px)] m-auto" - > - Consider forking this repository in order to - receive new features and fixes - -
- Library Stats -
-
Photos
-
{photosCount}
-
Tags
-
{tagsCount}
-
Cameras
-
{camerasCount}
-
Films
-
{filmSimulationsCount}
-
Lenses
-
{lensesCount}
- - {descriptionWithSpaces} - + {renderTitle('Code Observability')} + {(fork || debug) && + }> + Consider forking this repository in order to + receive new features and fixes + } + {(forkBehind || debug) && + + This fork is 9 commits behind + } + {renderTitle('Template Recommendations')} + {(ai || debug) && }> + Enable AI text generation in the app configuration + } + {(aiRateLimiting || debug) && + Consider enabling rate limiting to mitigate AI abuse + } + {renderTitle('Library Stats')} +
+
Photos
+
{photosCount}
+
Tags
+
{tagsCount}
+
Cameras
+
{camerasCount}
+
Films
+
{filmSimulationsCount}
+
Lenses
+
{lensesCount}
+ + {descriptionWithSpaces} + +
); diff --git a/src/admin/AdminAppMenu.tsx b/src/admin/AdminAppMenu.tsx index 1835ea05..60ffa121 100644 --- a/src/admin/AdminAppMenu.tsx +++ b/src/admin/AdminAppMenu.tsx @@ -1,7 +1,7 @@ 'use client'; import MoreMenu from '@/components/more/MoreMenu'; -import { PATH_ADMIN_CONFIGURATION, PATH_GRID_INFERRED } from '@/site/paths'; +import { PATH_ADMIN_CONFIGURATION, PATH_GRID_INFERRED } from '@/app-core/paths'; import { useAppState } from '@/state/AppState'; import { BiCog } from 'react-icons/bi'; import { ImCheckboxUnchecked } from 'react-icons/im'; diff --git a/src/admin/AdminBatchEditPanelClient.tsx b/src/admin/AdminBatchEditPanelClient.tsx index 91a487bc..e108c6cd 100644 --- a/src/admin/AdminBatchEditPanelClient.tsx +++ b/src/admin/AdminBatchEditPanelClient.tsx @@ -9,7 +9,7 @@ import { IoCloseSharp } from 'react-icons/io5'; import { useState } from 'react'; import { TAG_FAVS, Tags } from '@/tag'; import { usePathname } from 'next/navigation'; -import { PATH_GRID_INFERRED } from '@/site/paths'; +import { PATH_GRID_INFERRED } from '@/app-core/paths'; import PhotoTagFieldset from './PhotoTagFieldset'; import { tagMultiplePhotosAction } from '@/photo/actions'; import { toastSuccess } from '@/toast'; diff --git a/src/admin/AdminCTA.tsx b/src/admin/AdminCTA.tsx index 92fae7b4..74ea1015 100644 --- a/src/admin/AdminCTA.tsx +++ b/src/admin/AdminCTA.tsx @@ -1,7 +1,7 @@ 'use client'; import PhotoUpload from '@/photo/PhotoUpload'; -import { PATH_ADMIN_PHOTOS } from '@/site/paths'; +import { PATH_ADMIN_PHOTOS } from '@/app-core/paths'; import { useAppState } from '@/state/AppState'; import Link from 'next/link'; import { useState } from 'react'; diff --git a/src/admin/AdminNav.tsx b/src/admin/AdminNav.tsx index a87a15d9..aa1110da 100644 --- a/src/admin/AdminNav.tsx +++ b/src/admin/AdminNav.tsx @@ -8,7 +8,7 @@ import { PATH_ADMIN_PHOTOS, PATH_ADMIN_TAGS, PATH_ADMIN_UPLOADS, -} from '@/site/paths'; +} from '@/app-core/paths'; import AdminNavClient from './AdminNavClient'; export default async function AdminNav() { diff --git a/src/admin/AdminNavClient.tsx b/src/admin/AdminNavClient.tsx index b08ec7f4..2331bcae 100644 --- a/src/admin/AdminNavClient.tsx +++ b/src/admin/AdminNavClient.tsx @@ -12,7 +12,7 @@ import { isPathAdminConfiguration, isPathAdminInsights, isPathTopLevelAdmin, -} from '@/site/paths'; +} from '@/app-core/paths'; import { useAppState } from '@/state/AppState'; import { clsx } from 'clsx/lite'; import { differenceInMinutes } from 'date-fns'; diff --git a/src/admin/AdminOutdatedClient.tsx b/src/admin/AdminOutdatedClient.tsx index b09653ac..2ee82d62 100644 --- a/src/admin/AdminOutdatedClient.tsx +++ b/src/admin/AdminOutdatedClient.tsx @@ -3,10 +3,10 @@ import { OUTDATED_THRESHOLD, Photo } from '@/photo'; import AdminPhotosTable from '@/admin/AdminPhotosTable'; import LoaderButton from '@/components/primitives/LoaderButton'; -import IconGrSync from '@/site/IconGrSync'; +import IconGrSync from '@/app-core/IconGrSync'; import Note from '@/components/Note'; import AdminChildPage from '@/components/AdminChildPage'; -import { PATH_ADMIN_PHOTOS } from '@/site/paths'; +import { PATH_ADMIN_PHOTOS } from '@/app-core/paths'; import { useState } from 'react'; import { syncPhotosAction } from '@/photo/actions'; import { useRouter } from 'next/navigation'; diff --git a/src/admin/AdminPhotoMenuClient.tsx b/src/admin/AdminPhotoMenuClient.tsx index e73f0629..2feade73 100644 --- a/src/admin/AdminPhotoMenuClient.tsx +++ b/src/admin/AdminPhotoMenuClient.tsx @@ -1,7 +1,7 @@ 'use client'; import { ComponentProps, useMemo } from 'react'; -import { pathForAdminPhotoEdit, pathForPhoto } from '@/site/paths'; +import { pathForAdminPhotoEdit, pathForPhoto } from '@/app-core/paths'; import { deletePhotoAction, toggleFavoritePhotoAction } from '@/photo/actions'; import { FaRegEdit, FaRegStar, FaStar } from 'react-icons/fa'; import { diff --git a/src/admin/AdminPhotosClient.tsx b/src/admin/AdminPhotosClient.tsx index 073004d1..35015494 100644 --- a/src/admin/AdminPhotosClient.tsx +++ b/src/admin/AdminPhotosClient.tsx @@ -6,11 +6,11 @@ import SiteGrid from '@/components/SiteGrid'; import { AI_TEXT_GENERATION_ENABLED, PRESERVE_ORIGINAL_UPLOADS, -} from '@/site/config'; +} from '@/app-core/config'; import AdminPhotosTable from '@/admin/AdminPhotosTable'; import AdminPhotosTableInfinite from '@/admin/AdminPhotosTableInfinite'; import PathLoaderButton from '@/components/primitives/PathLoaderButton'; -import { PATH_ADMIN_OUTDATED } from '@/site/paths'; +import { PATH_ADMIN_OUTDATED } from '@/app-core/paths'; import { Photo } from '@/photo'; import { StorageListResponse } from '@/services/storage'; import { useState } from 'react'; diff --git a/src/admin/AdminPhotosTable.tsx b/src/admin/AdminPhotosTable.tsx index 357ae9c1..0e8d8ca6 100644 --- a/src/admin/AdminPhotosTable.tsx +++ b/src/admin/AdminPhotosTable.tsx @@ -5,7 +5,7 @@ import AdminTable from './AdminTable'; import { Fragment } from 'react'; import PhotoSmall from '@/photo/PhotoSmall'; import { clsx } from 'clsx/lite'; -import { pathForAdminPhotoEdit, pathForPhoto } from '@/site/paths'; +import { pathForAdminPhotoEdit, pathForPhoto } from '@/app-core/paths'; import Link from 'next/link'; import { AiOutlineEyeInvisible } from 'react-icons/ai'; import PhotoDate from '@/photo/PhotoDate'; diff --git a/src/admin/AdminPhotosTableInfinite.tsx b/src/admin/AdminPhotosTableInfinite.tsx index 3dcc7c9d..65376dfe 100644 --- a/src/admin/AdminPhotosTableInfinite.tsx +++ b/src/admin/AdminPhotosTableInfinite.tsx @@ -1,6 +1,6 @@ 'use client'; -import { PATH_ADMIN_PHOTOS } from '@/site/paths'; +import { PATH_ADMIN_PHOTOS } from '@/app-core/paths'; import InfinitePhotoScroll from '../photo/InfinitePhotoScroll'; import AdminPhotosTable from './AdminPhotosTable'; import { ComponentProps } from 'react'; diff --git a/src/admin/AdminTagTable.tsx b/src/admin/AdminTagTable.tsx index a5bdfc5d..cf93cf99 100644 --- a/src/admin/AdminTagTable.tsx +++ b/src/admin/AdminTagTable.tsx @@ -6,7 +6,7 @@ import DeleteFormButton from '@/admin/DeleteFormButton'; import { photoQuantityText } from '@/photo'; import { Tags, formatTag, sortTagsObject } from '@/tag'; import EditButton from '@/admin/EditButton'; -import { pathForAdminTagEdit } from '@/site/paths'; +import { pathForAdminTagEdit } from '@/app-core/paths'; import { clsx } from 'clsx/lite'; import AdminTagBadge from './AdminTagBadge'; diff --git a/src/admin/AdminUploadsTable.tsx b/src/admin/AdminUploadsTable.tsx index edeb0603..027c4a53 100644 --- a/src/admin/AdminUploadsTable.tsx +++ b/src/admin/AdminUploadsTable.tsx @@ -5,7 +5,7 @@ import Spinner from '@/components/Spinner'; import { getIdFromStorageUrl } from '@/services/storage'; import { clsx } from 'clsx/lite'; import { FaRegCircleCheck } from 'react-icons/fa6'; -import { pathForAdminUploadUrl } from '@/site/paths'; +import { pathForAdminUploadUrl } from '@/app-core/paths'; import AddButton from './AddButton'; import { UrlAddStatus } from './AdminUploadsClient'; import ResponsiveDate from '@/components/ResponsiveDate'; diff --git a/src/admin/DeleteBlobButton.tsx b/src/admin/DeleteBlobButton.tsx index 8e30e030..10d483f0 100644 --- a/src/admin/DeleteBlobButton.tsx +++ b/src/admin/DeleteBlobButton.tsx @@ -3,7 +3,7 @@ import { deleteUploadAction } from '@/photo/actions'; import DeleteButton from './DeleteButton'; import { useRouter } from 'next/navigation'; -import { PATH_ADMIN_PHOTOS } from '@/site/paths'; +import { PATH_ADMIN_PHOTOS } from '@/app-core/paths'; import { useState } from 'react'; export default function DeleteUploadButton({ diff --git a/src/admin/ExifSyncButton.tsx b/src/admin/ExifSyncButton.tsx index 517bcbe5..f968e5d2 100644 --- a/src/admin/ExifSyncButton.tsx +++ b/src/admin/ExifSyncButton.tsx @@ -4,7 +4,7 @@ import LoaderButton from '@/components/primitives/LoaderButton'; import SubmitButtonWithStatus from '@/components/SubmitButtonWithStatus'; import { getExifDataAction } from '@/photo/actions'; import { PhotoFormData } from '@/photo/form'; -import IconGrSync from '@/site/IconGrSync'; +import IconGrSync from '@/app-core/IconGrSync'; import { clsx } from 'clsx/lite'; import { ComponentProps, useState } from 'react'; diff --git a/src/admin/PhotoSyncButton.tsx b/src/admin/PhotoSyncButton.tsx index ea410d82..07e0709d 100644 --- a/src/admin/PhotoSyncButton.tsx +++ b/src/admin/PhotoSyncButton.tsx @@ -1,6 +1,6 @@ import LoaderButton from '@/components/primitives/LoaderButton'; import { syncPhotoAction } from '@/photo/actions'; -import IconGrSync from '@/site/IconGrSync'; +import IconGrSync from '@/app-core/IconGrSync'; import { toastSuccess } from '@/toast'; import { ComponentProps, useState } from 'react'; diff --git a/src/admin/actions.ts b/src/admin/actions.ts index e2ddd1ae..ee366c7a 100644 --- a/src/admin/actions.ts +++ b/src/admin/actions.ts @@ -5,7 +5,7 @@ import { testKvConnection } from '@/services/kv'; import { testOpenAiConnection } from '@/services/openai'; import { testDatabaseConnection } from '@/services/postgres'; import { testStorageConnection } from '@/services/storage'; -import { CONFIG_CHECKLIST_STATUS } from '@/site/config'; +import { APP_CONFIGURATION } from '@/app-core/config'; const scanForError = ( shouldCheck: boolean, @@ -24,7 +24,7 @@ export const testConnectionsAction = async () => hasStorageProvider, hasVercelKv, isAiTextGenerationEnabled, - } = CONFIG_CHECKLIST_STATUS; + } = APP_CONFIGURATION; const [ databaseError, diff --git a/src/admin/github/GitHubForkStatusBadge.tsx b/src/admin/github/GitHubForkStatusBadge.tsx index 0af8dbbb..6faf63ef 100644 --- a/src/admin/github/GitHubForkStatusBadge.tsx +++ b/src/admin/github/GitHubForkStatusBadge.tsx @@ -1,7 +1,7 @@ import { Suspense } from 'react'; import GitHubForkStatusBadgeClient from './GitHubForkStatusBadgeClient'; import GitHubForkStatusBadgeServer from './GitHubForkStatusBadgeServer'; -import { IS_DEVELOPMENT } from '@/site/config'; +import { IS_DEVELOPMENT } from '@/app-core/config'; export default function GitHubForkStatusBadge() { return IS_DEVELOPMENT diff --git a/src/admin/github/GitHubForkStatusBadgeServer.tsx b/src/admin/github/GitHubForkStatusBadgeServer.tsx index faf3d99c..f1bb8f02 100644 --- a/src/admin/github/GitHubForkStatusBadgeServer.tsx +++ b/src/admin/github/GitHubForkStatusBadgeServer.tsx @@ -4,7 +4,7 @@ import { VERCEL_GIT_REPO_OWNER, VERCEL_GIT_REPO_SLUG, VERCEL_GIT_COMMIT_SHA, -} from '@/site/config'; +} from '@/app-core/config'; import { getGitHubMetaWithFallback, getGitHubRepoUrl } from '.'; export default async function GitHubForkStatusBadgeServer() { diff --git a/src/admin/github/index.ts b/src/admin/github/index.ts index f04491d5..f6625b05 100644 --- a/src/admin/github/index.ts +++ b/src/admin/github/index.ts @@ -2,7 +2,7 @@ import { TEMPLATE_BASE_OWNER, TEMPLATE_BASE_REPO, TEMPLATE_BASE_BRANCH, -} from '@/site/config'; +} from '@/app-core/config'; const DEFAULT_BRANCH = 'main'; const FALLBACK_TEXT = 'Unknown'; diff --git a/src/site/CommandK.tsx b/src/app-core/CommandK.tsx similarity index 100% rename from src/site/CommandK.tsx rename to src/app-core/CommandK.tsx diff --git a/src/site/Footer.tsx b/src/app-core/Footer.tsx similarity index 95% rename from src/site/Footer.tsx rename to src/app-core/Footer.tsx index 12bcfe30..2fab4de5 100644 --- a/src/site/Footer.tsx +++ b/src/app-core/Footer.tsx @@ -2,9 +2,9 @@ import { clsx } from 'clsx/lite'; import SiteGrid from '../components/SiteGrid'; -import ThemeSwitcher from '@/site/ThemeSwitcher'; +import ThemeSwitcher from '@/app-core/ThemeSwitcher'; import Link from 'next/link'; -import { SHOW_REPO_LINK } from '@/site/config'; +import { SHOW_REPO_LINK } from '@/app-core/config'; import RepoLink from '../components/RepoLink'; import { usePathname } from 'next/navigation'; import { PATH_ADMIN_PHOTOS, isPathAdmin, isPathSignIn } from './paths'; diff --git a/src/site/IconFeed.tsx b/src/app-core/IconFeed.tsx similarity index 100% rename from src/site/IconFeed.tsx rename to src/app-core/IconFeed.tsx diff --git a/src/site/IconGrSync.tsx b/src/app-core/IconGrSync.tsx similarity index 100% rename from src/site/IconGrSync.tsx rename to src/app-core/IconGrSync.tsx diff --git a/src/site/IconGrid.tsx b/src/app-core/IconGrid.tsx similarity index 100% rename from src/site/IconGrid.tsx rename to src/app-core/IconGrid.tsx diff --git a/src/site/IconSearch.tsx b/src/app-core/IconSearch.tsx similarity index 100% rename from src/site/IconSearch.tsx rename to src/app-core/IconSearch.tsx diff --git a/src/site/Nav.tsx b/src/app-core/Nav.tsx similarity index 96% rename from src/site/Nav.tsx rename to src/app-core/Nav.tsx index 6f3bf2e0..07715a4c 100644 --- a/src/site/Nav.tsx +++ b/src/app-core/Nav.tsx @@ -4,7 +4,7 @@ import { clsx } from 'clsx/lite'; import { usePathname } from 'next/navigation'; import Link from 'next/link'; import SiteGrid from '../components/SiteGrid'; -import ViewSwitcher, { SwitcherSelection } from '@/site/ViewSwitcher'; +import ViewSwitcher, { SwitcherSelection } from '@/app-core/ViewSwitcher'; import { PATH_ROOT, isPathAdmin, @@ -12,7 +12,7 @@ import { isPathGrid, isPathProtected, isPathSignIn, -} from '@/site/paths'; +} from '@/app-core/paths'; import AnimateItems from '../components/AnimateItems'; import { useAppState } from '@/state/AppState'; import { diff --git a/src/site/SecretGenerator.tsx b/src/app-core/SecretGenerator.tsx similarity index 100% rename from src/site/SecretGenerator.tsx rename to src/app-core/SecretGenerator.tsx diff --git a/src/site/ThemeSwitcher.tsx b/src/app-core/ThemeSwitcher.tsx similarity index 100% rename from src/site/ThemeSwitcher.tsx rename to src/app-core/ThemeSwitcher.tsx diff --git a/src/site/ViewSwitcher.tsx b/src/app-core/ViewSwitcher.tsx similarity index 93% rename from src/site/ViewSwitcher.tsx rename to src/app-core/ViewSwitcher.tsx index 3d5a2baf..ab39720e 100644 --- a/src/site/ViewSwitcher.tsx +++ b/src/app-core/ViewSwitcher.tsx @@ -1,12 +1,12 @@ import Switcher from '@/components/Switcher'; import SwitcherItem from '@/components/SwitcherItem'; -import IconFeed from '@/site/IconFeed'; -import IconGrid from '@/site/IconGrid'; +import IconFeed from '@/app-core/IconFeed'; +import IconGrid from '@/app-core/IconGrid'; import { PATH_ADMIN_PHOTOS, PATH_FEED_INFERRED, PATH_GRID_INFERRED, -} from '@/site/paths'; +} from '@/app-core/paths'; import { BiLockAlt } from 'react-icons/bi'; import IconSearch from './IconSearch'; import { useAppState } from '@/state/AppState'; diff --git a/src/site/api.ts b/src/app-core/api.ts similarity index 100% rename from src/site/api.ts rename to src/app-core/api.ts diff --git a/src/site/config.ts b/src/app-core/config.ts similarity index 98% rename from src/site/config.ts rename to src/app-core/config.ts index f1326a22..449e0fe8 100644 --- a/src/site/config.ts +++ b/src/app-core/config.ts @@ -232,7 +232,7 @@ export const ADMIN_DEBUG_TOOLS_ENABLED = process.env.ADMIN_DEBUG_TOOLS === '1'; export const ADMIN_DB_OPTIMIZE_ENABLED = process.env.ADMIN_DB_OPTIMIZE === '1'; export const ADMIN_SQL_DEBUG_ENABLED = process.env.ADMIN_SQL_DEBUG === '1'; -export const CONFIG_CHECKLIST_STATUS = { +export const APP_CONFIGURATION = { // Storage hasDatabase: HAS_DATABASE, isPostgresSslEnabled: POSTGRES_SSL_ENABLED, @@ -326,11 +326,11 @@ export const CONFIG_CHECKLIST_STATUS = { commitUrl: VERCEL_GIT_COMMIT_URL, }; -export type ConfigChecklistStatus = typeof CONFIG_CHECKLIST_STATUS; +export type ConfigChecklistStatus = typeof APP_CONFIGURATION; export const IS_SITE_READY = - CONFIG_CHECKLIST_STATUS.hasDatabase && - CONFIG_CHECKLIST_STATUS.hasStorageProvider && - CONFIG_CHECKLIST_STATUS.hasAuthSecret && - CONFIG_CHECKLIST_STATUS.hasAdminUser; + APP_CONFIGURATION.hasDatabase && + APP_CONFIGURATION.hasStorageProvider && + APP_CONFIGURATION.hasAuthSecret && + APP_CONFIGURATION.hasAdminUser; \ No newline at end of file diff --git a/src/site/font.ts b/src/app-core/font.ts similarity index 100% rename from src/site/font.ts rename to src/app-core/font.ts diff --git a/src/site/paths.ts b/src/app-core/paths.ts similarity index 100% rename from src/site/paths.ts rename to src/app-core/paths.ts diff --git a/src/app/admin/configuration/page.tsx b/src/app/admin/configuration/page.tsx index a2a99905..59d27f49 100644 --- a/src/app/admin/configuration/page.tsx +++ b/src/app/admin/configuration/page.tsx @@ -1,14 +1,14 @@ import ClearCacheButton from '@/admin/ClearCacheButton'; -import SiteChecklist from '@/site/SiteChecklist'; +import AdminAppConfiguration from '@/admin/AdminAppConfiguration'; import AdminInfoPage from '@/admin/AdminInfoPage'; -export default function AdminConfigurationPage() { +export default function AdminAppConfigurationPage() { return ( } > - + ); } diff --git a/src/app/admin/insights/page.tsx b/src/app/admin/insights/page.tsx index 7a4d30f7..152ad524 100644 --- a/src/app/admin/insights/page.tsx +++ b/src/app/admin/insights/page.tsx @@ -1,7 +1,10 @@ import AdminAppInsights from '@/admin/AdminAppInsights'; import AdminInfoPage from '@/admin/AdminInfoPage'; import GitHubForkStatusBadge from '@/admin/github/GitHubForkStatusBadge'; -import { IS_DEVELOPMENT, IS_VERCEL_GIT_PROVIDER_GITHUB } from '@/site/config'; +import { + IS_DEVELOPMENT, + IS_VERCEL_GIT_PROVIDER_GITHUB, +} from '@/app-core/config'; export default async function AdminInsightsPage() { return Promise<{ simulation: FilmSimulation }[]>) | undefined = undefined; diff --git a/src/app/film/[simulation]/page.tsx b/src/app/film/[simulation]/page.tsx index 0199457c..262d78fd 100644 --- a/src/app/film/[simulation]/page.tsx +++ b/src/app/film/[simulation]/page.tsx @@ -2,9 +2,9 @@ import { INFINITE_SCROLL_GRID_INITIAL } from '@/photo'; import { getUniqueFilmSimulations } from '@/photo/db/query'; import { FilmSimulation, generateMetaForFilmSimulation } from '@/simulation'; import FilmSimulationOverview from '@/simulation/FilmSimulationOverview'; -import { IS_PRODUCTION } from '@/site/config'; +import { IS_PRODUCTION } from '@/app-core/config'; import { getPhotosFilmSimulationDataCached } from '@/simulation/data'; -import { STATICALLY_OPTIMIZED_PHOTO_CATEGORIES } from '@/site/config'; +import { STATICALLY_OPTIMIZED_PHOTO_CATEGORIES } from '@/app-core/config'; import { Metadata } from 'next/types'; import { cache } from 'react'; diff --git a/src/app/focal/[focal]/[photoId]/page.tsx b/src/app/focal/[focal]/[photoId]/page.tsx index 1ca40aa1..85c4dc06 100644 --- a/src/app/focal/[focal]/[photoId]/page.tsx +++ b/src/app/focal/[focal]/[photoId]/page.tsx @@ -9,7 +9,7 @@ import { PATH_ROOT, absolutePathForPhoto, absolutePathForPhotoImage, -} from '@/site/paths'; +} from '@/app-core/paths'; import PhotoDetailPage from '@/photo/PhotoDetailPage'; import { getPhotosNearIdCached } from '@/photo/cache'; import { cache } from 'react'; diff --git a/src/app/focal/[focal]/image/route.tsx b/src/app/focal/[focal]/image/route.tsx index 44cc1558..79682cb0 100644 --- a/src/app/focal/[focal]/image/route.tsx +++ b/src/app/focal/[focal]/image/route.tsx @@ -3,7 +3,7 @@ import { IMAGE_OG_DIMENSION_SMALL, MAX_PHOTOS_TO_SHOW_PER_TAG, } from '@/image-response'; -import { getIBMPlexMonoMedium } from '@/site/font'; +import { getIBMPlexMonoMedium } from '@/app-core/font'; import { ImageResponse } from 'next/og'; import { getImageResponseCacheControlHeaders } from '@/image-response/cache'; import FocalLengthImageResponse from @@ -14,7 +14,7 @@ import { getUniqueFocalLengths } from '@/photo/db/query'; import { STATICALLY_OPTIMIZED_PHOTO_CATEGORY_OG_IMAGES, IS_PRODUCTION, -} from '@/site/config'; +} from '@/app-core/config'; export let generateStaticParams: (() => Promise<{ focal: string }[]>) | undefined = undefined; diff --git a/src/app/focal/[focal]/page.tsx b/src/app/focal/[focal]/page.tsx index ed8d78a6..2d01680a 100644 --- a/src/app/focal/[focal]/page.tsx +++ b/src/app/focal/[focal]/page.tsx @@ -2,10 +2,10 @@ import { generateMetaForFocalLength, getFocalLengthFromString } from '@/focal'; import FocalLengthOverview from '@/focal/FocalLengthOverview'; import { getPhotosFocalLengthDataCached } from '@/focal/data'; import { INFINITE_SCROLL_GRID_INITIAL } from '@/photo'; -import { IS_PRODUCTION } from '@/site/config'; +import { IS_PRODUCTION } from '@/app-core/config'; import { getUniqueFocalLengths } from '@/photo/db/query'; -import { STATICALLY_OPTIMIZED_PHOTO_CATEGORIES } from '@/site/config'; -import { PATH_ROOT } from '@/site/paths'; +import { STATICALLY_OPTIMIZED_PHOTO_CATEGORIES } from '@/app-core/config'; +import { PATH_ROOT } from '@/app-core/paths'; import type { Metadata } from 'next'; import { redirect } from 'next/navigation'; import { cache } from 'react'; diff --git a/src/app/home-image/route.tsx b/src/app/home-image/route.tsx index 7cb7acf7..fa820f94 100644 --- a/src/app/home-image/route.tsx +++ b/src/app/home-image/route.tsx @@ -4,7 +4,7 @@ import { MAX_PHOTOS_TO_SHOW_OG, } from '@/image-response'; import HomeImageResponse from '@/image-response/HomeImageResponse'; -import { getIBMPlexMonoMedium } from '@/site/font'; +import { getIBMPlexMonoMedium } from '@/app-core/font'; import { ImageResponse } from 'next/og'; import { getImageResponseCacheControlHeaders } from '@/image-response/cache'; import { isNextImageReadyBasedOnPhotos } from '@/photo'; diff --git a/src/app/layout.tsx b/src/app/layout.tsx index fbebb074..2e0d809b 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -7,15 +7,15 @@ import { SITE_DESCRIPTION, SITE_DOMAIN_OR_TITLE, SITE_TITLE, -} from '@/site/config'; +} from '@/app-core/config'; import AppStateProvider from '@/state/AppStateProvider'; import ToasterWithThemes from '@/toast/ToasterWithThemes'; import PhotoEscapeHandler from '@/photo/PhotoEscapeHandler'; import { Metadata } from 'next/types'; import { ThemeProvider } from 'next-themes'; -import Nav from '@/site/Nav'; -import Footer from '@/site/Footer'; -import CommandK from '@/site/CommandK'; +import Nav from '@/app-core/Nav'; +import Footer from '@/app-core/Footer'; +import CommandK from '@/app-core/CommandK'; import SwrConfigClient from '../state/SwrConfigClient'; import AdminBatchEditPanel from '@/admin/AdminBatchEditPanel'; import ShareModals from '@/share/ShareModals'; diff --git a/src/app/p/[photoId]/image/route.tsx b/src/app/p/[photoId]/image/route.tsx index 73bf45ac..07be4e8f 100644 --- a/src/app/p/[photoId]/image/route.tsx +++ b/src/app/p/[photoId]/image/route.tsx @@ -1,13 +1,13 @@ import { getPhotoCached } from '@/photo/cache'; import { IMAGE_OG_DIMENSION } from '@/image-response'; import PhotoImageResponse from '@/image-response/PhotoImageResponse'; -import { getIBMPlexMonoMedium } from '@/site/font'; +import { getIBMPlexMonoMedium } from '@/app-core/font'; import { ImageResponse } from 'next/og'; import { getImageResponseCacheControlHeaders } from '@/image-response/cache'; import { IS_PRODUCTION, STATICALLY_OPTIMIZED_PHOTO_OG_IMAGES, -} from '@/site/config'; +} from '@/app-core/config'; import { getPhotoIds } from '@/photo/db/query'; import { GENERATE_STATIC_PARAMS_LIMIT } from '@/photo/db'; import { isNextImageReadyBasedOnPhotos } from '@/photo'; diff --git a/src/app/p/[photoId]/page.tsx b/src/app/p/[photoId]/page.tsx index a84aa724..6097fbf1 100644 --- a/src/app/p/[photoId]/page.tsx +++ b/src/app/p/[photoId]/page.tsx @@ -9,10 +9,10 @@ import { PATH_ROOT, absolutePathForPhoto, absolutePathForPhotoImage, -} from '@/site/paths'; +} from '@/app-core/paths'; import PhotoDetailPage from '@/photo/PhotoDetailPage'; import { getPhotosNearIdCached } from '@/photo/cache'; -import { IS_PRODUCTION, STATICALLY_OPTIMIZED_PHOTOS } from '@/site/config'; +import { IS_PRODUCTION, STATICALLY_OPTIMIZED_PHOTOS } from '@/app-core/config'; import { getPhotoIds } from '@/photo/db/query'; import { GENERATE_STATIC_PARAMS_LIMIT } from '@/photo/db'; import { cache } from 'react'; diff --git a/src/app/page.tsx b/src/app/page.tsx index fb6a9f22..e74c5467 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -7,7 +7,7 @@ import PhotosEmptyState from '@/photo/PhotosEmptyState'; import { Metadata } from 'next/types'; import { cache } from 'react'; import { getPhotos, getPhotosMeta } from '@/photo/db/query'; -import { GRID_HOMEPAGE_ENABLED } from '@/site/config'; +import { GRID_HOMEPAGE_ENABLED } from '@/app-core/config'; import { getPhotoSidebarData } from '@/photo/data'; import PhotoGridPage from '@/photo/PhotoGridPage'; import PhotoFeedPage from '@/photo/PhotoFeedPage'; diff --git a/src/app/shot-on/[make]/[model]/[photoId]/page.tsx b/src/app/shot-on/[make]/[model]/[photoId]/page.tsx index 74972892..169e80f2 100644 --- a/src/app/shot-on/[make]/[model]/[photoId]/page.tsx +++ b/src/app/shot-on/[make]/[model]/[photoId]/page.tsx @@ -9,7 +9,7 @@ import { PATH_ROOT, absolutePathForPhoto, absolutePathForPhotoImage, -} from '@/site/paths'; +} from '@/app-core/paths'; import PhotoDetailPage from '@/photo/PhotoDetailPage'; import { getPhotosMetaCached, diff --git a/src/app/shot-on/[make]/[model]/image/route.tsx b/src/app/shot-on/[make]/[model]/image/route.tsx index fce1c7ac..b073b7f9 100644 --- a/src/app/shot-on/[make]/[model]/image/route.tsx +++ b/src/app/shot-on/[make]/[model]/image/route.tsx @@ -5,7 +5,7 @@ import { MAX_PHOTOS_TO_SHOW_PER_TAG, } from '@/image-response'; import CameraImageResponse from '@/image-response/CameraImageResponse'; -import { getIBMPlexMonoMedium } from '@/site/font'; +import { getIBMPlexMonoMedium } from '@/app-core/font'; import { ImageResponse } from 'next/og'; import { getImageResponseCacheControlHeaders } from '@/image-response/cache'; import { GENERATE_STATIC_PARAMS_LIMIT } from '@/photo/db'; @@ -13,7 +13,7 @@ import { getUniqueCameras } from '@/photo/db/query'; import { STATICALLY_OPTIMIZED_PHOTO_CATEGORY_OG_IMAGES, IS_PRODUCTION, -} from '@/site/config'; +} from '@/app-core/config'; export let generateStaticParams: (() => Promise<{ camera: Camera }[]>) | undefined = undefined; diff --git a/src/app/shot-on/[make]/[model]/page.tsx b/src/app/shot-on/[make]/[model]/page.tsx index 2a776ee7..40ba15df 100644 --- a/src/app/shot-on/[make]/[model]/page.tsx +++ b/src/app/shot-on/[make]/[model]/page.tsx @@ -5,8 +5,8 @@ import { INFINITE_SCROLL_GRID_INITIAL } from '@/photo'; import { getPhotosCameraDataCached } from '@/camera/data'; import CameraOverview from '@/camera/CameraOverview'; import { cache } from 'react'; -import { STATICALLY_OPTIMIZED_PHOTO_CATEGORIES } from '@/site/config'; -import { IS_PRODUCTION } from '@/site/config'; +import { STATICALLY_OPTIMIZED_PHOTO_CATEGORIES } from '@/app-core/config'; +import { IS_PRODUCTION } from '@/app-core/config'; import { getUniqueCameras } from '@/photo/db/query'; const getPhotosCameraDataCachedCached = cache(( diff --git a/src/app/sign-in/page.tsx b/src/app/sign-in/page.tsx index 7fc5053c..f4a93638 100644 --- a/src/app/sign-in/page.tsx +++ b/src/app/sign-in/page.tsx @@ -1,6 +1,6 @@ import { auth } from '@/auth'; import SignInForm from '@/auth/SignInForm'; -import { PATH_ADMIN } from '@/site/paths'; +import { PATH_ADMIN } from '@/app-core/paths'; import { clsx } from 'clsx/lite'; import { redirect } from 'next/navigation'; diff --git a/src/app/tag/[tag]/[photoId]/page.tsx b/src/app/tag/[tag]/[photoId]/page.tsx index 186049dc..9120e9b8 100644 --- a/src/app/tag/[tag]/[photoId]/page.tsx +++ b/src/app/tag/[tag]/[photoId]/page.tsx @@ -9,7 +9,7 @@ import { PATH_ROOT, absolutePathForPhoto, absolutePathForPhotoImage, -} from '@/site/paths'; +} from '@/app-core/paths'; import PhotoDetailPage from '@/photo/PhotoDetailPage'; import { getPhotosNearIdCached } from '@/photo/cache'; import { cache } from 'react'; diff --git a/src/app/tag/[tag]/image/route.tsx b/src/app/tag/[tag]/image/route.tsx index 80e11bb1..a2dcb221 100644 --- a/src/app/tag/[tag]/image/route.tsx +++ b/src/app/tag/[tag]/image/route.tsx @@ -4,7 +4,7 @@ import { MAX_PHOTOS_TO_SHOW_PER_TAG, } from '@/image-response'; import TagImageResponse from '@/image-response/TagImageResponse'; -import { getIBMPlexMonoMedium } from '@/site/font'; +import { getIBMPlexMonoMedium } from '@/app-core/font'; import { ImageResponse } from 'next/og'; import { getImageResponseCacheControlHeaders } from '@/image-response/cache'; import { GENERATE_STATIC_PARAMS_LIMIT } from '@/photo/db'; @@ -12,7 +12,7 @@ import { getUniqueTags } from '@/photo/db/query'; import { STATICALLY_OPTIMIZED_PHOTO_CATEGORY_OG_IMAGES, IS_PRODUCTION, -} from '@/site/config'; +} from '@/app-core/config'; export let generateStaticParams: (() => Promise<{ tag: string }[]>) | undefined = undefined; diff --git a/src/app/tag/[tag]/page.tsx b/src/app/tag/[tag]/page.tsx index 0e19f3a7..732e7b04 100644 --- a/src/app/tag/[tag]/page.tsx +++ b/src/app/tag/[tag]/page.tsx @@ -1,8 +1,8 @@ import { INFINITE_SCROLL_GRID_INITIAL } from '@/photo'; import { getUniqueTags } from '@/photo/db/query'; -import { IS_PRODUCTION } from '@/site/config'; -import { STATICALLY_OPTIMIZED_PHOTO_CATEGORIES } from '@/site/config'; -import { PATH_ROOT } from '@/site/paths'; +import { IS_PRODUCTION } from '@/app-core/config'; +import { STATICALLY_OPTIMIZED_PHOTO_CATEGORIES } from '@/app-core/config'; +import { PATH_ROOT } from '@/app-core/paths'; import { generateMetaForTag } from '@/tag'; import TagOverview from '@/tag/TagOverview'; import { getPhotosTagDataCached } from '@/tag/data'; diff --git a/src/app/tag/hidden/[photoId]/page.tsx b/src/app/tag/hidden/[photoId]/page.tsx index 94956d58..d890a95b 100644 --- a/src/app/tag/hidden/[photoId]/page.tsx +++ b/src/app/tag/hidden/[photoId]/page.tsx @@ -8,7 +8,7 @@ import { getPhotosNearIdCached, } from '@/photo/cache'; import { getPhotosMeta } from '@/photo/db/query'; -import { PATH_ROOT, absolutePathForPhoto } from '@/site/paths'; +import { PATH_ROOT, absolutePathForPhoto } from '@/app-core/paths'; import { TAG_HIDDEN } from '@/tag'; import { Metadata } from 'next'; import { redirect } from 'next/navigation'; diff --git a/src/app/tag/hidden/page.tsx b/src/app/tag/hidden/page.tsx index cb890821..cf5a353d 100644 --- a/src/app/tag/hidden/page.tsx +++ b/src/app/tag/hidden/page.tsx @@ -4,7 +4,7 @@ import SiteGrid from '@/components/SiteGrid'; import PhotoGrid from '@/photo/PhotoGrid'; import { getPhotosNoStore } from '@/photo/cache'; import { getPhotosMeta } from '@/photo/db/query'; -import { absolutePathForTag } from '@/site/paths'; +import { absolutePathForTag } from '@/app-core/paths'; import { TAG_HIDDEN, descriptionForTaggedPhotos, titleForTag } from '@/tag'; import HiddenHeader from '@/tag/HiddenHeader'; import { Metadata } from 'next'; diff --git a/src/app/template-image-tight/route.tsx b/src/app/template-image-tight/route.tsx index 2f3816f1..8fb805a4 100644 --- a/src/app/template-image-tight/route.tsx +++ b/src/app/template-image-tight/route.tsx @@ -5,7 +5,7 @@ import { } from '@/image-response'; import TemplateImageResponse from '@/image-response/TemplateImageResponse'; -import { getIBMPlexMonoMedium } from '@/site/font'; +import { getIBMPlexMonoMedium } from '@/app-core/font'; import { ImageResponse } from 'next/og'; import { getImageResponseCacheControlHeaders } from '@/image-response/cache'; import { isNextImageReadyBasedOnPhotos } from '@/photo'; diff --git a/src/app/template-image/route.tsx b/src/app/template-image/route.tsx index 1b2c280b..181defdb 100644 --- a/src/app/template-image/route.tsx +++ b/src/app/template-image/route.tsx @@ -5,7 +5,7 @@ import { } from '@/image-response'; import TemplateImageResponse from '@/image-response/TemplateImageResponse'; -import { getIBMPlexMonoMedium } from '@/site/font'; +import { getIBMPlexMonoMedium } from '@/app-core/font'; import { ImageResponse } from 'next/og'; import { getImageResponseCacheControlHeaders } from '@/image-response/cache'; import { isNextImageReadyBasedOnPhotos } from '@/photo'; diff --git a/src/auth/actions.ts b/src/auth/actions.ts index 72c04dea..d3791893 100644 --- a/src/auth/actions.ts +++ b/src/auth/actions.ts @@ -10,7 +10,7 @@ import { signIn, signOut, } from '@/auth'; -import { PATH_ADMIN_PHOTOS, PATH_ROOT } from '@/site/paths'; +import { PATH_ADMIN_PHOTOS, PATH_ROOT } from '@/app-core/paths'; import type { Session } from 'next-auth'; import { redirect } from 'next/navigation'; diff --git a/src/auth/index.ts b/src/auth/index.ts index 9dab1b80..83ec6da7 100644 --- a/src/auth/index.ts +++ b/src/auth/index.ts @@ -1,4 +1,4 @@ -import { isPathProtected } from '@/site/paths'; +import { isPathProtected } from '@/app-core/paths'; import NextAuth, { User } from 'next-auth'; import Credentials from 'next-auth/providers/credentials'; diff --git a/src/camera/CameraOGTile.tsx b/src/camera/CameraOGTile.tsx index 225758fa..184b8399 100644 --- a/src/camera/CameraOGTile.tsx +++ b/src/camera/CameraOGTile.tsx @@ -1,5 +1,5 @@ import { Photo, PhotoDateRange } from '@/photo'; -import { absolutePathForCameraImage, pathForCamera } from '@/site/paths'; +import { absolutePathForCameraImage, pathForCamera } from '@/app-core/paths'; import OGTile from '@/components/OGTile'; import { Camera } from '.'; import { descriptionForCameraPhotos, titleForCamera } from './meta'; diff --git a/src/camera/CameraShareModal.tsx b/src/camera/CameraShareModal.tsx index 8d640ab1..6e85b7ef 100644 --- a/src/camera/CameraShareModal.tsx +++ b/src/camera/CameraShareModal.tsx @@ -1,4 +1,4 @@ -import { absolutePathForCamera } from '@/site/paths'; +import { absolutePathForCamera } from '@/app-core/paths'; import { PhotoSetAttributes } from '../photo'; import ShareModal from '@/share/ShareModal'; import CameraOGTile from './CameraOGTile'; diff --git a/src/camera/PhotoCamera.tsx b/src/camera/PhotoCamera.tsx index c097b099..845de6d5 100644 --- a/src/camera/PhotoCamera.tsx +++ b/src/camera/PhotoCamera.tsx @@ -1,5 +1,5 @@ import { AiFillApple } from 'react-icons/ai'; -import { pathForCamera } from '@/site/paths'; +import { pathForCamera } from '@/app-core/paths'; import { IoMdCamera } from 'react-icons/io'; import { Camera, formatCameraText, isCameraApple } from '.'; import EntityLink, { diff --git a/src/camera/meta.ts b/src/camera/meta.ts index ff13db16..5c85cd2a 100644 --- a/src/camera/meta.ts +++ b/src/camera/meta.ts @@ -8,7 +8,7 @@ import { Camera, cameraFromPhoto, formatCameraText } from '.'; import { absolutePathForCamera, absolutePathForCameraImage, -} from '@/site/paths'; +} from '@/app-core/paths'; // Meta functions moved to separate file to avoid // dependencies (camelcase-keys) found in photo/index.ts diff --git a/src/components/Checklist.tsx b/src/components/ChecklistGroup.tsx similarity index 97% rename from src/components/Checklist.tsx rename to src/components/ChecklistGroup.tsx index ec62c3bb..2cf3a751 100644 --- a/src/components/Checklist.tsx +++ b/src/components/ChecklistGroup.tsx @@ -5,7 +5,7 @@ import Badge from './Badge'; import ResponsiveText from './primitives/ResponsiveText'; import { parameterize } from '@/utility/string'; -export default function Checklist({ +export default function ChecklistGroup({ title, titleShort, icon, diff --git a/src/components/Container.tsx b/src/components/Container.tsx index 54d640f1..3c35c85e 100644 --- a/src/components/Container.tsx +++ b/src/components/Container.tsx @@ -25,13 +25,13 @@ export default function Container({ switch (color) { case 'gray': return [ 'text-medium', - 'bg-gray-50 border-gray-200', - 'dark:bg-gray-900/40 dark:border-gray-800', + 'bg-gray-50 dark:bg-gray-900/40', + 'border-gray-200 dark:border-gray-800', ]; case 'blue': return [ - 'text-main', - 'bg-blue-50/50 border-blue-200', - 'dark:bg-blue-950/30 dark:border-blue-600/50', + 'text-blue-900 dark:text-blue-300', + 'bg-blue-50/50 dark:bg-blue-950/30', + 'border-blue-200 dark:border-blue-600/30', ]; case 'red': return [ 'text-red-600 dark:text-red-500/90', @@ -41,7 +41,7 @@ export default function Container({ case 'yellow': return [ 'text-amber-700 dark:text-amber-500/90', 'bg-amber-50/50 dark:bg-amber-950/30', - 'border-amber-200/80 dark:border-amber-800/30', + 'border-amber-600/30 dark:border-amber-800/30', ]; } }; diff --git a/src/components/HttpStatusPage.tsx b/src/components/HttpStatusPage.tsx index 0abe6ec0..4e9dba0d 100644 --- a/src/components/HttpStatusPage.tsx +++ b/src/components/HttpStatusPage.tsx @@ -1,7 +1,7 @@ import { ReactNode } from 'react'; import SiteGrid from './SiteGrid'; import { clsx } from 'clsx/lite'; -import { PATH_ROOT } from '@/site/paths'; +import { PATH_ROOT } from '@/app-core/paths'; import Link from 'next/link'; export default function HttpStatusPage({ diff --git a/src/components/Modal.tsx b/src/components/Modal.tsx index 0b89594f..f4b9eca2 100644 --- a/src/components/Modal.tsx +++ b/src/components/Modal.tsx @@ -6,9 +6,9 @@ import { clsx } from 'clsx/lite'; import useClickInsideOutside from '@/utility/useClickInsideOutside'; import { useRouter } from 'next/navigation'; import AnimateItems from './AnimateItems'; -import { PATH_ROOT } from '@/site/paths'; +import { PATH_ROOT } from '@/app-core/paths'; import usePrefersReducedMotion from '@/utility/usePrefersReducedMotion'; -import useMetaThemeColor from '@/site/useMetaThemeColor'; +import useMetaThemeColor from '@/utility/useMetaThemeColor'; import useEscapeHandler from '@/utility/useEscapeHandler'; export default function Modal({ diff --git a/src/components/SwitcherItem.tsx b/src/components/SwitcherItem.tsx index 41a3a9ea..3967f9ce 100644 --- a/src/components/SwitcherItem.tsx +++ b/src/components/SwitcherItem.tsx @@ -1,5 +1,5 @@ import { clsx } from 'clsx/lite'; -import { SHOULD_PREFETCH_ALL_LINKS } from '@/site/config'; +import { SHOULD_PREFETCH_ALL_LINKS } from '@/app-core/config'; import { JSX } from 'react'; import Spinner from './Spinner'; import LinkWithLoader from './LinkWithLoader'; diff --git a/src/components/cmdk/CommandKClient.tsx b/src/components/cmdk/CommandKClient.tsx index 75b3abe0..5e9c1707 100644 --- a/src/components/cmdk/CommandKClient.tsx +++ b/src/components/cmdk/CommandKClient.tsx @@ -22,7 +22,7 @@ import { PATH_SIGN_IN, pathForPhoto, pathForTag, -} from '../../site/paths'; +} from '../../app-core/paths'; import Modal from '../Modal'; import { clsx } from 'clsx/lite'; import { useDebounce } from 'use-debounce'; @@ -46,7 +46,7 @@ import { Tags, addHiddenToTags, formatTag } from '@/tag'; import { FaTag } from 'react-icons/fa'; import { formatCount, formatCountDescriptive } from '@/utility/string'; import CommandKItem from './CommandKItem'; -import { GRID_HOMEPAGE_ENABLED } from '@/site/config'; +import { GRID_HOMEPAGE_ENABLED } from '@/app-core/config'; import { DialogDescription, DialogTitle } from '@radix-ui/react-dialog'; import * as VisuallyHidden from '@radix-ui/react-visually-hidden'; diff --git a/src/components/image/ImageLarge.tsx b/src/components/image/ImageLarge.tsx index 3b14025e..4a9ee82f 100644 --- a/src/components/image/ImageLarge.tsx +++ b/src/components/image/ImageLarge.tsx @@ -1,4 +1,4 @@ -import { IMAGE_QUALITY } from '@/site/config'; +import { IMAGE_QUALITY } from '@/app-core/config'; import { IMAGE_WIDTH_LARGE, ImageProps } from '.'; import ImageWithFallback from './ImageWithFallback'; diff --git a/src/components/image/ImageWithFallback.tsx b/src/components/image/ImageWithFallback.tsx index 23457add..91ae5935 100644 --- a/src/components/image/ImageWithFallback.tsx +++ b/src/components/image/ImageWithFallback.tsx @@ -1,7 +1,7 @@ 'use client'; /* eslint-disable jsx-a11y/alt-text */ -import { BLUR_ENABLED } from '@/site/config'; +import { BLUR_ENABLED } from '@/app-core/config'; import { useAppState } from '@/state/AppState'; import { clsx} from 'clsx/lite'; import Image, { ImageProps } from 'next/image'; diff --git a/src/components/image/useImageZoomControls.ts b/src/components/image/useImageZoomControls.ts index 6c192250..09479415 100644 --- a/src/components/image/useImageZoomControls.ts +++ b/src/components/image/useImageZoomControls.ts @@ -1,4 +1,4 @@ -import useMetaThemeColor from '@/site/useMetaThemeColor'; +import useMetaThemeColor from '@/utility/useMetaThemeColor'; import { useAppState } from '@/state/AppState'; import useKeydownHandler from '@/utility/useKeydownHandler'; import { RefObject, useCallback, useEffect, useRef, useState } from 'react'; diff --git a/src/focal/FocalLengthOGTile.tsx b/src/focal/FocalLengthOGTile.tsx index 29e9af83..b7fc7782 100644 --- a/src/focal/FocalLengthOGTile.tsx +++ b/src/focal/FocalLengthOGTile.tsx @@ -2,7 +2,7 @@ import { Photo, PhotoDateRange } from '@/photo'; import { absolutePathForFocalLengthImage, pathForFocalLength, -} from '@/site/paths'; +} from '@/app-core/paths'; import OGTile from '@/components/OGTile'; import { descriptionForFocalLengthPhotos, titleForFocalLength } from '.'; diff --git a/src/focal/FocalLengthShareModal.tsx b/src/focal/FocalLengthShareModal.tsx index 5e7ee3e1..62d89cf2 100644 --- a/src/focal/FocalLengthShareModal.tsx +++ b/src/focal/FocalLengthShareModal.tsx @@ -1,4 +1,4 @@ -import { absolutePathForFocalLength } from '@/site/paths'; +import { absolutePathForFocalLength } from '@/app-core/paths'; import { PhotoSetAttributes } from '../photo'; import ShareModal from '@/share/ShareModal'; import FocalLengthOGTile from './FocalLengthOGTile'; diff --git a/src/focal/PhotoFocalLength.tsx b/src/focal/PhotoFocalLength.tsx index b242e43b..c457e291 100644 --- a/src/focal/PhotoFocalLength.tsx +++ b/src/focal/PhotoFocalLength.tsx @@ -1,4 +1,4 @@ -import { pathForFocalLength } from '@/site/paths'; +import { pathForFocalLength } from '@/app-core/paths'; import EntityLink, { EntityLinkExternalProps, } from '@/components/primitives/EntityLink'; diff --git a/src/focal/index.ts b/src/focal/index.ts index 6486f2c6..617bf113 100644 --- a/src/focal/index.ts +++ b/src/focal/index.ts @@ -7,7 +7,7 @@ import { import { absolutePathForFocalLength, absolutePathForFocalLengthImage, -} from '@/site/paths'; +} from '@/app-core/paths'; export type FocalLengths = { focal: number diff --git a/src/image-response/HomeImageResponse.tsx b/src/image-response/HomeImageResponse.tsx index 755d6708..d563f898 100644 --- a/src/image-response/HomeImageResponse.tsx +++ b/src/image-response/HomeImageResponse.tsx @@ -1,4 +1,4 @@ -import { SITE_DOMAIN_OR_TITLE } from '@/site/config'; +import { SITE_DOMAIN_OR_TITLE } from '@/app-core/config'; import { Photo } from '../photo'; import ImageCaption from './components/ImageCaption'; import ImageContainer from './components/ImageContainer'; diff --git a/src/image-response/PhotoImageResponse.tsx b/src/image-response/PhotoImageResponse.tsx index c636527f..22c9202e 100644 --- a/src/image-response/PhotoImageResponse.tsx +++ b/src/image-response/PhotoImageResponse.tsx @@ -3,7 +3,7 @@ import { AiFillApple } from 'react-icons/ai'; import ImageCaption from './components/ImageCaption'; import ImagePhotoGrid from './components/ImagePhotoGrid'; import ImageContainer from './components/ImageContainer'; -import { OG_TEXT_BOTTOM_ALIGNMENT } from '@/site/config'; +import { OG_TEXT_BOTTOM_ALIGNMENT } from '@/app-core/config'; import { NextImageSize } from '@/services/next-image'; import { cameraFromPhoto, formatCameraText } from '@/camera'; diff --git a/src/image-response/TemplateImageResponse.tsx b/src/image-response/TemplateImageResponse.tsx index a4ba9090..1954d722 100644 --- a/src/image-response/TemplateImageResponse.tsx +++ b/src/image-response/TemplateImageResponse.tsx @@ -1,6 +1,6 @@ import { Photo } from '../photo'; -import IconFeed from '@/site/IconFeed'; -import IconGrid from '@/site/IconGrid'; +import IconFeed from '@/app-core/IconFeed'; +import IconGrid from '@/app-core/IconGrid'; import ImagePhotoGrid from './components/ImagePhotoGrid'; import { NextImageSize } from '@/services/next-image'; diff --git a/src/image-response/components/ImageCaption.tsx b/src/image-response/components/ImageCaption.tsx index f025b837..8b52f32d 100644 --- a/src/image-response/components/ImageCaption.tsx +++ b/src/image-response/components/ImageCaption.tsx @@ -1,4 +1,4 @@ -import { OG_TEXT_BOTTOM_ALIGNMENT } from '@/site/config'; +import { OG_TEXT_BOTTOM_ALIGNMENT } from '@/app-core/config'; import { ReactNode } from 'react'; const GRADIENT_STOPS = 'rgba(0,0,0,0), rgba(0,0,0,0.3), rgba(0,0,0,0.7)'; diff --git a/src/image-response/components/ImagePhotoGrid.tsx b/src/image-response/components/ImagePhotoGrid.tsx index 57c570bd..758e4ff9 100644 --- a/src/image-response/components/ImagePhotoGrid.tsx +++ b/src/image-response/components/ImagePhotoGrid.tsx @@ -5,7 +5,7 @@ import { NextImageSize, getNextImageUrlForRequest, } from '@/services/next-image'; -import { IS_PREVIEW } from '@/site/config'; +import { IS_PREVIEW } from '@/app-core/config'; export default function ImagePhotoGrid({ photos, diff --git a/src/middleware.ts b/src/middleware.ts index ac78095a..a2534203 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -8,7 +8,7 @@ import { PATH_OG_SAMPLE, PREFIX_PHOTO, PREFIX_TAG, -} from './site/paths'; +} from './app-core/paths'; export default function middleware(req: NextRequest, res:NextResponse) { const pathname = req.nextUrl.pathname; diff --git a/src/photo/InfinitePhotoScroll.tsx b/src/photo/InfinitePhotoScroll.tsx index a42d41bf..71ddaedd 100644 --- a/src/photo/InfinitePhotoScroll.tsx +++ b/src/photo/InfinitePhotoScroll.tsx @@ -16,7 +16,7 @@ import { clsx } from 'clsx/lite'; import { useAppState } from '@/state/AppState'; import { GetPhotosOptions } from './db'; import useVisible from '@/utility/useVisible'; -import { ADMIN_DB_OPTIMIZE_ENABLED } from '@/site/config'; +import { ADMIN_DB_OPTIMIZE_ENABLED } from '@/app-core/config'; export type RevalidatePhoto = ( photoId: string, diff --git a/src/photo/PhotoEditPageClient.tsx b/src/photo/PhotoEditPageClient.tsx index 33b7bcec..e94af7de 100644 --- a/src/photo/PhotoEditPageClient.tsx +++ b/src/photo/PhotoEditPageClient.tsx @@ -2,7 +2,7 @@ import AdminChildPage from '@/components/AdminChildPage'; import { Photo } from '.'; -import { PATH_ADMIN_PHOTOS } from '@/site/paths'; +import { PATH_ADMIN_PHOTOS } from '@/app-core/paths'; import { PhotoFormData, convertPhotoToFormData } from './form'; import PhotoForm from './form/PhotoForm'; import { Tags } from '@/tag'; diff --git a/src/photo/PhotoEscapeHandler.tsx b/src/photo/PhotoEscapeHandler.tsx index cccc353c..86d7809a 100644 --- a/src/photo/PhotoEscapeHandler.tsx +++ b/src/photo/PhotoEscapeHandler.tsx @@ -1,6 +1,6 @@ 'use client'; -import { getEscapePath } from '@/site/paths'; +import { getEscapePath } from '@/app-core/paths'; import { useRouter, usePathname } from 'next/navigation'; import { useCallback } from 'react'; import useEscapeHandler from '../utility/useEscapeHandler'; diff --git a/src/photo/PhotoGrid.tsx b/src/photo/PhotoGrid.tsx index 98e86bd5..b69cd133 100644 --- a/src/photo/PhotoGrid.tsx +++ b/src/photo/PhotoGrid.tsx @@ -4,7 +4,7 @@ import { Photo, PhotoSetCategory } from '.'; import PhotoMedium from './PhotoMedium'; import { clsx } from 'clsx/lite'; import AnimateItems from '@/components/AnimateItems'; -import { GRID_ASPECT_RATIO } from '@/site/config'; +import { GRID_ASPECT_RATIO } from '@/app-core/config'; import { useAppState } from '@/state/AppState'; import SelectTileOverlay from '@/components/SelectTileOverlay'; import { JSX } from 'react'; diff --git a/src/photo/PhotoGridPage.tsx b/src/photo/PhotoGridPage.tsx index a3c40c22..2ec0d14d 100644 --- a/src/photo/PhotoGridPage.tsx +++ b/src/photo/PhotoGridPage.tsx @@ -4,7 +4,7 @@ import { Tags } from '@/tag'; import { Photo } from '.'; import { Cameras } from '@/camera'; import { FilmSimulations } from '@/simulation'; -import { PATH_GRID_INFERRED } from '@/site/paths'; +import { PATH_GRID_INFERRED } from '@/app-core/paths'; import PhotoGridSidebar from './PhotoGridSidebar'; import PhotoGridContainer from './PhotoGridContainer'; import { useEffect } from 'react'; diff --git a/src/photo/PhotoGridSidebar.tsx b/src/photo/PhotoGridSidebar.tsx index a7b1c412..5362c21e 100644 --- a/src/photo/PhotoGridSidebar.tsx +++ b/src/photo/PhotoGridSidebar.tsx @@ -15,7 +15,7 @@ import FavsTag from '../tag/FavsTag'; import { useAppState } from '@/state/AppState'; import { useMemo } from 'react'; import HiddenTag from '@/tag/HiddenTag'; -import { SITE_ABOUT } from '@/site/config'; +import { SITE_ABOUT } from '@/app-core/config'; import { htmlHasBrParagraphBreaks, safelyParseFormattedHtml, diff --git a/src/photo/PhotoLarge.tsx b/src/photo/PhotoLarge.tsx index f5754fa5..f45eadd9 100644 --- a/src/photo/PhotoLarge.tsx +++ b/src/photo/PhotoLarge.tsx @@ -15,7 +15,7 @@ import Link from 'next/link'; import { pathForFocalLength, pathForPhoto, -} from '@/site/paths'; +} from '@/app-core/paths'; import PhotoTags from '@/tag/PhotoTags'; import ShareButton from '@/share/ShareButton'; import DownloadButton from '@/components/DownloadButton'; @@ -29,7 +29,7 @@ import { SHOULD_PREFETCH_ALL_LINKS, ALLOW_PUBLIC_DOWNLOADS, SHOW_TAKEN_AT_TIME, -} from '@/site/config'; +} from '@/app-core/config'; import AdminPhotoMenuClient from '@/admin/AdminPhotoMenuClient'; import { RevalidatePhoto } from './InfinitePhotoScroll'; import { useRef } from 'react'; diff --git a/src/photo/PhotoLink.tsx b/src/photo/PhotoLink.tsx index 72269e2b..d17ff63b 100644 --- a/src/photo/PhotoLink.tsx +++ b/src/photo/PhotoLink.tsx @@ -5,7 +5,7 @@ import { Photo, PhotoSetCategory, titleForPhoto } from '@/photo'; import Link from 'next/link'; import { AnimationConfig } from '../components/AnimateItems'; import { useAppState } from '@/state/AppState'; -import { pathForPhoto } from '@/site/paths'; +import { pathForPhoto } from '@/app-core/paths'; import { clsx } from 'clsx/lite'; export default function PhotoLink({ diff --git a/src/photo/PhotoMedium.tsx b/src/photo/PhotoMedium.tsx index bd6e0a1a..a659213c 100644 --- a/src/photo/PhotoMedium.tsx +++ b/src/photo/PhotoMedium.tsx @@ -8,8 +8,8 @@ import { } from '.'; import ImageMedium from '@/components/image/ImageMedium'; import { clsx } from 'clsx/lite'; -import { pathForPhoto } from '@/site/paths'; -import { SHOULD_PREFETCH_ALL_LINKS } from '@/site/config'; +import { pathForPhoto } from '@/app-core/paths'; +import { SHOULD_PREFETCH_ALL_LINKS } from '@/app-core/config'; import { useRef } from 'react'; import useVisible from '@/utility/useVisible'; import LinkWithStatus from '@/components/LinkWithStatus'; diff --git a/src/photo/PhotoOGTile.tsx b/src/photo/PhotoOGTile.tsx index 913c97d8..58498834 100644 --- a/src/photo/PhotoOGTile.tsx +++ b/src/photo/PhotoOGTile.tsx @@ -4,7 +4,7 @@ import { descriptionForPhoto, titleForPhoto, } from '@/photo'; -import { absolutePathForPhotoImage, pathForPhoto } from '@/site/paths'; +import { absolutePathForPhotoImage, pathForPhoto } from '@/app-core/paths'; import OGTile from '@/components/OGTile'; export type OGLoadingState = 'unloaded' | 'loading' | 'loaded' | 'failed'; diff --git a/src/photo/PhotoPrevNext.tsx b/src/photo/PhotoPrevNext.tsx index fb69ba74..0808cf1c 100644 --- a/src/photo/PhotoPrevNext.tsx +++ b/src/photo/PhotoPrevNext.tsx @@ -9,7 +9,7 @@ import { } from '@/photo'; import PhotoLink from './PhotoLink'; import { useRouter } from 'next/navigation'; -import { pathForPhoto } from '@/site/paths'; +import { pathForPhoto } from '@/app-core/paths'; import { useAppState } from '@/state/AppState'; import { AnimationConfig } from '@/components/AnimateItems'; import { clsx } from 'clsx/lite'; diff --git a/src/photo/PhotoShareModal.tsx b/src/photo/PhotoShareModal.tsx index 047b5b0e..851dcb4e 100644 --- a/src/photo/PhotoShareModal.tsx +++ b/src/photo/PhotoShareModal.tsx @@ -1,5 +1,5 @@ import PhotoOGTile from '@/photo/PhotoOGTile'; -import { absolutePathForPhoto } from '@/site/paths'; +import { absolutePathForPhoto } from '@/app-core/paths'; import { Photo, PhotoSetCategory } from '.'; import ShareModal from '@/share/ShareModal'; diff --git a/src/photo/PhotoSmall.tsx b/src/photo/PhotoSmall.tsx index 2c5291c8..dec8780c 100644 --- a/src/photo/PhotoSmall.tsx +++ b/src/photo/PhotoSmall.tsx @@ -7,8 +7,8 @@ import { import ImageSmall from '@/components/image/ImageSmall'; import Link from 'next/link'; import { clsx } from 'clsx/lite'; -import { pathForPhoto } from '@/site/paths'; -import { SHOULD_PREFETCH_ALL_LINKS } from '@/site/config'; +import { pathForPhoto } from '@/app-core/paths'; +import { SHOULD_PREFETCH_ALL_LINKS } from '@/app-core/config'; import { useRef } from 'react'; import useVisible from '@/utility/useVisible'; diff --git a/src/photo/PhotoUpload.tsx b/src/photo/PhotoUpload.tsx index 836d5d13..338e584a 100644 --- a/src/photo/PhotoUpload.tsx +++ b/src/photo/PhotoUpload.tsx @@ -3,7 +3,7 @@ import { useState } from 'react'; import { uploadPhotoFromClient } from '@/services/storage'; import { useRouter } from 'next/navigation'; -import { PATH_ADMIN_UPLOADS, pathForAdminUploadUrl } from '@/site/paths'; +import { PATH_ADMIN_UPLOADS, pathForAdminUploadUrl } from '@/app-core/paths'; import ImageInput from '../components/ImageInput'; import { clsx } from 'clsx/lite'; diff --git a/src/photo/PhotosEmptyState.tsx b/src/photo/PhotosEmptyState.tsx index c3b36166..7386b2b0 100644 --- a/src/photo/PhotosEmptyState.tsx +++ b/src/photo/PhotosEmptyState.tsx @@ -1,9 +1,9 @@ import AdminCTA from '@/admin/AdminCTA'; import Container from '@/components/Container'; import SiteGrid from '@/components/SiteGrid'; -import { IS_SITE_READY } from '@/site/config'; -import { PATH_ADMIN_CONFIGURATION } from '@/site/paths'; -import SiteChecklist from '@/site/SiteChecklist'; +import { IS_SITE_READY } from '@/app-core/config'; +import { PATH_ADMIN_CONFIGURATION } from '@/app-core/paths'; +import AdminAppConfiguration from '@/admin/AdminAppConfiguration'; import { clsx } from 'clsx/lite'; import Link from 'next/link'; import { HiOutlinePhotograph } from 'react-icons/hi'; @@ -27,7 +27,7 @@ export default function PhotosEmptyState() { {!IS_SITE_READY ? 'Finish Setup' : 'Setup Complete!'}
{!IS_SITE_READY - ? + ? :
diff --git a/src/photo/PhotosLargeInfinite.tsx b/src/photo/PhotosLargeInfinite.tsx index 8309d6a0..1b2b72b9 100644 --- a/src/photo/PhotosLargeInfinite.tsx +++ b/src/photo/PhotosLargeInfinite.tsx @@ -1,6 +1,6 @@ 'use client'; -import { PATH_FEED_INFERRED } from '@/site/paths'; +import { PATH_FEED_INFERRED } from '@/app-core/paths'; import InfinitePhotoScroll from './InfinitePhotoScroll'; import PhotosLarge from './PhotosLarge'; diff --git a/src/photo/StaggeredOgPhotosInfinite.tsx b/src/photo/StaggeredOgPhotosInfinite.tsx index f568bbc3..2d9de205 100644 --- a/src/photo/StaggeredOgPhotosInfinite.tsx +++ b/src/photo/StaggeredOgPhotosInfinite.tsx @@ -1,6 +1,6 @@ 'use client'; -import { PATH_OG } from '@/site/paths'; +import { PATH_OG } from '@/app-core/paths'; import InfinitePhotoScroll from './InfinitePhotoScroll'; import StaggeredOgPhotos from './StaggeredOgPhotos'; diff --git a/src/photo/UploadPageClient.tsx b/src/photo/UploadPageClient.tsx index 27e612d8..e8355af3 100644 --- a/src/photo/UploadPageClient.tsx +++ b/src/photo/UploadPageClient.tsx @@ -1,7 +1,7 @@ 'use client'; import AdminChildPage from '@/components/AdminChildPage'; -import { PATH_ADMIN_UPLOADS } from '@/site/paths'; +import { PATH_ADMIN_UPLOADS } from '@/app-core/paths'; import { PhotoFormData, generateTakenAtFields } from './form'; import PhotoForm from './form/PhotoForm'; import { Tags } from '@/tag'; diff --git a/src/photo/actions.ts b/src/photo/actions.ts index 86bc203a..ed728cd3 100644 --- a/src/photo/actions.ts +++ b/src/photo/actions.ts @@ -33,7 +33,7 @@ import { PATH_ADMIN_TAGS, PATH_ROOT, pathForPhoto, -} from '@/site/paths'; +} from '@/app-core/paths'; import { blurImageFromUrl, extractImageDataFromBlobPath } from './server'; import { TAG_FAVS, isTagFavs } from '@/tag'; import { convertPhotoToPhotoDbInsert, Photo } from '.'; @@ -44,7 +44,7 @@ import { AI_TEXT_AUTO_GENERATED_FIELDS, AI_TEXT_GENERATION_ENABLED, BLUR_ENABLED, -} from '@/site/config'; +} from '@/app-core/config'; import { generateAiImageQueries } from './ai/server'; import { createStreamableValue } from 'ai/rsc'; import { convertUploadToPhoto } from './storage'; diff --git a/src/photo/cache.ts b/src/photo/cache.ts index 6452d8f6..4d3c3fa8 100644 --- a/src/photo/cache.ts +++ b/src/photo/cache.ts @@ -31,7 +31,7 @@ import { PREFIX_FILM_SIMULATION, PREFIX_TAG, pathForPhoto, -} from '@/site/paths'; +} from '@/app-core/paths'; import { createLensKey } from '@/lens'; // Table key diff --git a/src/photo/data.ts b/src/photo/data.ts index fa674b4a..47837a3f 100644 --- a/src/photo/data.ts +++ b/src/photo/data.ts @@ -8,7 +8,7 @@ import { getUniqueFilmSimulations, getUniqueTags, } from '@/photo/db/query'; -import { SHOW_FILM_SIMULATIONS } from '@/site/config'; +import { SHOW_FILM_SIMULATIONS } from '@/app-core/config'; import { sortTagsObject } from '@/tag'; export const getPhotoSidebarData = () => [ diff --git a/src/photo/db/index.ts b/src/photo/db/index.ts index e150a538..72ba97a8 100644 --- a/src/photo/db/index.ts +++ b/src/photo/db/index.ts @@ -1,4 +1,4 @@ -import { PRIORITY_ORDER_ENABLED } from '@/site/config'; +import { PRIORITY_ORDER_ENABLED } from '@/app-core/config'; import { parameterize } from '@/utility/string'; import { PhotoSetCategory } from '..'; diff --git a/src/photo/db/query.ts b/src/photo/db/query.ts index f4177276..8936060a 100644 --- a/src/photo/db/query.ts +++ b/src/photo/db/query.ts @@ -14,7 +14,7 @@ import { import { Cameras, createCameraKey } from '@/camera'; import { Tags } from '@/tag'; import { FilmSimulation, FilmSimulations } from '@/simulation'; -import { ADMIN_SQL_DEBUG_ENABLED } from '@/site/config'; +import { ADMIN_SQL_DEBUG_ENABLED } from '@/app-core/config'; import { GetPhotosOptions, getLimitAndOffsetFromOptions, diff --git a/src/photo/form/PhotoForm.tsx b/src/photo/form/PhotoForm.tsx index 5b480509..d132021a 100644 --- a/src/photo/form/PhotoForm.tsx +++ b/src/photo/form/PhotoForm.tsx @@ -15,7 +15,7 @@ import { createPhotoAction, updatePhotoAction } from '../actions'; import SubmitButtonWithStatus from '@/components/SubmitButtonWithStatus'; import Link from 'next/link'; import { clsx } from 'clsx/lite'; -import { PATH_ADMIN_PHOTOS, PATH_ADMIN_UPLOADS } from '@/site/paths'; +import { PATH_ADMIN_PHOTOS, PATH_ADMIN_UPLOADS } from '@/app-core/paths'; import { toastSuccess, toastWarning } from '@/toast'; import { getDimensionsFromSize } from '@/utility/size'; import ImageWithFallback from '@/components/image/ImageWithFallback'; @@ -27,7 +27,7 @@ import usePreventNavigation from '@/utility/usePreventNavigation'; import { useAppState } from '@/state/AppState'; import UpdateBlurDataButton from '../UpdateBlurDataButton'; import { getNextImageUrlForManipulation } from '@/services/next-image'; -import { BLUR_ENABLED, IS_PREVIEW } from '@/site/config'; +import { BLUR_ENABLED, IS_PREVIEW } from '@/app-core/config'; import { PhotoDbInsert } from '..'; import ErrorNote from '@/components/ErrorNote'; diff --git a/src/photo/form/index.ts b/src/photo/form/index.ts index 58711d2d..571b3c2e 100644 --- a/src/photo/form/index.ts +++ b/src/photo/form/index.ts @@ -21,7 +21,7 @@ import { MAKE_FUJIFILM, } from '@/vendors/fujifilm'; import { FilmSimulation } from '@/simulation'; -import { GEO_PRIVACY_ENABLED } from '@/site/config'; +import { GEO_PRIVACY_ENABLED } from '@/app-core/config'; import { TAG_FAVS, getValidationMessageForTags } from '@/tag'; type VirtualFields = 'favorite'; diff --git a/src/photo/index.ts b/src/photo/index.ts index e58a38db..cf4ec16d 100644 --- a/src/photo/index.ts +++ b/src/photo/index.ts @@ -3,8 +3,12 @@ import { formatFocalLength } from '@/focal'; import { Lens } from '@/lens'; import { getNextImageUrlForRequest } from '@/services/next-image'; import { FilmSimulation } from '@/simulation'; -import { HIGH_DENSITY_GRID, IS_PREVIEW, SHOW_EXIF_DATA } from '@/site/config'; -import { ABSOLUTE_PATH_FOR_HOME_IMAGE } from '@/site/paths'; +import { + HIGH_DENSITY_GRID, + IS_PREVIEW, + SHOW_EXIF_DATA, +} from '@/app-core/config'; +import { ABSOLUTE_PATH_FOR_HOME_IMAGE } from '@/app-core/paths'; import { formatDate, formatDateFromPostgresString } from '@/utility/date'; import { formatAperture, diff --git a/src/photo/server.ts b/src/photo/server.ts index 3708395a..4b1d9233 100644 --- a/src/photo/server.ts +++ b/src/photo/server.ts @@ -11,7 +11,10 @@ import { ExifData, ExifParserFactory } from 'ts-exif-parser'; import { PhotoFormData } from './form'; import { FilmSimulation } from '@/simulation'; import sharp, { Sharp } from 'sharp'; -import { GEO_PRIVACY_ENABLED, PRESERVE_ORIGINAL_UPLOADS } from '@/site/config'; +import { + GEO_PRIVACY_ENABLED, + PRESERVE_ORIGINAL_UPLOADS, +} from '@/app-core/config'; const IMAGE_WIDTH_RESIZE = 200; const IMAGE_WIDTH_BLUR = 200; diff --git a/src/services/next-image.ts b/src/services/next-image.ts index 682130d1..93f8e7a2 100644 --- a/src/services/next-image.ts +++ b/src/services/next-image.ts @@ -2,7 +2,7 @@ import { BASE_URL, VERCEL_BYPASS_KEY, VERCEL_BYPASS_SECRET, -} from '@/site/config'; +} from '@/app-core/config'; // Explicity defined next.config.js `imageSizes` type NextCustomSize = 200; diff --git a/src/services/openai.ts b/src/services/openai.ts index 72d33a94..7ef64c83 100644 --- a/src/services/openai.ts +++ b/src/services/openai.ts @@ -3,7 +3,7 @@ import { createStreamableValue } from 'ai/rsc'; import { createOpenAI } from '@ai-sdk/openai'; import { kv } from '@vercel/kv'; import { Ratelimit } from '@upstash/ratelimit'; -import { AI_TEXT_GENERATION_ENABLED, HAS_VERCEL_KV } from '@/site/config'; +import { AI_TEXT_GENERATION_ENABLED, HAS_VERCEL_KV } from '@/app-core/config'; import { removeBase64Prefix } from '@/utility/image'; import { cleanUpAiTextResponse } from '@/photo/ai'; diff --git a/src/services/postgres.ts b/src/services/postgres.ts index 27d1fd3c..439e56ab 100644 --- a/src/services/postgres.ts +++ b/src/services/postgres.ts @@ -1,4 +1,4 @@ -import { POSTGRES_SSL_ENABLED } from '@/site/config'; +import { POSTGRES_SSL_ENABLED } from '@/app-core/config'; import { Pool, QueryResult, QueryResultRow } from 'pg'; const pool = new Pool({ diff --git a/src/services/storage/index.ts b/src/services/storage/index.ts index e773b3b9..364c4ba6 100644 --- a/src/services/storage/index.ts +++ b/src/services/storage/index.ts @@ -19,7 +19,7 @@ import { HAS_AWS_S3_STORAGE, HAS_VERCEL_BLOB_STORAGE, HAS_CLOUDFLARE_R2_STORAGE, -} from '@/site/config'; +} from '@/app-core/config'; import { generateNanoid } from '@/utility/nanoid'; import { CLOUDFLARE_R2_BASE_URL_PUBLIC, @@ -29,7 +29,7 @@ import { cloudflareR2Put, isUrlFromCloudflareR2, } from './cloudflare-r2'; -import { PATH_API_PRESIGNED_URL } from '@/site/paths'; +import { PATH_API_PRESIGNED_URL } from '@/app-core/paths'; export const generateStorageId = () => generateNanoid(16); diff --git a/src/services/storage/vercel-blob.ts b/src/services/storage/vercel-blob.ts index 1955488b..6abfefb5 100644 --- a/src/services/storage/vercel-blob.ts +++ b/src/services/storage/vercel-blob.ts @@ -1,4 +1,4 @@ -import { PATH_API_VERCEL_BLOB_UPLOAD } from '@/site/paths'; +import { PATH_API_VERCEL_BLOB_UPLOAD } from '@/app-core/paths'; import { copy, del, list, put } from '@vercel/blob'; import { upload } from '@vercel/blob/client'; import { fileNameForStorageUrl } from '.'; diff --git a/src/share/ShareModal.tsx b/src/share/ShareModal.tsx index d1768da9..6301a07a 100644 --- a/src/share/ShareModal.tsx +++ b/src/share/ShareModal.tsx @@ -8,7 +8,7 @@ import { JSX, ReactNode, useEffect } from 'react'; import { shortenUrl } from '@/utility/url'; import { toastSuccess } from '@/toast'; import { PiXLogo } from 'react-icons/pi'; -import { SHOW_SOCIAL } from '@/site/config'; +import { SHOW_SOCIAL } from '@/app-core/config'; import { generateXPostText } from '@/utility/social'; import { useAppState } from '@/state/AppState'; import useOnPathChange from '@/utility/useOnPathChange'; diff --git a/src/share/index.ts b/src/share/index.ts index 5642d168..fabc9f01 100644 --- a/src/share/index.ts +++ b/src/share/index.ts @@ -5,7 +5,7 @@ import { absolutePathForFocalLengthImage, absolutePathForPhotoImage, absolutePathForTagImage, -} from '@/site/paths'; +} from '@/app-core/paths'; export type ShareModalProps = Omit & { photo?: Photo diff --git a/src/simulation/FilmSimulationOGTile.tsx b/src/simulation/FilmSimulationOGTile.tsx index 1233a3e4..1f894877 100644 --- a/src/simulation/FilmSimulationOGTile.tsx +++ b/src/simulation/FilmSimulationOGTile.tsx @@ -2,7 +2,7 @@ import { Photo, PhotoDateRange } from '@/photo'; import { absolutePathForFilmSimulationImage, pathForFilmSimulation, -} from '@/site/paths'; +} from '@/app-core/paths'; import OGTile from '@/components/OGTile'; import { FilmSimulation, diff --git a/src/simulation/FilmSimulationShareModal.tsx b/src/simulation/FilmSimulationShareModal.tsx index a1c64012..e8ca9691 100644 --- a/src/simulation/FilmSimulationShareModal.tsx +++ b/src/simulation/FilmSimulationShareModal.tsx @@ -1,4 +1,4 @@ -import { absolutePathForFilmSimulation } from '@/site/paths'; +import { absolutePathForFilmSimulation } from '@/app-core/paths'; import { PhotoSetAttributes } from '../photo'; import ShareModal from '@/share/ShareModal'; import FilmSimulationOGTile from './FilmSimulationOGTile'; diff --git a/src/simulation/PhotoFilmSimulation.tsx b/src/simulation/PhotoFilmSimulation.tsx index bd7ee7dc..f85e5fc4 100644 --- a/src/simulation/PhotoFilmSimulation.tsx +++ b/src/simulation/PhotoFilmSimulation.tsx @@ -1,6 +1,6 @@ import { labelForFilmSimulation } from '@/vendors/fujifilm'; import PhotoFilmSimulationIcon from './PhotoFilmSimulationIcon'; -import { pathForFilmSimulation } from '@/site/paths'; +import { pathForFilmSimulation } from '@/app-core/paths'; import { FilmSimulation } from '.'; import EntityLink, { EntityLinkExternalProps, diff --git a/src/simulation/index.ts b/src/simulation/index.ts index 51b63dbd..5293848d 100644 --- a/src/simulation/index.ts +++ b/src/simulation/index.ts @@ -7,7 +7,7 @@ import { import { absolutePathForFilmSimulation, absolutePathForFilmSimulationImage, -} from '@/site/paths'; +} from '@/app-core/paths'; import { FujifilmSimulation, labelForFilmSimulation, diff --git a/src/site/SiteChecklist.tsx b/src/site/SiteChecklist.tsx deleted file mode 100644 index 935d0f9c..00000000 --- a/src/site/SiteChecklist.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { Suspense } from 'react'; -import { CONFIG_CHECKLIST_STATUS } from '@/site/config'; -import SiteChecklistServer from './SiteChecklistServer'; -import SiteChecklistClient from './SiteChecklistClient'; - -export default function SiteChecklist({ - simplifiedView, -}: { - simplifiedView?: boolean -}) { - return ( - }> - - - ); -} diff --git a/src/state/AppStateProvider.tsx b/src/state/AppStateProvider.tsx index 39e7382e..3a675954 100644 --- a/src/state/AppStateProvider.tsx +++ b/src/state/AppStateProvider.tsx @@ -10,7 +10,7 @@ import { HIGH_DENSITY_GRID, MATTE_PHOTOS, SHOW_ZOOM_CONTROLS, -} from '@/site/config'; +} from '@/app-core/config'; import { getPhotosHiddenMetaCachedAction } from '@/photo/actions'; import { ShareModalProps } from '@/share'; import { storeTimezoneCookie } from '@/utility/timezone'; diff --git a/src/tag/FavsTag.tsx b/src/tag/FavsTag.tsx index 60f76ced..d8df8183 100644 --- a/src/tag/FavsTag.tsx +++ b/src/tag/FavsTag.tsx @@ -1,6 +1,6 @@ import { FaStar } from 'react-icons/fa'; import { TAG_FAVS } from '.'; -import { pathForTag } from '@/site/paths'; +import { pathForTag } from '@/app-core/paths'; import { clsx } from 'clsx/lite'; import EntityLink, { EntityLinkExternalProps, diff --git a/src/tag/HiddenTag.tsx b/src/tag/HiddenTag.tsx index 9727abff..c9176bea 100644 --- a/src/tag/HiddenTag.tsx +++ b/src/tag/HiddenTag.tsx @@ -1,5 +1,5 @@ import { TAG_HIDDEN } from '.'; -import { pathForTag } from '@/site/paths'; +import { pathForTag } from '@/app-core/paths'; import EntityLink, { EntityLinkExternalProps, } from '@/components/primitives/EntityLink'; diff --git a/src/tag/PhotoTag.tsx b/src/tag/PhotoTag.tsx index fb4acbf5..8ffd6657 100644 --- a/src/tag/PhotoTag.tsx +++ b/src/tag/PhotoTag.tsx @@ -1,4 +1,4 @@ -import { pathForTag } from '@/site/paths'; +import { pathForTag } from '@/app-core/paths'; import { FaTag } from 'react-icons/fa'; import { formatTag } from '.'; import EntityLink, { diff --git a/src/tag/TagForm.tsx b/src/tag/TagForm.tsx index 30608287..bad08222 100644 --- a/src/tag/TagForm.tsx +++ b/src/tag/TagForm.tsx @@ -2,7 +2,7 @@ import SubmitButtonWithStatus from '@/components/SubmitButtonWithStatus'; import Link from 'next/link'; -import { PATH_ADMIN_TAGS } from '@/site/paths'; +import { PATH_ADMIN_TAGS } from '@/app-core/paths'; import FieldSetWithStatus from '@/components/FieldSetWithStatus'; import { ReactNode, useMemo, useState } from 'react'; import { renamePhotoTagGloballyAction } from '@/photo/actions'; diff --git a/src/tag/TagOGTile.tsx b/src/tag/TagOGTile.tsx index e3295ea8..4026fb05 100644 --- a/src/tag/TagOGTile.tsx +++ b/src/tag/TagOGTile.tsx @@ -1,5 +1,5 @@ import { Photo, PhotoDateRange } from '@/photo'; -import { absolutePathForTagImage, pathForTag } from '@/site/paths'; +import { absolutePathForTagImage, pathForTag } from '@/app-core/paths'; import OGTile from '@/components/OGTile'; import { descriptionForTaggedPhotos, titleForTag } from '.'; diff --git a/src/tag/TagShareModal.tsx b/src/tag/TagShareModal.tsx index 5d7f9250..b0223bf6 100644 --- a/src/tag/TagShareModal.tsx +++ b/src/tag/TagShareModal.tsx @@ -1,4 +1,4 @@ -import { absolutePathForTag } from '@/site/paths'; +import { absolutePathForTag } from '@/app-core/paths'; import { PhotoSetAttributes } from '../photo'; import ShareModal from '@/share/ShareModal'; import TagOGTile from './TagOGTile'; diff --git a/src/tag/index.ts b/src/tag/index.ts index aafa1c72..447ee702 100644 --- a/src/tag/index.ts +++ b/src/tag/index.ts @@ -8,7 +8,7 @@ import { absolutePathForTag, absolutePathForTagImage, getPathComponents, -} from '@/site/paths'; +} from '@/app-core/paths'; import { capitalizeWords, convertStringToArray, diff --git a/src/site/useMetaThemeColor.ts b/src/utility/useMetaThemeColor.ts similarity index 100% rename from src/site/useMetaThemeColor.ts rename to src/utility/useMetaThemeColor.ts diff --git a/src/utility/vercel.ts b/src/utility/vercel.ts index fd788f11..0986f6bc 100644 --- a/src/utility/vercel.ts +++ b/src/utility/vercel.ts @@ -2,7 +2,7 @@ import { IS_PREVIEW, VERCEL_BYPASS_KEY, VERCEL_BYPASS_SECRET, -} from '@/site/config'; +} from '@/app-core/config'; export const fetchWithBypass: typeof fetch = (url, options) => IS_PREVIEW && VERCEL_BYPASS_SECRET