From 3c8c92380633f09a58c8dab20dd5bc5cbd107970 Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Wed, 14 Feb 2024 12:55:31 -0600 Subject: [PATCH 1/4] Code cleanup --- next.config.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/next.config.js b/next.config.js index 622bcafa..f0ff1b30 100644 --- a/next.config.js +++ b/next.config.js @@ -2,14 +2,14 @@ const VERCEL_BLOB_STORE_ID = process.env.BLOB_READ_WRITE_TOKEN?.match( /^vercel_blob_rw_([a-z0-9]+)_[a-z0-9]+$/i, )?.[1].toLowerCase(); -const VERCEL_BLOB_HOSTNAME = VERCEL_BLOB_STORE_ID +const HOSTNAME_VERCEL_BLOB = VERCEL_BLOB_STORE_ID ? `${VERCEL_BLOB_STORE_ID}.public.blob.vercel-storage.com` : undefined; -const CLOUDFLARE_R2_HOSTNAME = +const HOSTNAME_CLOUDFLARE_R2 = process.env.NEXT_PUBLIC_CLOUDFLARE_R2_PUBLIC_DOMAIN; -const AWS_S3_HOSTNAME = +const HOSTNAME_AWS_S3 = process.env.NEXT_PUBLIC_AWS_S3_BUCKET && process.env.NEXT_PUBLIC_AWS_S3_REGION // eslint-disable-next-line max-len @@ -30,9 +30,9 @@ const nextConfig = { images: { imageSizes: [200], remotePatterns: [] - .concat(createRemotePattern(VERCEL_BLOB_HOSTNAME)) - .concat(createRemotePattern(CLOUDFLARE_R2_HOSTNAME)) - .concat(createRemotePattern(AWS_S3_HOSTNAME)), + .concat(createRemotePattern(HOSTNAME_VERCEL_BLOB)) + .concat(createRemotePattern(HOSTNAME_CLOUDFLARE_R2)) + .concat(createRemotePattern(HOSTNAME_AWS_S3)), minimumCacheTTL: 31536000, }, }; From c506dd2b19cdd61a8ccc6d19e9c47ec0e81fc9a4 Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Wed, 14 Feb 2024 20:07:18 -0600 Subject: [PATCH 2/4] Update README --- .vscode/settings.json | 1 + README.md | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 84c45555..1a06b433 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -18,6 +18,7 @@ "headlessui", "hgetall", "hset", + "jpgs", "Lightbox", "Makernote", "nanoids", diff --git a/README.md b/README.md index ffb3fa35..1a462320 100644 --- a/README.md +++ b/README.md @@ -58,11 +58,17 @@ Installation 1. Open project on Vercel 2. Click "Analytics" tab -3. Follow "Enable Web Analytics" instructions (`@vercel/analytics` is already part of your project) +3. Follow "Enable Web Analytics" instructions (`@vercel/analytics` already included) -### 6. Optional configuration +### 6. Add Speed Insights (optional) -- `NEXT_PUBLIC_PRO_MODE = 1` enables higher quality image storage (will result in increased storage usage) +1. Open project on Vercel +2. Click "Speed Insights" tab +3. Follow "Enable Speed Insights" instructions (`@vercel/speed-insights` already included) + +### 7. Optional configuration + +- `NEXT_PUBLIC_PRO_MODE = 1` enables higher quality image storage for jpgs (will result in increased storage usage) - `NEXT_PUBLIC_BLUR_DISABLED = 1` prevents image blur data being stored and displayed (potentially useful for limiting Postgres usage) - `NEXT_PUBLIC_GEO_PRIVACY = 1` disables collection/display of location-based data - `NEXT_PUBLIC_IGNORE_PRIORITY_ORDER = 1` prevents `priority_order` field affecting photo order From 6d3d893d1b2047b8ad04090e19eba50d7a940626 Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Wed, 14 Feb 2024 21:16:24 -0600 Subject: [PATCH 3/4] Fix line break in photo headers --- src/photo/PhotoSetHeader.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/photo/PhotoSetHeader.tsx b/src/photo/PhotoSetHeader.tsx index e93a5752..163a8a9f 100644 --- a/src/photo/PhotoSetHeader.tsx +++ b/src/photo/PhotoSetHeader.tsx @@ -50,7 +50,7 @@ export default function PhotoSetHeader({ {entity} } + + + } Date: Fri, 16 Feb 2024 00:11:29 -0600 Subject: [PATCH 4/4] Refine admin menu --- src/admin/AdminPhotoMenuClient.tsx | 6 +++--- src/components/MoreMenu.tsx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/admin/AdminPhotoMenuClient.tsx b/src/admin/AdminPhotoMenuClient.tsx index 6f72e2b1..1ac25252 100644 --- a/src/admin/AdminPhotoMenuClient.tsx +++ b/src/admin/AdminPhotoMenuClient.tsx @@ -22,15 +22,15 @@ export default function AdminPhotoMenuClient({ , + label: 'Edit', + icon: , href: pathForAdminPhotoEdit(photo.id), }, { label: isFav ? 'Unfavorite' : 'Favorite', icon: isFav ? :