Added preview links to all media

This commit is contained in:
DrMint 2024-04-11 07:52:23 +02:00
parent 5e306cfde3
commit afc8cde2c2
3 changed files with 6 additions and 1 deletions

View File

@ -28,6 +28,7 @@ export const Audios = buildCollectionConfig({
defaultSort: fields.updatedAt, defaultSort: fields.updatedAt,
admin: { admin: {
group: CollectionGroups.Media, group: CollectionGroups.Media,
preview: ({ slug }) => `https://v3.accords-library.com/en/audios/${slug}`,
defaultColumns: [ defaultColumns: [
fields.filename, fields.filename,
fields.thumbnail, fields.thumbnail,

View File

@ -25,7 +25,10 @@ export const Images = buildImageCollectionConfig({
singular: "Image", singular: "Image",
plural: "Images", plural: "Images",
}, },
admin: { defaultColumns: [fields.filename, fields.posts, fields.updatedAt] }, admin: {
preview: ({ slug }) => `https://v3.accords-library.com/en/images/${slug}`,
defaultColumns: [fields.filename, fields.posts, fields.updatedAt],
},
upload: { upload: {
imageSizes: [ imageSizes: [
{ {

View File

@ -37,6 +37,7 @@ export const Videos = buildCollectionConfig({
defaultSort: fields.updatedAt, defaultSort: fields.updatedAt,
admin: { admin: {
group: CollectionGroups.Media, group: CollectionGroups.Media,
preview: ({ slug }) => `https://v3.accords-library.com/en/videos/${slug}`,
defaultColumns: [ defaultColumns: [
fields.filename, fields.filename,
fields.thumbnail, fields.thumbnail,