From 0d20e7f7388af58af580665dee0d434de7bf6d57 Mon Sep 17 00:00:00 2001 From: Max Schmidt Date: Fri, 19 May 2023 13:30:03 +0200 Subject: [PATCH] hallo Signed-off-by: Max Schmidt --- payload/src/collections/Media.ts | 14 ++++++++------ tsconfig.json | 12 ++++++++++++ 2 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 tsconfig.json diff --git a/payload/src/collections/Media.ts b/payload/src/collections/Media.ts index 00f928d..b3fd5fd 100644 --- a/payload/src/collections/Media.ts +++ b/payload/src/collections/Media.ts @@ -2,10 +2,6 @@ import { CollectionConfig } from "payload/types"; export const Media: CollectionConfig = { slug: "media", - labels: { - singular: "Bild", - plural: "Bilder", - }, admin: {}, access: { read: (): boolean => true, @@ -15,10 +11,16 @@ export const Media: CollectionConfig = { upload: { staticURL: "/media", staticDir: "media", - mimeTypes: ["image/*"], + adminThumbnail: ({ doc }) => `/media/${doc.src}`, }, - fields: [], + + fields: [ + { + name: "alt", + type: "text", + }, + ], }; export default Media; diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..6823519 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,12 @@ +{ + "include": ["*.ts"], + "exclude": ["node_modules"], + "references": [ + { + "path": "./astro/tsconfig.json" + }, + { + "path": "./payload/tsconfig.json" + } + ] +}