Refactor app/site/admin code paths
This commit is contained in:
parent
1781a5e9c5
commit
a174654297
@ -1,5 +1,5 @@
|
|||||||
import { getGitHubMetaWithFallback, getGitHubPublicFork } from '@/admin/github';
|
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', () => {
|
describe('GitHub', () => {
|
||||||
it('fetches base repo meta', async () => {
|
it('fetches base repo meta', async () => {
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import {
|
|||||||
isPathProtected,
|
isPathProtected,
|
||||||
isPathTag,
|
isPathTag,
|
||||||
isPathTagPhoto,
|
isPathTagPhoto,
|
||||||
} from '@/site/paths';
|
} from '@/app-core/paths';
|
||||||
import { TAG_HIDDEN } from '@/tag';
|
import { TAG_HIDDEN } from '@/tag';
|
||||||
|
|
||||||
const PHOTO_ID = 'UsKSGcbt';
|
const PHOTO_ID = 'UsKSGcbt';
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import ErrorNote from '@/components/ErrorNote';
|
|||||||
import FieldSetWithStatus from '@/components/FieldSetWithStatus';
|
import FieldSetWithStatus from '@/components/FieldSetWithStatus';
|
||||||
import Container from '@/components/Container';
|
import Container from '@/components/Container';
|
||||||
import { addAllUploadsAction } from '@/photo/actions';
|
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 { Tags } from '@/tag';
|
||||||
import {
|
import {
|
||||||
generateLocalNaivePostgresString,
|
generateLocalNaivePostgresString,
|
||||||
|
|||||||
20
src/admin/AdminAppConfiguration.tsx
Normal file
20
src/admin/AdminAppConfiguration.tsx
Normal 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>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -14,8 +14,8 @@ import {
|
|||||||
BiPencil,
|
BiPencil,
|
||||||
} from 'react-icons/bi';
|
} from 'react-icons/bi';
|
||||||
import { HiOutlineCog } from 'react-icons/hi';
|
import { HiOutlineCog } from 'react-icons/hi';
|
||||||
import Checklist from '@/components/Checklist';
|
import ChecklistGroup from '@/components/ChecklistGroup';
|
||||||
import { ConfigChecklistStatus } from './config';
|
import { ConfigChecklistStatus } from '../app-core/config';
|
||||||
import StatusIcon from '@/components/StatusIcon';
|
import StatusIcon from '@/components/StatusIcon';
|
||||||
import { labelForStorage } from '@/services/storage';
|
import { labelForStorage } from '@/services/storage';
|
||||||
import { HiSparkles } from 'react-icons/hi';
|
import { HiSparkles } from 'react-icons/hi';
|
||||||
@ -24,13 +24,13 @@ import ErrorNote from '@/components/ErrorNote';
|
|||||||
import WarningNote from '@/components/WarningNote';
|
import WarningNote from '@/components/WarningNote';
|
||||||
import { RiSpeedMiniLine } from 'react-icons/ri';
|
import { RiSpeedMiniLine } from 'react-icons/ri';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import SecretGenerator from './SecretGenerator';
|
import SecretGenerator from '../app-core/SecretGenerator';
|
||||||
import CopyButton from '@/components/CopyButton';
|
import CopyButton from '@/components/CopyButton';
|
||||||
import { PiPaintBrushHousehold } from 'react-icons/pi';
|
import { PiPaintBrushHousehold } from 'react-icons/pi';
|
||||||
import { IoMdGrid } from 'react-icons/io';
|
import { IoMdGrid } from 'react-icons/io';
|
||||||
import { CgDebug } from 'react-icons/cg';
|
import { CgDebug } from 'react-icons/cg';
|
||||||
|
|
||||||
export default function SiteChecklistClient({
|
export default function AdminAppConfigurationClient({
|
||||||
// Storage
|
// Storage
|
||||||
hasDatabase,
|
hasDatabase,
|
||||||
isPostgresSslEnabled,
|
isPostgresSslEnabled,
|
||||||
@ -215,7 +215,7 @@ export default function SiteChecklistClient({
|
|||||||
return (
|
return (
|
||||||
<div className="max-w-xl w-full">
|
<div className="max-w-xl w-full">
|
||||||
<div className="space-y-3 -mt-3">
|
<div className="space-y-3 -mt-3">
|
||||||
<Checklist
|
<ChecklistGroup
|
||||||
title="Storage"
|
title="Storage"
|
||||||
icon={<BiData size={16} />}
|
icon={<BiData size={16} />}
|
||||||
>
|
>
|
||||||
@ -300,8 +300,8 @@ export default function SiteChecklistClient({
|
|||||||
)}
|
)}
|
||||||
</>)}
|
</>)}
|
||||||
</ChecklistRow>
|
</ChecklistRow>
|
||||||
</Checklist>
|
</ChecklistGroup>
|
||||||
<Checklist
|
<ChecklistGroup
|
||||||
title="Authentication"
|
title="Authentication"
|
||||||
icon={<BiLockAlt size={16} />}
|
icon={<BiLockAlt size={16} />}
|
||||||
>
|
>
|
||||||
@ -331,8 +331,8 @@ export default function SiteChecklistClient({
|
|||||||
'ADMIN_PASSWORD',
|
'ADMIN_PASSWORD',
|
||||||
])}
|
])}
|
||||||
</ChecklistRow>
|
</ChecklistRow>
|
||||||
</Checklist>
|
</ChecklistGroup>
|
||||||
<Checklist
|
<ChecklistGroup
|
||||||
title="Content"
|
title="Content"
|
||||||
icon={<BiPencil size={16} />}
|
icon={<BiPencil size={16} />}
|
||||||
>
|
>
|
||||||
@ -373,9 +373,9 @@ export default function SiteChecklistClient({
|
|||||||
Store in environment variable (seen in grid sidebar):
|
Store in environment variable (seen in grid sidebar):
|
||||||
{renderEnvVars(['NEXT_PUBLIC_SITE_ABOUT'])}
|
{renderEnvVars(['NEXT_PUBLIC_SITE_ABOUT'])}
|
||||||
</ChecklistRow>
|
</ChecklistRow>
|
||||||
</Checklist>
|
</ChecklistGroup>
|
||||||
{!simplifiedView && <>
|
{!simplifiedView && <>
|
||||||
<Checklist
|
<ChecklistGroup
|
||||||
title="AI text generation"
|
title="AI text generation"
|
||||||
titleShort="AI"
|
titleShort="AI"
|
||||||
icon={<HiSparkles />}
|
icon={<HiSparkles />}
|
||||||
@ -429,8 +429,8 @@ export default function SiteChecklistClient({
|
|||||||
(default: {'"title, tags, semantic"'}):
|
(default: {'"title, tags, semantic"'}):
|
||||||
{renderEnvVars(['AI_TEXT_AUTO_GENERATED_FIELDS'])}
|
{renderEnvVars(['AI_TEXT_AUTO_GENERATED_FIELDS'])}
|
||||||
</ChecklistRow>
|
</ChecklistRow>
|
||||||
</Checklist>
|
</ChecklistGroup>
|
||||||
<Checklist
|
<ChecklistGroup
|
||||||
title="Performance"
|
title="Performance"
|
||||||
icon={<RiSpeedMiniLine size={18} />}
|
icon={<RiSpeedMiniLine size={18} />}
|
||||||
optional
|
optional
|
||||||
@ -490,8 +490,8 @@ export default function SiteChecklistClient({
|
|||||||
image blur data being stored and displayed:
|
image blur data being stored and displayed:
|
||||||
{renderEnvVars(['NEXT_PUBLIC_BLUR_DISABLED'])}
|
{renderEnvVars(['NEXT_PUBLIC_BLUR_DISABLED'])}
|
||||||
</ChecklistRow>
|
</ChecklistRow>
|
||||||
</Checklist>
|
</ChecklistGroup>
|
||||||
<Checklist
|
<ChecklistGroup
|
||||||
title="Visual"
|
title="Visual"
|
||||||
icon={<PiPaintBrushHousehold size={19} />}
|
icon={<PiPaintBrushHousehold size={19} />}
|
||||||
optional
|
optional
|
||||||
@ -518,8 +518,8 @@ export default function SiteChecklistClient({
|
|||||||
of each photo, and display a surrounding border:
|
of each photo, and display a surrounding border:
|
||||||
{renderEnvVars(['NEXT_PUBLIC_MATTE_PHOTOS'])}
|
{renderEnvVars(['NEXT_PUBLIC_MATTE_PHOTOS'])}
|
||||||
</ChecklistRow>
|
</ChecklistRow>
|
||||||
</Checklist>
|
</ChecklistGroup>
|
||||||
<Checklist
|
<ChecklistGroup
|
||||||
title="Display"
|
title="Display"
|
||||||
icon={<BiHide size={18} />}
|
icon={<BiHide size={18} />}
|
||||||
optional
|
optional
|
||||||
@ -578,8 +578,8 @@ export default function SiteChecklistClient({
|
|||||||
Set environment variable to {'"1"'} to hide footer link:
|
Set environment variable to {'"1"'} to hide footer link:
|
||||||
{renderEnvVars(['NEXT_PUBLIC_HIDE_REPO_LINK'])}
|
{renderEnvVars(['NEXT_PUBLIC_HIDE_REPO_LINK'])}
|
||||||
</ChecklistRow>
|
</ChecklistRow>
|
||||||
</Checklist>
|
</ChecklistGroup>
|
||||||
<Checklist
|
<ChecklistGroup
|
||||||
title="Grid"
|
title="Grid"
|
||||||
icon={<IoMdGrid size={17} />}
|
icon={<IoMdGrid size={17} />}
|
||||||
optional
|
optional
|
||||||
@ -613,8 +613,8 @@ export default function SiteChecklistClient({
|
|||||||
aspect ratio):
|
aspect ratio):
|
||||||
{renderEnvVars(['NEXT_PUBLIC_SHOW_LARGE_THUMBNAILS'])}
|
{renderEnvVars(['NEXT_PUBLIC_SHOW_LARGE_THUMBNAILS'])}
|
||||||
</ChecklistRow>
|
</ChecklistRow>
|
||||||
</Checklist>
|
</ChecklistGroup>
|
||||||
<Checklist
|
<ChecklistGroup
|
||||||
title="Settings"
|
title="Settings"
|
||||||
icon={<HiOutlineCog size={17} className="translate-y-[0.5px]" />}
|
icon={<HiOutlineCog size={17} className="translate-y-[0.5px]" />}
|
||||||
optional
|
optional
|
||||||
@ -664,9 +664,9 @@ export default function SiteChecklistClient({
|
|||||||
keep OG image text bottom aligned (default is {'"top"'}):
|
keep OG image text bottom aligned (default is {'"top"'}):
|
||||||
{renderEnvVars(['NEXT_PUBLIC_OG_TEXT_ALIGNMENT'])}
|
{renderEnvVars(['NEXT_PUBLIC_OG_TEXT_ALIGNMENT'])}
|
||||||
</ChecklistRow>
|
</ChecklistRow>
|
||||||
</Checklist>
|
</ChecklistGroup>
|
||||||
{areInternalToolsEnabled &&
|
{areInternalToolsEnabled &&
|
||||||
<Checklist
|
<ChecklistGroup
|
||||||
title="Internal"
|
title="Internal"
|
||||||
icon={<CgDebug size={16} />}
|
icon={<CgDebug size={16} />}
|
||||||
optional
|
optional
|
||||||
@ -698,7 +698,7 @@ export default function SiteChecklistClient({
|
|||||||
console output for all sql queries:
|
console output for all sql queries:
|
||||||
{renderEnvVars(['ADMIN_SQL_DEBUG'])}
|
{renderEnvVars(['ADMIN_SQL_DEBUG'])}
|
||||||
</ChecklistRow>
|
</ChecklistRow>
|
||||||
</Checklist>}
|
</ChecklistGroup>}
|
||||||
</>}
|
</>}
|
||||||
</div>
|
</div>
|
||||||
<div className="pl-11 pr-2 sm:pr-11 mt-4 md:mt-7">
|
<div className="pl-11 pr-2 sm:pr-11 mt-4 md:mt-7">
|
||||||
@ -1,8 +1,8 @@
|
|||||||
import SiteChecklistClient from './SiteChecklistClient';
|
import AdminAppConfigurationClient from './AdminAppConfigurationClient';
|
||||||
import { CONFIG_CHECKLIST_STATUS } from '@/site/config';
|
import { APP_CONFIGURATION } from '@/app-core/config';
|
||||||
import { testConnectionsAction } from '@/admin/actions';
|
import { testConnectionsAction } from '@/admin/actions';
|
||||||
|
|
||||||
export default async function SiteChecklistServer({
|
export default async function AdminAppConfigurationServer({
|
||||||
simplifiedView,
|
simplifiedView,
|
||||||
}: {
|
}: {
|
||||||
simplifiedView?: boolean
|
simplifiedView?: boolean
|
||||||
@ -10,8 +10,8 @@ export default async function SiteChecklistServer({
|
|||||||
const connectionErrors = await testConnectionsAction().catch(() => ({}));
|
const connectionErrors = await testConnectionsAction().catch(() => ({}));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SiteChecklistClient {...{
|
<AdminAppConfigurationClient {...{
|
||||||
...CONFIG_CHECKLIST_STATUS,
|
...APP_CONFIGURATION,
|
||||||
...connectionErrors,
|
...connectionErrors,
|
||||||
simplifiedView,
|
simplifiedView,
|
||||||
}} />
|
}} />
|
||||||
@ -6,7 +6,7 @@ import {
|
|||||||
getUniqueTags,
|
getUniqueTags,
|
||||||
} from '@/photo/db/query';
|
} from '@/photo/db/query';
|
||||||
import AdminAppInsightsClient from './AdminAppInsightsClient';
|
import AdminAppInsightsClient from './AdminAppInsightsClient';
|
||||||
|
import { APP_CONFIGURATION, IS_DEVELOPMENT } from '@/app-core/config';
|
||||||
export default async function AdminAppInsights() {
|
export default async function AdminAppInsights() {
|
||||||
const [
|
const [
|
||||||
{ count, dateRange },
|
{ count, dateRange },
|
||||||
@ -22,14 +22,28 @@ export default async function AdminAppInsights() {
|
|||||||
getUniqueLenses(),
|
getUniqueLenses(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const {
|
||||||
|
isAiTextGenerationEnabled,
|
||||||
|
hasVercelBlobStorage,
|
||||||
|
} = APP_CONFIGURATION;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AdminAppInsightsClient
|
<AdminAppInsightsClient
|
||||||
photosCount={count}
|
recommendations={{
|
||||||
tagsCount={tags.length}
|
fork: true,
|
||||||
camerasCount={cameras.length}
|
forkBehind: true,
|
||||||
filmSimulationsCount={filmSimulations.length}
|
ai: isAiTextGenerationEnabled,
|
||||||
lensesCount={lenses.length}
|
aiRateLimiting: isAiTextGenerationEnabled && !hasVercelBlobStorage,
|
||||||
dateRange={dateRange}
|
}}
|
||||||
|
photoStats={{
|
||||||
|
photosCount: count,
|
||||||
|
tagsCount: tags.length,
|
||||||
|
camerasCount: cameras.length,
|
||||||
|
filmSimulationsCount: filmSimulations.length,
|
||||||
|
lensesCount: lenses.length,
|
||||||
|
dateRange,
|
||||||
|
}}
|
||||||
|
debug={IS_DEVELOPMENT}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,63 +1,103 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
|
import IconGrSync from '@/app-core/IconGrSync';
|
||||||
import Note from '@/components/Note';
|
import Note from '@/components/Note';
|
||||||
|
import WarningNote from '@/components/WarningNote';
|
||||||
import { dateRangeForPhotos, PhotoDateRange } from '@/photo';
|
import { dateRangeForPhotos, PhotoDateRange } from '@/photo';
|
||||||
import clsx from 'clsx/lite';
|
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({
|
export default function AdminAppInsightsClient({
|
||||||
photosCount,
|
recommendations: {
|
||||||
tagsCount,
|
fork,
|
||||||
camerasCount,
|
forkBehind,
|
||||||
filmSimulationsCount,
|
ai,
|
||||||
lensesCount,
|
aiRateLimiting,
|
||||||
dateRange,
|
},
|
||||||
|
photoStats: {
|
||||||
|
photosCount,
|
||||||
|
tagsCount,
|
||||||
|
camerasCount,
|
||||||
|
filmSimulationsCount,
|
||||||
|
lensesCount,
|
||||||
|
dateRange,
|
||||||
|
},
|
||||||
|
debug,
|
||||||
}: {
|
}: {
|
||||||
photosCount: number
|
recommendations: Record<Recommendation, boolean>,
|
||||||
tagsCount: number
|
photoStats: {
|
||||||
camerasCount: number
|
photosCount: number
|
||||||
filmSimulationsCount: number
|
tagsCount: number
|
||||||
lensesCount: number
|
camerasCount: number
|
||||||
dateRange?: PhotoDateRange
|
filmSimulationsCount: number
|
||||||
|
lensesCount: number
|
||||||
|
dateRange?: PhotoDateRange
|
||||||
|
},
|
||||||
|
debug?: boolean,
|
||||||
}) {
|
}) {
|
||||||
|
|
||||||
const { descriptionWithSpaces } = dateRangeForPhotos(undefined, dateRange);
|
const { descriptionWithSpaces } = dateRangeForPhotos(undefined, dateRange);
|
||||||
|
|
||||||
|
const renderTitle = (title: string) =>
|
||||||
|
<div className={clsx(
|
||||||
|
'text-center uppercase font-bold tracking-wide',
|
||||||
|
'text-medium',
|
||||||
|
)}>
|
||||||
|
{title}
|
||||||
|
</div>;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={clsx(
|
<div className={clsx(
|
||||||
'flex flex-col items-center justify-center gap-4',
|
'flex flex-col items-center',
|
||||||
'mt-2 mb-6',
|
'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(
|
<div className={clsx(
|
||||||
'grid grid-cols-2 gap-3 uppercase',
|
'w-[clamp(400px,80%,1000px)]',
|
||||||
'border border-main rounded-md p-6 bg-main shadow-xs',
|
'space-y-4 md:space-y-6',
|
||||||
'w-[clamp(300px,80%,1000px)]',
|
|
||||||
)}>
|
)}>
|
||||||
<div className="tracking-wide">Photos</div>
|
{renderTitle('Code Observability')}
|
||||||
<div className="text-right">{photosCount}</div>
|
{(fork || debug) &&
|
||||||
<div className="tracking-wide">Tags</div>
|
<Note icon={<IconGrSync />}>
|
||||||
<div className="text-right">{tagsCount}</div>
|
Consider forking this repository in order to
|
||||||
<div className="tracking-wide">Cameras</div>
|
receive new features and fixes
|
||||||
<div className="text-right">{camerasCount}</div>
|
</Note>}
|
||||||
<div className="tracking-wide">Films</div>
|
{(forkBehind || debug) &&
|
||||||
<div className="text-right">{filmSimulationsCount}</div>
|
<WarningNote>
|
||||||
<div className="tracking-wide">Lenses</div>
|
This fork is 9 commits behind
|
||||||
<div className="text-right">{lensesCount}</div>
|
</WarningNote>}
|
||||||
<span className="text-center col-span-2">
|
{renderTitle('Template Recommendations')}
|
||||||
{descriptionWithSpaces}
|
{(ai || debug) && <Note icon={<HiSparkles />}>
|
||||||
</span>
|
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>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import MoreMenu from '@/components/more/MoreMenu';
|
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 { useAppState } from '@/state/AppState';
|
||||||
import { BiCog } from 'react-icons/bi';
|
import { BiCog } from 'react-icons/bi';
|
||||||
import { ImCheckboxUnchecked } from 'react-icons/im';
|
import { ImCheckboxUnchecked } from 'react-icons/im';
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import { IoCloseSharp } from 'react-icons/io5';
|
|||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { TAG_FAVS, Tags } from '@/tag';
|
import { TAG_FAVS, Tags } from '@/tag';
|
||||||
import { usePathname } from 'next/navigation';
|
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 PhotoTagFieldset from './PhotoTagFieldset';
|
||||||
import { tagMultiplePhotosAction } from '@/photo/actions';
|
import { tagMultiplePhotosAction } from '@/photo/actions';
|
||||||
import { toastSuccess } from '@/toast';
|
import { toastSuccess } from '@/toast';
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import PhotoUpload from '@/photo/PhotoUpload';
|
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 { useAppState } from '@/state/AppState';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import {
|
|||||||
PATH_ADMIN_PHOTOS,
|
PATH_ADMIN_PHOTOS,
|
||||||
PATH_ADMIN_TAGS,
|
PATH_ADMIN_TAGS,
|
||||||
PATH_ADMIN_UPLOADS,
|
PATH_ADMIN_UPLOADS,
|
||||||
} from '@/site/paths';
|
} from '@/app-core/paths';
|
||||||
import AdminNavClient from './AdminNavClient';
|
import AdminNavClient from './AdminNavClient';
|
||||||
|
|
||||||
export default async function AdminNav() {
|
export default async function AdminNav() {
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import {
|
|||||||
isPathAdminConfiguration,
|
isPathAdminConfiguration,
|
||||||
isPathAdminInsights,
|
isPathAdminInsights,
|
||||||
isPathTopLevelAdmin,
|
isPathTopLevelAdmin,
|
||||||
} from '@/site/paths';
|
} from '@/app-core/paths';
|
||||||
import { useAppState } from '@/state/AppState';
|
import { useAppState } from '@/state/AppState';
|
||||||
import { clsx } from 'clsx/lite';
|
import { clsx } from 'clsx/lite';
|
||||||
import { differenceInMinutes } from 'date-fns';
|
import { differenceInMinutes } from 'date-fns';
|
||||||
|
|||||||
@ -3,10 +3,10 @@
|
|||||||
import { OUTDATED_THRESHOLD, Photo } from '@/photo';
|
import { OUTDATED_THRESHOLD, Photo } from '@/photo';
|
||||||
import AdminPhotosTable from '@/admin/AdminPhotosTable';
|
import AdminPhotosTable from '@/admin/AdminPhotosTable';
|
||||||
import LoaderButton from '@/components/primitives/LoaderButton';
|
import LoaderButton from '@/components/primitives/LoaderButton';
|
||||||
import IconGrSync from '@/site/IconGrSync';
|
import IconGrSync from '@/app-core/IconGrSync';
|
||||||
import Note from '@/components/Note';
|
import Note from '@/components/Note';
|
||||||
import AdminChildPage from '@/components/AdminChildPage';
|
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 { useState } from 'react';
|
||||||
import { syncPhotosAction } from '@/photo/actions';
|
import { syncPhotosAction } from '@/photo/actions';
|
||||||
import { useRouter } from 'next/navigation';
|
import { useRouter } from 'next/navigation';
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { ComponentProps, useMemo } from 'react';
|
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 { deletePhotoAction, toggleFavoritePhotoAction } from '@/photo/actions';
|
||||||
import { FaRegEdit, FaRegStar, FaStar } from 'react-icons/fa';
|
import { FaRegEdit, FaRegStar, FaStar } from 'react-icons/fa';
|
||||||
import {
|
import {
|
||||||
|
|||||||
@ -6,11 +6,11 @@ import SiteGrid from '@/components/SiteGrid';
|
|||||||
import {
|
import {
|
||||||
AI_TEXT_GENERATION_ENABLED,
|
AI_TEXT_GENERATION_ENABLED,
|
||||||
PRESERVE_ORIGINAL_UPLOADS,
|
PRESERVE_ORIGINAL_UPLOADS,
|
||||||
} from '@/site/config';
|
} from '@/app-core/config';
|
||||||
import AdminPhotosTable from '@/admin/AdminPhotosTable';
|
import AdminPhotosTable from '@/admin/AdminPhotosTable';
|
||||||
import AdminPhotosTableInfinite from '@/admin/AdminPhotosTableInfinite';
|
import AdminPhotosTableInfinite from '@/admin/AdminPhotosTableInfinite';
|
||||||
import PathLoaderButton from '@/components/primitives/PathLoaderButton';
|
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 { Photo } from '@/photo';
|
||||||
import { StorageListResponse } from '@/services/storage';
|
import { StorageListResponse } from '@/services/storage';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import AdminTable from './AdminTable';
|
|||||||
import { Fragment } from 'react';
|
import { Fragment } from 'react';
|
||||||
import PhotoSmall from '@/photo/PhotoSmall';
|
import PhotoSmall from '@/photo/PhotoSmall';
|
||||||
import { clsx } from 'clsx/lite';
|
import { clsx } from 'clsx/lite';
|
||||||
import { pathForAdminPhotoEdit, pathForPhoto } from '@/site/paths';
|
import { pathForAdminPhotoEdit, pathForPhoto } from '@/app-core/paths';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import { AiOutlineEyeInvisible } from 'react-icons/ai';
|
import { AiOutlineEyeInvisible } from 'react-icons/ai';
|
||||||
import PhotoDate from '@/photo/PhotoDate';
|
import PhotoDate from '@/photo/PhotoDate';
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { PATH_ADMIN_PHOTOS } from '@/site/paths';
|
import { PATH_ADMIN_PHOTOS } from '@/app-core/paths';
|
||||||
import InfinitePhotoScroll from '../photo/InfinitePhotoScroll';
|
import InfinitePhotoScroll from '../photo/InfinitePhotoScroll';
|
||||||
import AdminPhotosTable from './AdminPhotosTable';
|
import AdminPhotosTable from './AdminPhotosTable';
|
||||||
import { ComponentProps } from 'react';
|
import { ComponentProps } from 'react';
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import DeleteFormButton from '@/admin/DeleteFormButton';
|
|||||||
import { photoQuantityText } from '@/photo';
|
import { photoQuantityText } from '@/photo';
|
||||||
import { Tags, formatTag, sortTagsObject } from '@/tag';
|
import { Tags, formatTag, sortTagsObject } from '@/tag';
|
||||||
import EditButton from '@/admin/EditButton';
|
import EditButton from '@/admin/EditButton';
|
||||||
import { pathForAdminTagEdit } from '@/site/paths';
|
import { pathForAdminTagEdit } from '@/app-core/paths';
|
||||||
import { clsx } from 'clsx/lite';
|
import { clsx } from 'clsx/lite';
|
||||||
import AdminTagBadge from './AdminTagBadge';
|
import AdminTagBadge from './AdminTagBadge';
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import Spinner from '@/components/Spinner';
|
|||||||
import { getIdFromStorageUrl } from '@/services/storage';
|
import { getIdFromStorageUrl } from '@/services/storage';
|
||||||
import { clsx } from 'clsx/lite';
|
import { clsx } from 'clsx/lite';
|
||||||
import { FaRegCircleCheck } from 'react-icons/fa6';
|
import { FaRegCircleCheck } from 'react-icons/fa6';
|
||||||
import { pathForAdminUploadUrl } from '@/site/paths';
|
import { pathForAdminUploadUrl } from '@/app-core/paths';
|
||||||
import AddButton from './AddButton';
|
import AddButton from './AddButton';
|
||||||
import { UrlAddStatus } from './AdminUploadsClient';
|
import { UrlAddStatus } from './AdminUploadsClient';
|
||||||
import ResponsiveDate from '@/components/ResponsiveDate';
|
import ResponsiveDate from '@/components/ResponsiveDate';
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
import { deleteUploadAction } from '@/photo/actions';
|
import { deleteUploadAction } from '@/photo/actions';
|
||||||
import DeleteButton from './DeleteButton';
|
import DeleteButton from './DeleteButton';
|
||||||
import { useRouter } from 'next/navigation';
|
import { useRouter } from 'next/navigation';
|
||||||
import { PATH_ADMIN_PHOTOS } from '@/site/paths';
|
import { PATH_ADMIN_PHOTOS } from '@/app-core/paths';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
|
|
||||||
export default function DeleteUploadButton({
|
export default function DeleteUploadButton({
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import LoaderButton from '@/components/primitives/LoaderButton';
|
|||||||
import SubmitButtonWithStatus from '@/components/SubmitButtonWithStatus';
|
import SubmitButtonWithStatus from '@/components/SubmitButtonWithStatus';
|
||||||
import { getExifDataAction } from '@/photo/actions';
|
import { getExifDataAction } from '@/photo/actions';
|
||||||
import { PhotoFormData } from '@/photo/form';
|
import { PhotoFormData } from '@/photo/form';
|
||||||
import IconGrSync from '@/site/IconGrSync';
|
import IconGrSync from '@/app-core/IconGrSync';
|
||||||
import { clsx } from 'clsx/lite';
|
import { clsx } from 'clsx/lite';
|
||||||
import { ComponentProps, useState } from 'react';
|
import { ComponentProps, useState } from 'react';
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import LoaderButton from '@/components/primitives/LoaderButton';
|
import LoaderButton from '@/components/primitives/LoaderButton';
|
||||||
import { syncPhotoAction } from '@/photo/actions';
|
import { syncPhotoAction } from '@/photo/actions';
|
||||||
import IconGrSync from '@/site/IconGrSync';
|
import IconGrSync from '@/app-core/IconGrSync';
|
||||||
import { toastSuccess } from '@/toast';
|
import { toastSuccess } from '@/toast';
|
||||||
import { ComponentProps, useState } from 'react';
|
import { ComponentProps, useState } from 'react';
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import { testKvConnection } from '@/services/kv';
|
|||||||
import { testOpenAiConnection } from '@/services/openai';
|
import { testOpenAiConnection } from '@/services/openai';
|
||||||
import { testDatabaseConnection } from '@/services/postgres';
|
import { testDatabaseConnection } from '@/services/postgres';
|
||||||
import { testStorageConnection } from '@/services/storage';
|
import { testStorageConnection } from '@/services/storage';
|
||||||
import { CONFIG_CHECKLIST_STATUS } from '@/site/config';
|
import { APP_CONFIGURATION } from '@/app-core/config';
|
||||||
|
|
||||||
const scanForError = (
|
const scanForError = (
|
||||||
shouldCheck: boolean,
|
shouldCheck: boolean,
|
||||||
@ -24,7 +24,7 @@ export const testConnectionsAction = async () =>
|
|||||||
hasStorageProvider,
|
hasStorageProvider,
|
||||||
hasVercelKv,
|
hasVercelKv,
|
||||||
isAiTextGenerationEnabled,
|
isAiTextGenerationEnabled,
|
||||||
} = CONFIG_CHECKLIST_STATUS;
|
} = APP_CONFIGURATION;
|
||||||
|
|
||||||
const [
|
const [
|
||||||
databaseError,
|
databaseError,
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { Suspense } from 'react';
|
import { Suspense } from 'react';
|
||||||
import GitHubForkStatusBadgeClient from './GitHubForkStatusBadgeClient';
|
import GitHubForkStatusBadgeClient from './GitHubForkStatusBadgeClient';
|
||||||
import GitHubForkStatusBadgeServer from './GitHubForkStatusBadgeServer';
|
import GitHubForkStatusBadgeServer from './GitHubForkStatusBadgeServer';
|
||||||
import { IS_DEVELOPMENT } from '@/site/config';
|
import { IS_DEVELOPMENT } from '@/app-core/config';
|
||||||
|
|
||||||
export default function GitHubForkStatusBadge() {
|
export default function GitHubForkStatusBadge() {
|
||||||
return IS_DEVELOPMENT
|
return IS_DEVELOPMENT
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import {
|
|||||||
VERCEL_GIT_REPO_OWNER,
|
VERCEL_GIT_REPO_OWNER,
|
||||||
VERCEL_GIT_REPO_SLUG,
|
VERCEL_GIT_REPO_SLUG,
|
||||||
VERCEL_GIT_COMMIT_SHA,
|
VERCEL_GIT_COMMIT_SHA,
|
||||||
} from '@/site/config';
|
} from '@/app-core/config';
|
||||||
import { getGitHubMetaWithFallback, getGitHubRepoUrl } from '.';
|
import { getGitHubMetaWithFallback, getGitHubRepoUrl } from '.';
|
||||||
|
|
||||||
export default async function GitHubForkStatusBadgeServer() {
|
export default async function GitHubForkStatusBadgeServer() {
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import {
|
|||||||
TEMPLATE_BASE_OWNER,
|
TEMPLATE_BASE_OWNER,
|
||||||
TEMPLATE_BASE_REPO,
|
TEMPLATE_BASE_REPO,
|
||||||
TEMPLATE_BASE_BRANCH,
|
TEMPLATE_BASE_BRANCH,
|
||||||
} from '@/site/config';
|
} from '@/app-core/config';
|
||||||
|
|
||||||
const DEFAULT_BRANCH = 'main';
|
const DEFAULT_BRANCH = 'main';
|
||||||
const FALLBACK_TEXT = 'Unknown';
|
const FALLBACK_TEXT = 'Unknown';
|
||||||
|
|||||||
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
import { clsx } from 'clsx/lite';
|
import { clsx } from 'clsx/lite';
|
||||||
import SiteGrid from '../components/SiteGrid';
|
import SiteGrid from '../components/SiteGrid';
|
||||||
import ThemeSwitcher from '@/site/ThemeSwitcher';
|
import ThemeSwitcher from '@/app-core/ThemeSwitcher';
|
||||||
import Link from 'next/link';
|
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 RepoLink from '../components/RepoLink';
|
||||||
import { usePathname } from 'next/navigation';
|
import { usePathname } from 'next/navigation';
|
||||||
import { PATH_ADMIN_PHOTOS, isPathAdmin, isPathSignIn } from './paths';
|
import { PATH_ADMIN_PHOTOS, isPathAdmin, isPathSignIn } from './paths';
|
||||||
@ -4,7 +4,7 @@ import { clsx } from 'clsx/lite';
|
|||||||
import { usePathname } from 'next/navigation';
|
import { usePathname } from 'next/navigation';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import SiteGrid from '../components/SiteGrid';
|
import SiteGrid from '../components/SiteGrid';
|
||||||
import ViewSwitcher, { SwitcherSelection } from '@/site/ViewSwitcher';
|
import ViewSwitcher, { SwitcherSelection } from '@/app-core/ViewSwitcher';
|
||||||
import {
|
import {
|
||||||
PATH_ROOT,
|
PATH_ROOT,
|
||||||
isPathAdmin,
|
isPathAdmin,
|
||||||
@ -12,7 +12,7 @@ import {
|
|||||||
isPathGrid,
|
isPathGrid,
|
||||||
isPathProtected,
|
isPathProtected,
|
||||||
isPathSignIn,
|
isPathSignIn,
|
||||||
} from '@/site/paths';
|
} from '@/app-core/paths';
|
||||||
import AnimateItems from '../components/AnimateItems';
|
import AnimateItems from '../components/AnimateItems';
|
||||||
import { useAppState } from '@/state/AppState';
|
import { useAppState } from '@/state/AppState';
|
||||||
import {
|
import {
|
||||||
@ -1,12 +1,12 @@
|
|||||||
import Switcher from '@/components/Switcher';
|
import Switcher from '@/components/Switcher';
|
||||||
import SwitcherItem from '@/components/SwitcherItem';
|
import SwitcherItem from '@/components/SwitcherItem';
|
||||||
import IconFeed from '@/site/IconFeed';
|
import IconFeed from '@/app-core/IconFeed';
|
||||||
import IconGrid from '@/site/IconGrid';
|
import IconGrid from '@/app-core/IconGrid';
|
||||||
import {
|
import {
|
||||||
PATH_ADMIN_PHOTOS,
|
PATH_ADMIN_PHOTOS,
|
||||||
PATH_FEED_INFERRED,
|
PATH_FEED_INFERRED,
|
||||||
PATH_GRID_INFERRED,
|
PATH_GRID_INFERRED,
|
||||||
} from '@/site/paths';
|
} from '@/app-core/paths';
|
||||||
import { BiLockAlt } from 'react-icons/bi';
|
import { BiLockAlt } from 'react-icons/bi';
|
||||||
import IconSearch from './IconSearch';
|
import IconSearch from './IconSearch';
|
||||||
import { useAppState } from '@/state/AppState';
|
import { useAppState } from '@/state/AppState';
|
||||||
@ -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_DB_OPTIMIZE_ENABLED = process.env.ADMIN_DB_OPTIMIZE === '1';
|
||||||
export const ADMIN_SQL_DEBUG_ENABLED = process.env.ADMIN_SQL_DEBUG === '1';
|
export const ADMIN_SQL_DEBUG_ENABLED = process.env.ADMIN_SQL_DEBUG === '1';
|
||||||
|
|
||||||
export const CONFIG_CHECKLIST_STATUS = {
|
export const APP_CONFIGURATION = {
|
||||||
// Storage
|
// Storage
|
||||||
hasDatabase: HAS_DATABASE,
|
hasDatabase: HAS_DATABASE,
|
||||||
isPostgresSslEnabled: POSTGRES_SSL_ENABLED,
|
isPostgresSslEnabled: POSTGRES_SSL_ENABLED,
|
||||||
@ -326,11 +326,11 @@ export const CONFIG_CHECKLIST_STATUS = {
|
|||||||
commitUrl: VERCEL_GIT_COMMIT_URL,
|
commitUrl: VERCEL_GIT_COMMIT_URL,
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ConfigChecklistStatus = typeof CONFIG_CHECKLIST_STATUS;
|
export type ConfigChecklistStatus = typeof APP_CONFIGURATION;
|
||||||
|
|
||||||
export const IS_SITE_READY =
|
export const IS_SITE_READY =
|
||||||
CONFIG_CHECKLIST_STATUS.hasDatabase &&
|
APP_CONFIGURATION.hasDatabase &&
|
||||||
CONFIG_CHECKLIST_STATUS.hasStorageProvider &&
|
APP_CONFIGURATION.hasStorageProvider &&
|
||||||
CONFIG_CHECKLIST_STATUS.hasAuthSecret &&
|
APP_CONFIGURATION.hasAuthSecret &&
|
||||||
CONFIG_CHECKLIST_STATUS.hasAdminUser;
|
APP_CONFIGURATION.hasAdminUser;
|
||||||
|
|
||||||
@ -1,14 +1,14 @@
|
|||||||
import ClearCacheButton from '@/admin/ClearCacheButton';
|
import ClearCacheButton from '@/admin/ClearCacheButton';
|
||||||
import SiteChecklist from '@/site/SiteChecklist';
|
import AdminAppConfiguration from '@/admin/AdminAppConfiguration';
|
||||||
import AdminInfoPage from '@/admin/AdminInfoPage';
|
import AdminInfoPage from '@/admin/AdminInfoPage';
|
||||||
|
|
||||||
export default function AdminConfigurationPage() {
|
export default function AdminAppConfigurationPage() {
|
||||||
return (
|
return (
|
||||||
<AdminInfoPage
|
<AdminInfoPage
|
||||||
title="App Configuration"
|
title="App Configuration"
|
||||||
accessory={<ClearCacheButton />}
|
accessory={<ClearCacheButton />}
|
||||||
>
|
>
|
||||||
<SiteChecklist />
|
<AdminAppConfiguration />
|
||||||
</AdminInfoPage>
|
</AdminInfoPage>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,10 @@
|
|||||||
import AdminAppInsights from '@/admin/AdminAppInsights';
|
import AdminAppInsights from '@/admin/AdminAppInsights';
|
||||||
import AdminInfoPage from '@/admin/AdminInfoPage';
|
import AdminInfoPage from '@/admin/AdminInfoPage';
|
||||||
import GitHubForkStatusBadge from '@/admin/github/GitHubForkStatusBadge';
|
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() {
|
export default async function AdminInsightsPage() {
|
||||||
return <AdminInfoPage
|
return <AdminInfoPage
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { getPhotos } from '@/photo/db/query';
|
import { getPhotos } from '@/photo/db/query';
|
||||||
import { OUTDATED_THRESHOLD } from '@/photo';
|
import { OUTDATED_THRESHOLD } from '@/photo';
|
||||||
import AdminOutdatedClient from '@/admin/AdminOutdatedClient';
|
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;
|
export const maxDuration = 60;
|
||||||
|
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
import { redirect } from 'next/navigation';
|
import { redirect } from 'next/navigation';
|
||||||
import { getPhotoNoStore, getUniqueTagsCached } from '@/photo/cache';
|
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 PhotoEditPageClient from '@/photo/PhotoEditPageClient';
|
||||||
import {
|
import {
|
||||||
AI_TEXT_GENERATION_ENABLED,
|
AI_TEXT_GENERATION_ENABLED,
|
||||||
BLUR_ENABLED,
|
BLUR_ENABLED,
|
||||||
IS_PREVIEW,
|
IS_PREVIEW,
|
||||||
} from '@/site/config';
|
} from '@/app-core/config';
|
||||||
import { blurImageFromUrl, resizeImageFromUrl } from '@/photo/server';
|
import { blurImageFromUrl, resizeImageFromUrl } from '@/photo/server';
|
||||||
import { getNextImageUrlForManipulation } from '@/services/next-image';
|
import { getNextImageUrlForManipulation } from '@/services/next-image';
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import AdminChildPage from '@/components/AdminChildPage';
|
|||||||
import { redirect } from 'next/navigation';
|
import { redirect } from 'next/navigation';
|
||||||
import { getPhotosCached } from '@/photo/cache';
|
import { getPhotosCached } from '@/photo/cache';
|
||||||
import TagForm from '@/tag/TagForm';
|
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 PhotoLightbox from '@/photo/PhotoLightbox';
|
||||||
import { getPhotosMeta } from '@/photo/db/query';
|
import { getPhotosMeta } from '@/photo/db/query';
|
||||||
import AdminTagBadge from '@/admin/AdminTagBadge';
|
import AdminTagBadge from '@/admin/AdminTagBadge';
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { PATH_ADMIN } from '@/site/paths';
|
import { PATH_ADMIN } from '@/app-core/paths';
|
||||||
import { extractImageDataFromBlobPath } from '@/photo/server';
|
import { extractImageDataFromBlobPath } from '@/photo/server';
|
||||||
import { redirect } from 'next/navigation';
|
import { redirect } from 'next/navigation';
|
||||||
import { getUniqueTagsCached } from '@/photo/cache';
|
import { getUniqueTagsCached } from '@/photo/cache';
|
||||||
@ -7,7 +7,7 @@ import {
|
|||||||
AI_TEXT_AUTO_GENERATED_FIELDS,
|
AI_TEXT_AUTO_GENERATED_FIELDS,
|
||||||
AI_TEXT_GENERATION_ENABLED,
|
AI_TEXT_GENERATION_ENABLED,
|
||||||
BLUR_ENABLED,
|
BLUR_ENABLED,
|
||||||
} from '@/site/config';
|
} from '@/app-core/config';
|
||||||
import ErrorNote from '@/components/ErrorNote';
|
import ErrorNote from '@/components/ErrorNote';
|
||||||
|
|
||||||
export const maxDuration = 60;
|
export const maxDuration = 60;
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
import { getPhotosCached } from '@/photo/cache';
|
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 {
|
import {
|
||||||
BASE_URL,
|
BASE_URL,
|
||||||
PUBLIC_API_ENABLED,
|
PUBLIC_API_ENABLED,
|
||||||
SITE_TITLE,
|
SITE_TITLE,
|
||||||
} from '@/site/config';
|
} from '@/app-core/config';
|
||||||
|
|
||||||
export const dynamic = 'force-dynamic';
|
export const dynamic = 'force-dynamic';
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import {
|
|||||||
cloudflareR2Client,
|
cloudflareR2Client,
|
||||||
cloudflareR2PutObjectCommandForKey,
|
cloudflareR2PutObjectCommandForKey,
|
||||||
} from '@/services/storage/cloudflare-r2';
|
} 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';
|
import { getSignedUrl } from '@aws-sdk/s3-request-presigner';
|
||||||
|
|
||||||
export async function GET(
|
export async function GET(
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import {
|
|||||||
PATH_ROOT,
|
PATH_ROOT,
|
||||||
absolutePathForPhoto,
|
absolutePathForPhoto,
|
||||||
absolutePathForPhotoImage,
|
absolutePathForPhotoImage,
|
||||||
} from '@/site/paths';
|
} from '@/app-core/paths';
|
||||||
import PhotoDetailPage from '@/photo/PhotoDetailPage';
|
import PhotoDetailPage from '@/photo/PhotoDetailPage';
|
||||||
import { FilmSimulation } from '@/simulation';
|
import { FilmSimulation } from '@/simulation';
|
||||||
import {
|
import {
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import {
|
|||||||
import FilmSimulationImageResponse from
|
import FilmSimulationImageResponse from
|
||||||
'@/image-response/FilmSimulationImageResponse';
|
'@/image-response/FilmSimulationImageResponse';
|
||||||
import { FilmSimulation } from '@/simulation';
|
import { FilmSimulation } from '@/simulation';
|
||||||
import { getIBMPlexMonoMedium } from '@/site/font';
|
import { getIBMPlexMonoMedium } from '@/app-core/font';
|
||||||
import { ImageResponse } from 'next/og';
|
import { ImageResponse } from 'next/og';
|
||||||
import { getImageResponseCacheControlHeaders } from '@/image-response/cache';
|
import { getImageResponseCacheControlHeaders } from '@/image-response/cache';
|
||||||
import { GENERATE_STATIC_PARAMS_LIMIT } from '@/photo/db';
|
import { GENERATE_STATIC_PARAMS_LIMIT } from '@/photo/db';
|
||||||
@ -14,7 +14,7 @@ import { getUniqueFilmSimulations } from '@/photo/db/query';
|
|||||||
import {
|
import {
|
||||||
STATICALLY_OPTIMIZED_PHOTO_CATEGORY_OG_IMAGES,
|
STATICALLY_OPTIMIZED_PHOTO_CATEGORY_OG_IMAGES,
|
||||||
IS_PRODUCTION,
|
IS_PRODUCTION,
|
||||||
} from '@/site/config';
|
} from '@/app-core/config';
|
||||||
|
|
||||||
export let generateStaticParams:
|
export let generateStaticParams:
|
||||||
(() => Promise<{ simulation: FilmSimulation }[]>) | undefined = undefined;
|
(() => Promise<{ simulation: FilmSimulation }[]>) | undefined = undefined;
|
||||||
|
|||||||
@ -2,9 +2,9 @@ import { INFINITE_SCROLL_GRID_INITIAL } from '@/photo';
|
|||||||
import { getUniqueFilmSimulations } from '@/photo/db/query';
|
import { getUniqueFilmSimulations } from '@/photo/db/query';
|
||||||
import { FilmSimulation, generateMetaForFilmSimulation } from '@/simulation';
|
import { FilmSimulation, generateMetaForFilmSimulation } from '@/simulation';
|
||||||
import FilmSimulationOverview from '@/simulation/FilmSimulationOverview';
|
import FilmSimulationOverview from '@/simulation/FilmSimulationOverview';
|
||||||
import { IS_PRODUCTION } from '@/site/config';
|
import { IS_PRODUCTION } from '@/app-core/config';
|
||||||
import { getPhotosFilmSimulationDataCached } from '@/simulation/data';
|
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 { Metadata } from 'next/types';
|
||||||
import { cache } from 'react';
|
import { cache } from 'react';
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import {
|
|||||||
PATH_ROOT,
|
PATH_ROOT,
|
||||||
absolutePathForPhoto,
|
absolutePathForPhoto,
|
||||||
absolutePathForPhotoImage,
|
absolutePathForPhotoImage,
|
||||||
} from '@/site/paths';
|
} from '@/app-core/paths';
|
||||||
import PhotoDetailPage from '@/photo/PhotoDetailPage';
|
import PhotoDetailPage from '@/photo/PhotoDetailPage';
|
||||||
import { getPhotosNearIdCached } from '@/photo/cache';
|
import { getPhotosNearIdCached } from '@/photo/cache';
|
||||||
import { cache } from 'react';
|
import { cache } from 'react';
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import {
|
|||||||
IMAGE_OG_DIMENSION_SMALL,
|
IMAGE_OG_DIMENSION_SMALL,
|
||||||
MAX_PHOTOS_TO_SHOW_PER_TAG,
|
MAX_PHOTOS_TO_SHOW_PER_TAG,
|
||||||
} from '@/image-response';
|
} from '@/image-response';
|
||||||
import { getIBMPlexMonoMedium } from '@/site/font';
|
import { getIBMPlexMonoMedium } from '@/app-core/font';
|
||||||
import { ImageResponse } from 'next/og';
|
import { ImageResponse } from 'next/og';
|
||||||
import { getImageResponseCacheControlHeaders } from '@/image-response/cache';
|
import { getImageResponseCacheControlHeaders } from '@/image-response/cache';
|
||||||
import FocalLengthImageResponse from
|
import FocalLengthImageResponse from
|
||||||
@ -14,7 +14,7 @@ import { getUniqueFocalLengths } from '@/photo/db/query';
|
|||||||
import {
|
import {
|
||||||
STATICALLY_OPTIMIZED_PHOTO_CATEGORY_OG_IMAGES,
|
STATICALLY_OPTIMIZED_PHOTO_CATEGORY_OG_IMAGES,
|
||||||
IS_PRODUCTION,
|
IS_PRODUCTION,
|
||||||
} from '@/site/config';
|
} from '@/app-core/config';
|
||||||
|
|
||||||
export let generateStaticParams:
|
export let generateStaticParams:
|
||||||
(() => Promise<{ focal: string }[]>) | undefined = undefined;
|
(() => Promise<{ focal: string }[]>) | undefined = undefined;
|
||||||
|
|||||||
@ -2,10 +2,10 @@ import { generateMetaForFocalLength, getFocalLengthFromString } from '@/focal';
|
|||||||
import FocalLengthOverview from '@/focal/FocalLengthOverview';
|
import FocalLengthOverview from '@/focal/FocalLengthOverview';
|
||||||
import { getPhotosFocalLengthDataCached } from '@/focal/data';
|
import { getPhotosFocalLengthDataCached } from '@/focal/data';
|
||||||
import { INFINITE_SCROLL_GRID_INITIAL } from '@/photo';
|
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 { getUniqueFocalLengths } from '@/photo/db/query';
|
||||||
import { STATICALLY_OPTIMIZED_PHOTO_CATEGORIES } from '@/site/config';
|
import { STATICALLY_OPTIMIZED_PHOTO_CATEGORIES } from '@/app-core/config';
|
||||||
import { PATH_ROOT } from '@/site/paths';
|
import { PATH_ROOT } from '@/app-core/paths';
|
||||||
import type { Metadata } from 'next';
|
import type { Metadata } from 'next';
|
||||||
import { redirect } from 'next/navigation';
|
import { redirect } from 'next/navigation';
|
||||||
import { cache } from 'react';
|
import { cache } from 'react';
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import {
|
|||||||
MAX_PHOTOS_TO_SHOW_OG,
|
MAX_PHOTOS_TO_SHOW_OG,
|
||||||
} from '@/image-response';
|
} from '@/image-response';
|
||||||
import HomeImageResponse from '@/image-response/HomeImageResponse';
|
import HomeImageResponse from '@/image-response/HomeImageResponse';
|
||||||
import { getIBMPlexMonoMedium } from '@/site/font';
|
import { getIBMPlexMonoMedium } from '@/app-core/font';
|
||||||
import { ImageResponse } from 'next/og';
|
import { ImageResponse } from 'next/og';
|
||||||
import { getImageResponseCacheControlHeaders } from '@/image-response/cache';
|
import { getImageResponseCacheControlHeaders } from '@/image-response/cache';
|
||||||
import { isNextImageReadyBasedOnPhotos } from '@/photo';
|
import { isNextImageReadyBasedOnPhotos } from '@/photo';
|
||||||
|
|||||||
@ -7,15 +7,15 @@ import {
|
|||||||
SITE_DESCRIPTION,
|
SITE_DESCRIPTION,
|
||||||
SITE_DOMAIN_OR_TITLE,
|
SITE_DOMAIN_OR_TITLE,
|
||||||
SITE_TITLE,
|
SITE_TITLE,
|
||||||
} from '@/site/config';
|
} from '@/app-core/config';
|
||||||
import AppStateProvider from '@/state/AppStateProvider';
|
import AppStateProvider from '@/state/AppStateProvider';
|
||||||
import ToasterWithThemes from '@/toast/ToasterWithThemes';
|
import ToasterWithThemes from '@/toast/ToasterWithThemes';
|
||||||
import PhotoEscapeHandler from '@/photo/PhotoEscapeHandler';
|
import PhotoEscapeHandler from '@/photo/PhotoEscapeHandler';
|
||||||
import { Metadata } from 'next/types';
|
import { Metadata } from 'next/types';
|
||||||
import { ThemeProvider } from 'next-themes';
|
import { ThemeProvider } from 'next-themes';
|
||||||
import Nav from '@/site/Nav';
|
import Nav from '@/app-core/Nav';
|
||||||
import Footer from '@/site/Footer';
|
import Footer from '@/app-core/Footer';
|
||||||
import CommandK from '@/site/CommandK';
|
import CommandK from '@/app-core/CommandK';
|
||||||
import SwrConfigClient from '../state/SwrConfigClient';
|
import SwrConfigClient from '../state/SwrConfigClient';
|
||||||
import AdminBatchEditPanel from '@/admin/AdminBatchEditPanel';
|
import AdminBatchEditPanel from '@/admin/AdminBatchEditPanel';
|
||||||
import ShareModals from '@/share/ShareModals';
|
import ShareModals from '@/share/ShareModals';
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
import { getPhotoCached } from '@/photo/cache';
|
import { getPhotoCached } from '@/photo/cache';
|
||||||
import { IMAGE_OG_DIMENSION } from '@/image-response';
|
import { IMAGE_OG_DIMENSION } from '@/image-response';
|
||||||
import PhotoImageResponse from '@/image-response/PhotoImageResponse';
|
import PhotoImageResponse from '@/image-response/PhotoImageResponse';
|
||||||
import { getIBMPlexMonoMedium } from '@/site/font';
|
import { getIBMPlexMonoMedium } from '@/app-core/font';
|
||||||
import { ImageResponse } from 'next/og';
|
import { ImageResponse } from 'next/og';
|
||||||
import { getImageResponseCacheControlHeaders } from '@/image-response/cache';
|
import { getImageResponseCacheControlHeaders } from '@/image-response/cache';
|
||||||
import {
|
import {
|
||||||
IS_PRODUCTION,
|
IS_PRODUCTION,
|
||||||
STATICALLY_OPTIMIZED_PHOTO_OG_IMAGES,
|
STATICALLY_OPTIMIZED_PHOTO_OG_IMAGES,
|
||||||
} from '@/site/config';
|
} from '@/app-core/config';
|
||||||
import { getPhotoIds } from '@/photo/db/query';
|
import { getPhotoIds } from '@/photo/db/query';
|
||||||
import { GENERATE_STATIC_PARAMS_LIMIT } from '@/photo/db';
|
import { GENERATE_STATIC_PARAMS_LIMIT } from '@/photo/db';
|
||||||
import { isNextImageReadyBasedOnPhotos } from '@/photo';
|
import { isNextImageReadyBasedOnPhotos } from '@/photo';
|
||||||
|
|||||||
@ -9,10 +9,10 @@ import {
|
|||||||
PATH_ROOT,
|
PATH_ROOT,
|
||||||
absolutePathForPhoto,
|
absolutePathForPhoto,
|
||||||
absolutePathForPhotoImage,
|
absolutePathForPhotoImage,
|
||||||
} from '@/site/paths';
|
} from '@/app-core/paths';
|
||||||
import PhotoDetailPage from '@/photo/PhotoDetailPage';
|
import PhotoDetailPage from '@/photo/PhotoDetailPage';
|
||||||
import { getPhotosNearIdCached } from '@/photo/cache';
|
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 { getPhotoIds } from '@/photo/db/query';
|
||||||
import { GENERATE_STATIC_PARAMS_LIMIT } from '@/photo/db';
|
import { GENERATE_STATIC_PARAMS_LIMIT } from '@/photo/db';
|
||||||
import { cache } from 'react';
|
import { cache } from 'react';
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import PhotosEmptyState from '@/photo/PhotosEmptyState';
|
|||||||
import { Metadata } from 'next/types';
|
import { Metadata } from 'next/types';
|
||||||
import { cache } from 'react';
|
import { cache } from 'react';
|
||||||
import { getPhotos, getPhotosMeta } from '@/photo/db/query';
|
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 { getPhotoSidebarData } from '@/photo/data';
|
||||||
import PhotoGridPage from '@/photo/PhotoGridPage';
|
import PhotoGridPage from '@/photo/PhotoGridPage';
|
||||||
import PhotoFeedPage from '@/photo/PhotoFeedPage';
|
import PhotoFeedPage from '@/photo/PhotoFeedPage';
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import {
|
|||||||
PATH_ROOT,
|
PATH_ROOT,
|
||||||
absolutePathForPhoto,
|
absolutePathForPhoto,
|
||||||
absolutePathForPhotoImage,
|
absolutePathForPhotoImage,
|
||||||
} from '@/site/paths';
|
} from '@/app-core/paths';
|
||||||
import PhotoDetailPage from '@/photo/PhotoDetailPage';
|
import PhotoDetailPage from '@/photo/PhotoDetailPage';
|
||||||
import {
|
import {
|
||||||
getPhotosMetaCached,
|
getPhotosMetaCached,
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import {
|
|||||||
MAX_PHOTOS_TO_SHOW_PER_TAG,
|
MAX_PHOTOS_TO_SHOW_PER_TAG,
|
||||||
} from '@/image-response';
|
} from '@/image-response';
|
||||||
import CameraImageResponse from '@/image-response/CameraImageResponse';
|
import CameraImageResponse from '@/image-response/CameraImageResponse';
|
||||||
import { getIBMPlexMonoMedium } from '@/site/font';
|
import { getIBMPlexMonoMedium } from '@/app-core/font';
|
||||||
import { ImageResponse } from 'next/og';
|
import { ImageResponse } from 'next/og';
|
||||||
import { getImageResponseCacheControlHeaders } from '@/image-response/cache';
|
import { getImageResponseCacheControlHeaders } from '@/image-response/cache';
|
||||||
import { GENERATE_STATIC_PARAMS_LIMIT } from '@/photo/db';
|
import { GENERATE_STATIC_PARAMS_LIMIT } from '@/photo/db';
|
||||||
@ -13,7 +13,7 @@ import { getUniqueCameras } from '@/photo/db/query';
|
|||||||
import {
|
import {
|
||||||
STATICALLY_OPTIMIZED_PHOTO_CATEGORY_OG_IMAGES,
|
STATICALLY_OPTIMIZED_PHOTO_CATEGORY_OG_IMAGES,
|
||||||
IS_PRODUCTION,
|
IS_PRODUCTION,
|
||||||
} from '@/site/config';
|
} from '@/app-core/config';
|
||||||
|
|
||||||
export let generateStaticParams:
|
export let generateStaticParams:
|
||||||
(() => Promise<{ camera: Camera }[]>) | undefined = undefined;
|
(() => Promise<{ camera: Camera }[]>) | undefined = undefined;
|
||||||
|
|||||||
@ -5,8 +5,8 @@ import { INFINITE_SCROLL_GRID_INITIAL } from '@/photo';
|
|||||||
import { getPhotosCameraDataCached } from '@/camera/data';
|
import { getPhotosCameraDataCached } from '@/camera/data';
|
||||||
import CameraOverview from '@/camera/CameraOverview';
|
import CameraOverview from '@/camera/CameraOverview';
|
||||||
import { cache } from 'react';
|
import { cache } from 'react';
|
||||||
import { STATICALLY_OPTIMIZED_PHOTO_CATEGORIES } from '@/site/config';
|
import { STATICALLY_OPTIMIZED_PHOTO_CATEGORIES } from '@/app-core/config';
|
||||||
import { IS_PRODUCTION } from '@/site/config';
|
import { IS_PRODUCTION } from '@/app-core/config';
|
||||||
import { getUniqueCameras } from '@/photo/db/query';
|
import { getUniqueCameras } from '@/photo/db/query';
|
||||||
|
|
||||||
const getPhotosCameraDataCachedCached = cache((
|
const getPhotosCameraDataCachedCached = cache((
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { auth } from '@/auth';
|
import { auth } from '@/auth';
|
||||||
import SignInForm from '@/auth/SignInForm';
|
import SignInForm from '@/auth/SignInForm';
|
||||||
import { PATH_ADMIN } from '@/site/paths';
|
import { PATH_ADMIN } from '@/app-core/paths';
|
||||||
import { clsx } from 'clsx/lite';
|
import { clsx } from 'clsx/lite';
|
||||||
import { redirect } from 'next/navigation';
|
import { redirect } from 'next/navigation';
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import {
|
|||||||
PATH_ROOT,
|
PATH_ROOT,
|
||||||
absolutePathForPhoto,
|
absolutePathForPhoto,
|
||||||
absolutePathForPhotoImage,
|
absolutePathForPhotoImage,
|
||||||
} from '@/site/paths';
|
} from '@/app-core/paths';
|
||||||
import PhotoDetailPage from '@/photo/PhotoDetailPage';
|
import PhotoDetailPage from '@/photo/PhotoDetailPage';
|
||||||
import { getPhotosNearIdCached } from '@/photo/cache';
|
import { getPhotosNearIdCached } from '@/photo/cache';
|
||||||
import { cache } from 'react';
|
import { cache } from 'react';
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import {
|
|||||||
MAX_PHOTOS_TO_SHOW_PER_TAG,
|
MAX_PHOTOS_TO_SHOW_PER_TAG,
|
||||||
} from '@/image-response';
|
} from '@/image-response';
|
||||||
import TagImageResponse from '@/image-response/TagImageResponse';
|
import TagImageResponse from '@/image-response/TagImageResponse';
|
||||||
import { getIBMPlexMonoMedium } from '@/site/font';
|
import { getIBMPlexMonoMedium } from '@/app-core/font';
|
||||||
import { ImageResponse } from 'next/og';
|
import { ImageResponse } from 'next/og';
|
||||||
import { getImageResponseCacheControlHeaders } from '@/image-response/cache';
|
import { getImageResponseCacheControlHeaders } from '@/image-response/cache';
|
||||||
import { GENERATE_STATIC_PARAMS_LIMIT } from '@/photo/db';
|
import { GENERATE_STATIC_PARAMS_LIMIT } from '@/photo/db';
|
||||||
@ -12,7 +12,7 @@ import { getUniqueTags } from '@/photo/db/query';
|
|||||||
import {
|
import {
|
||||||
STATICALLY_OPTIMIZED_PHOTO_CATEGORY_OG_IMAGES,
|
STATICALLY_OPTIMIZED_PHOTO_CATEGORY_OG_IMAGES,
|
||||||
IS_PRODUCTION,
|
IS_PRODUCTION,
|
||||||
} from '@/site/config';
|
} from '@/app-core/config';
|
||||||
|
|
||||||
export let generateStaticParams:
|
export let generateStaticParams:
|
||||||
(() => Promise<{ tag: string }[]>) | undefined = undefined;
|
(() => Promise<{ tag: string }[]>) | undefined = undefined;
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import { INFINITE_SCROLL_GRID_INITIAL } from '@/photo';
|
import { INFINITE_SCROLL_GRID_INITIAL } from '@/photo';
|
||||||
import { getUniqueTags } from '@/photo/db/query';
|
import { getUniqueTags } from '@/photo/db/query';
|
||||||
import { IS_PRODUCTION } from '@/site/config';
|
import { IS_PRODUCTION } from '@/app-core/config';
|
||||||
import { STATICALLY_OPTIMIZED_PHOTO_CATEGORIES } from '@/site/config';
|
import { STATICALLY_OPTIMIZED_PHOTO_CATEGORIES } from '@/app-core/config';
|
||||||
import { PATH_ROOT } from '@/site/paths';
|
import { PATH_ROOT } from '@/app-core/paths';
|
||||||
import { generateMetaForTag } from '@/tag';
|
import { generateMetaForTag } from '@/tag';
|
||||||
import TagOverview from '@/tag/TagOverview';
|
import TagOverview from '@/tag/TagOverview';
|
||||||
import { getPhotosTagDataCached } from '@/tag/data';
|
import { getPhotosTagDataCached } from '@/tag/data';
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import {
|
|||||||
getPhotosNearIdCached,
|
getPhotosNearIdCached,
|
||||||
} from '@/photo/cache';
|
} from '@/photo/cache';
|
||||||
import { getPhotosMeta } from '@/photo/db/query';
|
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 { TAG_HIDDEN } from '@/tag';
|
||||||
import { Metadata } from 'next';
|
import { Metadata } from 'next';
|
||||||
import { redirect } from 'next/navigation';
|
import { redirect } from 'next/navigation';
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import SiteGrid from '@/components/SiteGrid';
|
|||||||
import PhotoGrid from '@/photo/PhotoGrid';
|
import PhotoGrid from '@/photo/PhotoGrid';
|
||||||
import { getPhotosNoStore } from '@/photo/cache';
|
import { getPhotosNoStore } from '@/photo/cache';
|
||||||
import { getPhotosMeta } from '@/photo/db/query';
|
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 { TAG_HIDDEN, descriptionForTaggedPhotos, titleForTag } from '@/tag';
|
||||||
import HiddenHeader from '@/tag/HiddenHeader';
|
import HiddenHeader from '@/tag/HiddenHeader';
|
||||||
import { Metadata } from 'next';
|
import { Metadata } from 'next';
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import {
|
|||||||
} from '@/image-response';
|
} from '@/image-response';
|
||||||
import TemplateImageResponse from
|
import TemplateImageResponse from
|
||||||
'@/image-response/TemplateImageResponse';
|
'@/image-response/TemplateImageResponse';
|
||||||
import { getIBMPlexMonoMedium } from '@/site/font';
|
import { getIBMPlexMonoMedium } from '@/app-core/font';
|
||||||
import { ImageResponse } from 'next/og';
|
import { ImageResponse } from 'next/og';
|
||||||
import { getImageResponseCacheControlHeaders } from '@/image-response/cache';
|
import { getImageResponseCacheControlHeaders } from '@/image-response/cache';
|
||||||
import { isNextImageReadyBasedOnPhotos } from '@/photo';
|
import { isNextImageReadyBasedOnPhotos } from '@/photo';
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import {
|
|||||||
} from '@/image-response';
|
} from '@/image-response';
|
||||||
import TemplateImageResponse from
|
import TemplateImageResponse from
|
||||||
'@/image-response/TemplateImageResponse';
|
'@/image-response/TemplateImageResponse';
|
||||||
import { getIBMPlexMonoMedium } from '@/site/font';
|
import { getIBMPlexMonoMedium } from '@/app-core/font';
|
||||||
import { ImageResponse } from 'next/og';
|
import { ImageResponse } from 'next/og';
|
||||||
import { getImageResponseCacheControlHeaders } from '@/image-response/cache';
|
import { getImageResponseCacheControlHeaders } from '@/image-response/cache';
|
||||||
import { isNextImageReadyBasedOnPhotos } from '@/photo';
|
import { isNextImageReadyBasedOnPhotos } from '@/photo';
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import {
|
|||||||
signIn,
|
signIn,
|
||||||
signOut,
|
signOut,
|
||||||
} from '@/auth';
|
} 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 type { Session } from 'next-auth';
|
||||||
import { redirect } from 'next/navigation';
|
import { redirect } from 'next/navigation';
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { isPathProtected } from '@/site/paths';
|
import { isPathProtected } from '@/app-core/paths';
|
||||||
import NextAuth, { User } from 'next-auth';
|
import NextAuth, { User } from 'next-auth';
|
||||||
import Credentials from 'next-auth/providers/credentials';
|
import Credentials from 'next-auth/providers/credentials';
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Photo, PhotoDateRange } from '@/photo';
|
import { Photo, PhotoDateRange } from '@/photo';
|
||||||
import { absolutePathForCameraImage, pathForCamera } from '@/site/paths';
|
import { absolutePathForCameraImage, pathForCamera } from '@/app-core/paths';
|
||||||
import OGTile from '@/components/OGTile';
|
import OGTile from '@/components/OGTile';
|
||||||
import { Camera } from '.';
|
import { Camera } from '.';
|
||||||
import { descriptionForCameraPhotos, titleForCamera } from './meta';
|
import { descriptionForCameraPhotos, titleForCamera } from './meta';
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { absolutePathForCamera } from '@/site/paths';
|
import { absolutePathForCamera } from '@/app-core/paths';
|
||||||
import { PhotoSetAttributes } from '../photo';
|
import { PhotoSetAttributes } from '../photo';
|
||||||
import ShareModal from '@/share/ShareModal';
|
import ShareModal from '@/share/ShareModal';
|
||||||
import CameraOGTile from './CameraOGTile';
|
import CameraOGTile from './CameraOGTile';
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { AiFillApple } from 'react-icons/ai';
|
import { AiFillApple } from 'react-icons/ai';
|
||||||
import { pathForCamera } from '@/site/paths';
|
import { pathForCamera } from '@/app-core/paths';
|
||||||
import { IoMdCamera } from 'react-icons/io';
|
import { IoMdCamera } from 'react-icons/io';
|
||||||
import { Camera, formatCameraText, isCameraApple } from '.';
|
import { Camera, formatCameraText, isCameraApple } from '.';
|
||||||
import EntityLink, {
|
import EntityLink, {
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import { Camera, cameraFromPhoto, formatCameraText } from '.';
|
|||||||
import {
|
import {
|
||||||
absolutePathForCamera,
|
absolutePathForCamera,
|
||||||
absolutePathForCameraImage,
|
absolutePathForCameraImage,
|
||||||
} from '@/site/paths';
|
} from '@/app-core/paths';
|
||||||
|
|
||||||
// Meta functions moved to separate file to avoid
|
// Meta functions moved to separate file to avoid
|
||||||
// dependencies (camelcase-keys) found in photo/index.ts
|
// dependencies (camelcase-keys) found in photo/index.ts
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import Badge from './Badge';
|
|||||||
import ResponsiveText from './primitives/ResponsiveText';
|
import ResponsiveText from './primitives/ResponsiveText';
|
||||||
import { parameterize } from '@/utility/string';
|
import { parameterize } from '@/utility/string';
|
||||||
|
|
||||||
export default function Checklist({
|
export default function ChecklistGroup({
|
||||||
title,
|
title,
|
||||||
titleShort,
|
titleShort,
|
||||||
icon,
|
icon,
|
||||||
@ -25,13 +25,13 @@ export default function Container({
|
|||||||
switch (color) {
|
switch (color) {
|
||||||
case 'gray': return [
|
case 'gray': return [
|
||||||
'text-medium',
|
'text-medium',
|
||||||
'bg-gray-50 border-gray-200',
|
'bg-gray-50 dark:bg-gray-900/40',
|
||||||
'dark:bg-gray-900/40 dark:border-gray-800',
|
'border-gray-200 dark:border-gray-800',
|
||||||
];
|
];
|
||||||
case 'blue': return [
|
case 'blue': return [
|
||||||
'text-main',
|
'text-blue-900 dark:text-blue-300',
|
||||||
'bg-blue-50/50 border-blue-200',
|
'bg-blue-50/50 dark:bg-blue-950/30',
|
||||||
'dark:bg-blue-950/30 dark:border-blue-600/50',
|
'border-blue-200 dark:border-blue-600/30',
|
||||||
];
|
];
|
||||||
case 'red': return [
|
case 'red': return [
|
||||||
'text-red-600 dark:text-red-500/90',
|
'text-red-600 dark:text-red-500/90',
|
||||||
@ -41,7 +41,7 @@ export default function Container({
|
|||||||
case 'yellow': return [
|
case 'yellow': return [
|
||||||
'text-amber-700 dark:text-amber-500/90',
|
'text-amber-700 dark:text-amber-500/90',
|
||||||
'bg-amber-50/50 dark:bg-amber-950/30',
|
'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',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { ReactNode } from 'react';
|
import { ReactNode } from 'react';
|
||||||
import SiteGrid from './SiteGrid';
|
import SiteGrid from './SiteGrid';
|
||||||
import { clsx } from 'clsx/lite';
|
import { clsx } from 'clsx/lite';
|
||||||
import { PATH_ROOT } from '@/site/paths';
|
import { PATH_ROOT } from '@/app-core/paths';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
|
|
||||||
export default function HttpStatusPage({
|
export default function HttpStatusPage({
|
||||||
|
|||||||
@ -6,9 +6,9 @@ import { clsx } from 'clsx/lite';
|
|||||||
import useClickInsideOutside from '@/utility/useClickInsideOutside';
|
import useClickInsideOutside from '@/utility/useClickInsideOutside';
|
||||||
import { useRouter } from 'next/navigation';
|
import { useRouter } from 'next/navigation';
|
||||||
import AnimateItems from './AnimateItems';
|
import AnimateItems from './AnimateItems';
|
||||||
import { PATH_ROOT } from '@/site/paths';
|
import { PATH_ROOT } from '@/app-core/paths';
|
||||||
import usePrefersReducedMotion from '@/utility/usePrefersReducedMotion';
|
import usePrefersReducedMotion from '@/utility/usePrefersReducedMotion';
|
||||||
import useMetaThemeColor from '@/site/useMetaThemeColor';
|
import useMetaThemeColor from '@/utility/useMetaThemeColor';
|
||||||
import useEscapeHandler from '@/utility/useEscapeHandler';
|
import useEscapeHandler from '@/utility/useEscapeHandler';
|
||||||
|
|
||||||
export default function Modal({
|
export default function Modal({
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { clsx } from 'clsx/lite';
|
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 { JSX } from 'react';
|
||||||
import Spinner from './Spinner';
|
import Spinner from './Spinner';
|
||||||
import LinkWithLoader from './LinkWithLoader';
|
import LinkWithLoader from './LinkWithLoader';
|
||||||
|
|||||||
@ -22,7 +22,7 @@ import {
|
|||||||
PATH_SIGN_IN,
|
PATH_SIGN_IN,
|
||||||
pathForPhoto,
|
pathForPhoto,
|
||||||
pathForTag,
|
pathForTag,
|
||||||
} from '../../site/paths';
|
} from '../../app-core/paths';
|
||||||
import Modal from '../Modal';
|
import Modal from '../Modal';
|
||||||
import { clsx } from 'clsx/lite';
|
import { clsx } from 'clsx/lite';
|
||||||
import { useDebounce } from 'use-debounce';
|
import { useDebounce } from 'use-debounce';
|
||||||
@ -46,7 +46,7 @@ import { Tags, addHiddenToTags, formatTag } from '@/tag';
|
|||||||
import { FaTag } from 'react-icons/fa';
|
import { FaTag } from 'react-icons/fa';
|
||||||
import { formatCount, formatCountDescriptive } from '@/utility/string';
|
import { formatCount, formatCountDescriptive } from '@/utility/string';
|
||||||
import CommandKItem from './CommandKItem';
|
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 { DialogDescription, DialogTitle } from '@radix-ui/react-dialog';
|
||||||
import * as VisuallyHidden from '@radix-ui/react-visually-hidden';
|
import * as VisuallyHidden from '@radix-ui/react-visually-hidden';
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { IMAGE_QUALITY } from '@/site/config';
|
import { IMAGE_QUALITY } from '@/app-core/config';
|
||||||
import { IMAGE_WIDTH_LARGE, ImageProps } from '.';
|
import { IMAGE_WIDTH_LARGE, ImageProps } from '.';
|
||||||
import ImageWithFallback from './ImageWithFallback';
|
import ImageWithFallback from './ImageWithFallback';
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
/* eslint-disable jsx-a11y/alt-text */
|
/* 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 { useAppState } from '@/state/AppState';
|
||||||
import { clsx} from 'clsx/lite';
|
import { clsx} from 'clsx/lite';
|
||||||
import Image, { ImageProps } from 'next/image';
|
import Image, { ImageProps } from 'next/image';
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import useMetaThemeColor from '@/site/useMetaThemeColor';
|
import useMetaThemeColor from '@/utility/useMetaThemeColor';
|
||||||
import { useAppState } from '@/state/AppState';
|
import { useAppState } from '@/state/AppState';
|
||||||
import useKeydownHandler from '@/utility/useKeydownHandler';
|
import useKeydownHandler from '@/utility/useKeydownHandler';
|
||||||
import { RefObject, useCallback, useEffect, useRef, useState } from 'react';
|
import { RefObject, useCallback, useEffect, useRef, useState } from 'react';
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { Photo, PhotoDateRange } from '@/photo';
|
|||||||
import {
|
import {
|
||||||
absolutePathForFocalLengthImage,
|
absolutePathForFocalLengthImage,
|
||||||
pathForFocalLength,
|
pathForFocalLength,
|
||||||
} from '@/site/paths';
|
} from '@/app-core/paths';
|
||||||
import OGTile from '@/components/OGTile';
|
import OGTile from '@/components/OGTile';
|
||||||
import { descriptionForFocalLengthPhotos, titleForFocalLength } from '.';
|
import { descriptionForFocalLengthPhotos, titleForFocalLength } from '.';
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { absolutePathForFocalLength } from '@/site/paths';
|
import { absolutePathForFocalLength } from '@/app-core/paths';
|
||||||
import { PhotoSetAttributes } from '../photo';
|
import { PhotoSetAttributes } from '../photo';
|
||||||
import ShareModal from '@/share/ShareModal';
|
import ShareModal from '@/share/ShareModal';
|
||||||
import FocalLengthOGTile from './FocalLengthOGTile';
|
import FocalLengthOGTile from './FocalLengthOGTile';
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { pathForFocalLength } from '@/site/paths';
|
import { pathForFocalLength } from '@/app-core/paths';
|
||||||
import EntityLink, {
|
import EntityLink, {
|
||||||
EntityLinkExternalProps,
|
EntityLinkExternalProps,
|
||||||
} from '@/components/primitives/EntityLink';
|
} from '@/components/primitives/EntityLink';
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import {
|
|||||||
import {
|
import {
|
||||||
absolutePathForFocalLength,
|
absolutePathForFocalLength,
|
||||||
absolutePathForFocalLengthImage,
|
absolutePathForFocalLengthImage,
|
||||||
} from '@/site/paths';
|
} from '@/app-core/paths';
|
||||||
|
|
||||||
export type FocalLengths = {
|
export type FocalLengths = {
|
||||||
focal: number
|
focal: number
|
||||||
|
|||||||
@ -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 { Photo } from '../photo';
|
||||||
import ImageCaption from './components/ImageCaption';
|
import ImageCaption from './components/ImageCaption';
|
||||||
import ImageContainer from './components/ImageContainer';
|
import ImageContainer from './components/ImageContainer';
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import { AiFillApple } from 'react-icons/ai';
|
|||||||
import ImageCaption from './components/ImageCaption';
|
import ImageCaption from './components/ImageCaption';
|
||||||
import ImagePhotoGrid from './components/ImagePhotoGrid';
|
import ImagePhotoGrid from './components/ImagePhotoGrid';
|
||||||
import ImageContainer from './components/ImageContainer';
|
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 { NextImageSize } from '@/services/next-image';
|
||||||
import { cameraFromPhoto, formatCameraText } from '@/camera';
|
import { cameraFromPhoto, formatCameraText } from '@/camera';
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { Photo } from '../photo';
|
import { Photo } from '../photo';
|
||||||
import IconFeed from '@/site/IconFeed';
|
import IconFeed from '@/app-core/IconFeed';
|
||||||
import IconGrid from '@/site/IconGrid';
|
import IconGrid from '@/app-core/IconGrid';
|
||||||
import ImagePhotoGrid from './components/ImagePhotoGrid';
|
import ImagePhotoGrid from './components/ImagePhotoGrid';
|
||||||
import { NextImageSize } from '@/services/next-image';
|
import { NextImageSize } from '@/services/next-image';
|
||||||
|
|
||||||
|
|||||||
@ -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';
|
import { ReactNode } from 'react';
|
||||||
|
|
||||||
const GRADIENT_STOPS = 'rgba(0,0,0,0), rgba(0,0,0,0.3), rgba(0,0,0,0.7)';
|
const GRADIENT_STOPS = 'rgba(0,0,0,0), rgba(0,0,0,0.3), rgba(0,0,0,0.7)';
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import {
|
|||||||
NextImageSize,
|
NextImageSize,
|
||||||
getNextImageUrlForRequest,
|
getNextImageUrlForRequest,
|
||||||
} from '@/services/next-image';
|
} from '@/services/next-image';
|
||||||
import { IS_PREVIEW } from '@/site/config';
|
import { IS_PREVIEW } from '@/app-core/config';
|
||||||
|
|
||||||
export default function ImagePhotoGrid({
|
export default function ImagePhotoGrid({
|
||||||
photos,
|
photos,
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import {
|
|||||||
PATH_OG_SAMPLE,
|
PATH_OG_SAMPLE,
|
||||||
PREFIX_PHOTO,
|
PREFIX_PHOTO,
|
||||||
PREFIX_TAG,
|
PREFIX_TAG,
|
||||||
} from './site/paths';
|
} from './app-core/paths';
|
||||||
|
|
||||||
export default function middleware(req: NextRequest, res:NextResponse) {
|
export default function middleware(req: NextRequest, res:NextResponse) {
|
||||||
const pathname = req.nextUrl.pathname;
|
const pathname = req.nextUrl.pathname;
|
||||||
|
|||||||
@ -16,7 +16,7 @@ import { clsx } from 'clsx/lite';
|
|||||||
import { useAppState } from '@/state/AppState';
|
import { useAppState } from '@/state/AppState';
|
||||||
import { GetPhotosOptions } from './db';
|
import { GetPhotosOptions } from './db';
|
||||||
import useVisible from '@/utility/useVisible';
|
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 = (
|
export type RevalidatePhoto = (
|
||||||
photoId: string,
|
photoId: string,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import AdminChildPage from '@/components/AdminChildPage';
|
import AdminChildPage from '@/components/AdminChildPage';
|
||||||
import { Photo } from '.';
|
import { Photo } from '.';
|
||||||
import { PATH_ADMIN_PHOTOS } from '@/site/paths';
|
import { PATH_ADMIN_PHOTOS } from '@/app-core/paths';
|
||||||
import { PhotoFormData, convertPhotoToFormData } from './form';
|
import { PhotoFormData, convertPhotoToFormData } from './form';
|
||||||
import PhotoForm from './form/PhotoForm';
|
import PhotoForm from './form/PhotoForm';
|
||||||
import { Tags } from '@/tag';
|
import { Tags } from '@/tag';
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { getEscapePath } from '@/site/paths';
|
import { getEscapePath } from '@/app-core/paths';
|
||||||
import { useRouter, usePathname } from 'next/navigation';
|
import { useRouter, usePathname } from 'next/navigation';
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
import useEscapeHandler from '../utility/useEscapeHandler';
|
import useEscapeHandler from '../utility/useEscapeHandler';
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import { Photo, PhotoSetCategory } from '.';
|
|||||||
import PhotoMedium from './PhotoMedium';
|
import PhotoMedium from './PhotoMedium';
|
||||||
import { clsx } from 'clsx/lite';
|
import { clsx } from 'clsx/lite';
|
||||||
import AnimateItems from '@/components/AnimateItems';
|
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 { useAppState } from '@/state/AppState';
|
||||||
import SelectTileOverlay from '@/components/SelectTileOverlay';
|
import SelectTileOverlay from '@/components/SelectTileOverlay';
|
||||||
import { JSX } from 'react';
|
import { JSX } from 'react';
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user