diff --git a/src/collections/Audios/Audios.ts b/src/collections/Audios/Audios.ts index ebe2efe..9aa317e 100644 --- a/src/collections/Audios/Audios.ts +++ b/src/collections/Audios/Audios.ts @@ -31,6 +31,7 @@ export const Audios = buildCollectionConfig({ admin: { group: CollectionGroups.Media, preview: ({ id }) => `${process.env.PAYLOAD_PUBLIC_FRONTEND_BASE_URL}/en/audios/${id}`, + useAsTitle: fields.filename, defaultColumns: [ fields.filename, fields.thumbnail, diff --git a/src/collections/Images/Images.ts b/src/collections/Images/Images.ts index 3b61037..46e5e79 100644 --- a/src/collections/Images/Images.ts +++ b/src/collections/Images/Images.ts @@ -36,6 +36,7 @@ export const Images = buildImageCollectionConfig({ admin: { preview: ({ id }) => `${process.env.PAYLOAD_PUBLIC_FRONTEND_BASE_URL}/en/images/${id}`, defaultColumns: [fields.filename, fields.posts, fields.updatedAt], + useAsTitle: fields.filename, }, upload: { imageSizes: [ diff --git a/src/collections/Scans/Scans.ts b/src/collections/Scans/Scans.ts index 9c6e4f0..31373bd 100644 --- a/src/collections/Scans/Scans.ts +++ b/src/collections/Scans/Scans.ts @@ -17,6 +17,7 @@ export const Scans = buildImageCollectionConfig({ plural: "Scans", }, admin: { + useAsTitle: fields.filename, defaultColumns: [fields.filename, fields.updatedAt], hidden: shownOnlyToAdmin, }, diff --git a/src/collections/Videos/Videos.ts b/src/collections/Videos/Videos.ts index b9abf49..bb39b9f 100644 --- a/src/collections/Videos/Videos.ts +++ b/src/collections/Videos/Videos.ts @@ -40,6 +40,7 @@ export const Videos = buildCollectionConfig({ labels: { singular: "Video", plural: "Videos" }, defaultSort: fields.filename, admin: { + useAsTitle: fields.filename, group: CollectionGroups.Media, preview: ({ id }) => `${process.env.PAYLOAD_PUBLIC_FRONTEND_BASE_URL}/en/videos/${id}`, defaultColumns: [ diff --git a/src/collections/VideosSubtitles/VideosSubtitles.ts b/src/collections/VideosSubtitles/VideosSubtitles.ts index 36dff73..9774a0b 100644 --- a/src/collections/VideosSubtitles/VideosSubtitles.ts +++ b/src/collections/VideosSubtitles/VideosSubtitles.ts @@ -5,7 +5,12 @@ import { buildCollectionConfig } from "../../utils/collectionConfig"; export const VideosSubtitles = buildCollectionConfig({ slug: Collections.VideosSubtitles, labels: { singular: "Video Subtitle", plural: "Videos Subtitles" }, - admin: { group: CollectionGroups.Media, disableDuplicate: true, hidden: shownOnlyToAdmin }, + admin: { + useAsTitle: "filename", + group: CollectionGroups.Media, + disableDuplicate: true, + hidden: shownOnlyToAdmin, + }, upload: { mimeTypes: ["text/*"], disableLocalStorage: true,