Refactor app/site/admin code paths

This commit is contained in:
Sam Becker 2025-02-11 18:06:15 -06:00
parent 1781a5e9c5
commit a174654297
145 changed files with 341 additions and 277 deletions

View File

@ -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 () => {

View File

@ -12,7 +12,7 @@ import {
isPathProtected,
isPathTag,
isPathTagPhoto,
} from '@/site/paths';
} from '@/app-core/paths';
import { TAG_HIDDEN } from '@/tag';
const PHOTO_ID = 'UsKSGcbt';

View File

@ -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,

View File

@ -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 (
<Suspense fallback={<AdminAppConfigurationClient {...{
...APP_CONFIGURATION,
isAnalyzingConfiguration: true,
simplifiedView,
}} /> }>
<AdminAppConfigurationServer {...{ simplifiedView }} />
</Suspense>
);
}

View File

@ -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 (
<div className="max-w-xl w-full">
<div className="space-y-3 -mt-3">
<Checklist
<ChecklistGroup
title="Storage"
icon={<BiData size={16} />}
>
@ -300,8 +300,8 @@ export default function SiteChecklistClient({
)}
</>)}
</ChecklistRow>
</Checklist>
<Checklist
</ChecklistGroup>
<ChecklistGroup
title="Authentication"
icon={<BiLockAlt size={16} />}
>
@ -331,8 +331,8 @@ export default function SiteChecklistClient({
'ADMIN_PASSWORD',
])}
</ChecklistRow>
</Checklist>
<Checklist
</ChecklistGroup>
<ChecklistGroup
title="Content"
icon={<BiPencil size={16} />}
>
@ -373,9 +373,9 @@ export default function SiteChecklistClient({
Store in environment variable (seen in grid sidebar):
{renderEnvVars(['NEXT_PUBLIC_SITE_ABOUT'])}
</ChecklistRow>
</Checklist>
</ChecklistGroup>
{!simplifiedView && <>
<Checklist
<ChecklistGroup
title="AI text generation"
titleShort="AI"
icon={<HiSparkles />}
@ -429,8 +429,8 @@ export default function SiteChecklistClient({
(default: {'"title, tags, semantic"'}):
{renderEnvVars(['AI_TEXT_AUTO_GENERATED_FIELDS'])}
</ChecklistRow>
</Checklist>
<Checklist
</ChecklistGroup>
<ChecklistGroup
title="Performance"
icon={<RiSpeedMiniLine size={18} />}
optional
@ -490,8 +490,8 @@ export default function SiteChecklistClient({
image blur data being stored and displayed:
{renderEnvVars(['NEXT_PUBLIC_BLUR_DISABLED'])}
</ChecklistRow>
</Checklist>
<Checklist
</ChecklistGroup>
<ChecklistGroup
title="Visual"
icon={<PiPaintBrushHousehold size={19} />}
optional
@ -518,8 +518,8 @@ export default function SiteChecklistClient({
of each photo, and display a surrounding border:
{renderEnvVars(['NEXT_PUBLIC_MATTE_PHOTOS'])}
</ChecklistRow>
</Checklist>
<Checklist
</ChecklistGroup>
<ChecklistGroup
title="Display"
icon={<BiHide size={18} />}
optional
@ -578,8 +578,8 @@ export default function SiteChecklistClient({
Set environment variable to {'"1"'} to hide footer link:
{renderEnvVars(['NEXT_PUBLIC_HIDE_REPO_LINK'])}
</ChecklistRow>
</Checklist>
<Checklist
</ChecklistGroup>
<ChecklistGroup
title="Grid"
icon={<IoMdGrid size={17} />}
optional
@ -613,8 +613,8 @@ export default function SiteChecklistClient({
aspect ratio):
{renderEnvVars(['NEXT_PUBLIC_SHOW_LARGE_THUMBNAILS'])}
</ChecklistRow>
</Checklist>
<Checklist
</ChecklistGroup>
<ChecklistGroup
title="Settings"
icon={<HiOutlineCog size={17} className="translate-y-[0.5px]" />}
optional
@ -664,9 +664,9 @@ export default function SiteChecklistClient({
keep OG image text bottom aligned (default is {'"top"'}):
{renderEnvVars(['NEXT_PUBLIC_OG_TEXT_ALIGNMENT'])}
</ChecklistRow>
</Checklist>
</ChecklistGroup>
{areInternalToolsEnabled &&
<Checklist
<ChecklistGroup
title="Internal"
icon={<CgDebug size={16} />}
optional
@ -698,7 +698,7 @@ export default function SiteChecklistClient({
console output for all sql queries:
{renderEnvVars(['ADMIN_SQL_DEBUG'])}
</ChecklistRow>
</Checklist>}
</ChecklistGroup>}
</>}
</div>
<div className="pl-11 pr-2 sm:pr-11 mt-4 md:mt-7">

View File

@ -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 (
<SiteChecklistClient {...{
...CONFIG_CHECKLIST_STATUS,
<AdminAppConfigurationClient {...{
...APP_CONFIGURATION,
...connectionErrors,
simplifiedView,
}} />

View File

@ -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 (
<AdminAppInsightsClient
photosCount={count}
tagsCount={tags.length}
camerasCount={cameras.length}
filmSimulationsCount={filmSimulations.length}
lensesCount={lenses.length}
dateRange={dateRange}
recommendations={{
fork: true,
forkBehind: true,
ai: isAiTextGenerationEnabled,
aiRateLimiting: isAiTextGenerationEnabled && !hasVercelBlobStorage,
}}
photoStats={{
photosCount: count,
tagsCount: tags.length,
camerasCount: cameras.length,
filmSimulationsCount: filmSimulations.length,
lensesCount: lenses.length,
dateRange,
}}
debug={IS_DEVELOPMENT}
/>
);
}

View File

@ -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<Recommendation, boolean>,
photoStats: {
photosCount: number
tagsCount: number
camerasCount: number
filmSimulationsCount: number
lensesCount: number
dateRange?: PhotoDateRange
},
debug?: boolean,
}) {
const { descriptionWithSpaces } = dateRangeForPhotos(undefined, dateRange);
const renderTitle = (title: string) =>
<div className={clsx(
'text-center uppercase font-bold tracking-wide',
'text-medium',
)}>
{title}
</div>;
return (
<div className={clsx(
'flex flex-col items-center justify-center gap-4',
'flex flex-col items-center',
'mt-2 mb-6',
)}>
<div className="text-center text-main uppercase font-bold tracking-wide">
Template Recommendations
</div>
<Note
icon={<FaCodeFork />}
className="w-[clamp(300px,80%,1000px)] m-auto"
>
Consider forking this repository in order to
receive new features and fixes
</Note>
<div className="text-center text-main uppercase font-bold tracking-wide">
Library Stats
</div>
<div className={clsx(
'grid grid-cols-2 gap-3 uppercase',
'border border-main rounded-md p-6 bg-main shadow-xs',
'w-[clamp(300px,80%,1000px)]',
'w-[clamp(400px,80%,1000px)]',
'space-y-4 md:space-y-6',
)}>
<div className="tracking-wide">Photos</div>
<div className="text-right">{photosCount}</div>
<div className="tracking-wide">Tags</div>
<div className="text-right">{tagsCount}</div>
<div className="tracking-wide">Cameras</div>
<div className="text-right">{camerasCount}</div>
<div className="tracking-wide">Films</div>
<div className="text-right">{filmSimulationsCount}</div>
<div className="tracking-wide">Lenses</div>
<div className="text-right">{lensesCount}</div>
<span className="text-center col-span-2">
{descriptionWithSpaces}
</span>
{renderTitle('Code Observability')}
{(fork || debug) &&
<Note icon={<IconGrSync />}>
Consider forking this repository in order to
receive new features and fixes
</Note>}
{(forkBehind || debug) &&
<WarningNote>
This fork is 9 commits behind
</WarningNote>}
{renderTitle('Template Recommendations')}
{(ai || debug) && <Note icon={<HiSparkles />}>
Enable AI text generation in the app configuration
</Note>}
{(aiRateLimiting || debug) && <WarningNote>
Consider enabling rate limiting to mitigate AI abuse
</WarningNote>}
{renderTitle('Library Stats')}
<div className={clsx(
'grid grid-cols-2 gap-3 w-full',
'border border-main rounded-md p-6 bg-main shadow-xs',
'uppercase',
)}>
<div className="tracking-wide">Photos</div>
<div className="text-right">{photosCount}</div>
<div className="tracking-wide">Tags</div>
<div className="text-right">{tagsCount}</div>
<div className="tracking-wide">Cameras</div>
<div className="text-right">{camerasCount}</div>
<div className="tracking-wide">Films</div>
<div className="text-right">{filmSimulationsCount}</div>
<div className="tracking-wide">Lenses</div>
<div className="text-right">{lensesCount}</div>
<span className="text-center col-span-2">
{descriptionWithSpaces}
</span>
</div>
</div>
</div>
);

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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() {

View File

@ -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';

View File

@ -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';

View File

@ -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 {

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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({

View File

@ -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';

View File

@ -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';

View File

@ -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,

View File

@ -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

View File

@ -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() {

View File

@ -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';

View File

@ -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';

View File

@ -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 {

View File

@ -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';

View File

@ -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;

View File

@ -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 (
<AdminInfoPage
title="App Configuration"
accessory={<ClearCacheButton />}
>
<SiteChecklist />
<AdminAppConfiguration />
</AdminInfoPage>
);
}

View File

@ -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 <AdminInfoPage

View File

@ -1,7 +1,7 @@
import { getPhotos } from '@/photo/db/query';
import { OUTDATED_THRESHOLD } from '@/photo';
import AdminOutdatedClient from '@/admin/AdminOutdatedClient';
import { AI_TEXT_GENERATION_ENABLED } from '@/site/config';
import { AI_TEXT_GENERATION_ENABLED } from '@/app-core/config';
export const maxDuration = 60;

View File

@ -1,12 +1,12 @@
import { redirect } from 'next/navigation';
import { getPhotoNoStore, getUniqueTagsCached } from '@/photo/cache';
import { PATH_ADMIN } from '@/site/paths';
import { PATH_ADMIN } from '@/app-core/paths';
import PhotoEditPageClient from '@/photo/PhotoEditPageClient';
import {
AI_TEXT_GENERATION_ENABLED,
BLUR_ENABLED,
IS_PREVIEW,
} from '@/site/config';
} from '@/app-core/config';
import { blurImageFromUrl, resizeImageFromUrl } from '@/photo/server';
import { getNextImageUrlForManipulation } from '@/services/next-image';

View File

@ -2,7 +2,7 @@ import AdminChildPage from '@/components/AdminChildPage';
import { redirect } from 'next/navigation';
import { getPhotosCached } from '@/photo/cache';
import TagForm from '@/tag/TagForm';
import { PATH_ADMIN, PATH_ADMIN_TAGS, pathForTag } from '@/site/paths';
import { PATH_ADMIN, PATH_ADMIN_TAGS, pathForTag } from '@/app-core/paths';
import PhotoLightbox from '@/photo/PhotoLightbox';
import { getPhotosMeta } from '@/photo/db/query';
import AdminTagBadge from '@/admin/AdminTagBadge';

View File

@ -1,4 +1,4 @@
import { PATH_ADMIN } from '@/site/paths';
import { PATH_ADMIN } from '@/app-core/paths';
import { extractImageDataFromBlobPath } from '@/photo/server';
import { redirect } from 'next/navigation';
import { getUniqueTagsCached } from '@/photo/cache';
@ -7,7 +7,7 @@ import {
AI_TEXT_AUTO_GENERATED_FIELDS,
AI_TEXT_GENERATION_ENABLED,
BLUR_ENABLED,
} from '@/site/config';
} from '@/app-core/config';
import ErrorNote from '@/components/ErrorNote';
export const maxDuration = 60;

View File

@ -1,10 +1,10 @@
import { getPhotosCached } from '@/photo/cache';
import { API_PHOTO_REQUEST_LIMIT, formatPhotoForApi } from '@/site/api';
import { API_PHOTO_REQUEST_LIMIT, formatPhotoForApi } from '@/app-core/api';
import {
BASE_URL,
PUBLIC_API_ENABLED,
SITE_TITLE,
} from '@/site/config';
} from '@/app-core/config';
export const dynamic = 'force-dynamic';

View File

@ -7,7 +7,7 @@ import {
cloudflareR2Client,
cloudflareR2PutObjectCommandForKey,
} from '@/services/storage/cloudflare-r2';
import { CURRENT_STORAGE } from '@/site/config';
import { CURRENT_STORAGE } from '@/app-core/config';
import { getSignedUrl } from '@aws-sdk/s3-request-presigner';
export async function GET(

View File

@ -9,7 +9,7 @@ import {
PATH_ROOT,
absolutePathForPhoto,
absolutePathForPhotoImage,
} from '@/site/paths';
} from '@/app-core/paths';
import PhotoDetailPage from '@/photo/PhotoDetailPage';
import { FilmSimulation } from '@/simulation';
import {

View File

@ -6,7 +6,7 @@ import {
import FilmSimulationImageResponse from
'@/image-response/FilmSimulationImageResponse';
import { FilmSimulation } from '@/simulation';
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';
@ -14,7 +14,7 @@ import { getUniqueFilmSimulations } from '@/photo/db/query';
import {
STATICALLY_OPTIMIZED_PHOTO_CATEGORY_OG_IMAGES,
IS_PRODUCTION,
} from '@/site/config';
} from '@/app-core/config';
export let generateStaticParams:
(() => Promise<{ simulation: FilmSimulation }[]>) | undefined = undefined;

View File

@ -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';

View File

@ -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';

View File

@ -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;

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -9,7 +9,7 @@ import {
PATH_ROOT,
absolutePathForPhoto,
absolutePathForPhotoImage,
} from '@/site/paths';
} from '@/app-core/paths';
import PhotoDetailPage from '@/photo/PhotoDetailPage';
import {
getPhotosMetaCached,

View File

@ -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;

View File

@ -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((

View File

@ -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';

View File

@ -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';

View File

@ -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;

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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, {

View File

@ -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

View File

@ -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,

View File

@ -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',
];
}
};

View File

@ -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({

View File

@ -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({

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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 '.';

View File

@ -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';

View File

@ -1,4 +1,4 @@
import { pathForFocalLength } from '@/site/paths';
import { pathForFocalLength } from '@/app-core/paths';
import EntityLink, {
EntityLinkExternalProps,
} from '@/components/primitives/EntityLink';

View File

@ -7,7 +7,7 @@ import {
import {
absolutePathForFocalLength,
absolutePathForFocalLengthImage,
} from '@/site/paths';
} from '@/app-core/paths';
export type FocalLengths = {
focal: number

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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)';

View File

@ -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,

View File

@ -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;

View File

@ -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,

View File

@ -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';

View File

@ -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';

View File

@ -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';

Some files were not shown because too many files have changed in this diff Show More