fix(ui): apply consistent styling to custom & default block thumbnails (#11555)

Fixes #9744
This commit is contained in:
Patrik
2025-03-06 15:34:25 -05:00
committed by GitHub
parent b0da85dfea
commit 8378654fd0
9 changed files with 73 additions and 25 deletions

View File

@@ -69,10 +69,15 @@ const dirname = path.dirname(filename)
export const seed = async (_payload: Payload) => {
const jpgPath = path.resolve(dirname, './collections/Upload/payload.jpg')
const jpg480x320Path = path.resolve(dirname, './collections/Upload/payload480x320.jpg')
const pngPath = path.resolve(dirname, './uploads/payload.png')
// Get both files in parallel
const [jpgFile, pngFile] = await Promise.all([getFileByPath(jpgPath), getFileByPath(pngPath)])
const [jpgFile, jpg480x320File, pngFile] = await Promise.all([
getFileByPath(jpgPath),
getFileByPath(jpg480x320Path),
getFileByPath(pngPath),
])
const createdArrayDoc = await _payload.create({
collection: arrayFieldsSlug,
@@ -121,6 +126,14 @@ export const seed = async (_payload: Payload) => {
overrideAccess: true,
})
await _payload.create({
collection: uploadsSlug,
data: {},
file: jpg480x320File,
depth: 0,
overrideAccess: true,
})
// const createdJPGDocSlug2 = await _payload.create({
// collection: uploads2Slug,
// data: {