qazaq-legacy-foundation-web/src/globals/SiteSettings.ts
Peppa e60e7ce464
All checks were successful
peppa/lint lint: success за 2с
peppa/typecheck typecheck: success за 2с
peppa/test test: success за 1с
peppa/build build: success за 50с
ci / checks (pull_request) Successful in 1m38s
deploy / deploy (pull_request) Successful in 18s
QLFW-77: ряд фото книги в «Наших проектах» и фото из админки
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-19 17:16:07 +05:00

29 lines
1.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import type { GlobalConfig } from 'payload'
export const SiteSettings: GlobalConfig = {
slug: 'site-settings',
label: 'Контакты и соцсети',
access: { read: () => true },
fields: [
{ name: 'email', label: 'Почта для связи', type: 'email' },
{ name: 'phone', label: 'Телефон', type: 'text' },
{ name: 'address', label: 'Адрес', type: 'text', localized: true },
{
name: 'bookPhotos',
label: 'Фотографии книги (после четырёх основных)',
type: 'array',
admin: { description: 'Новое фото появится в ряду фотографий книги тем же размером. Порядок — как в списке.' },
fields: [{ name: 'photo', label: 'Фото', type: 'upload', relationTo: 'media', required: true }],
},
{
name: 'socials',
label: 'Социальные сети',
type: 'array',
fields: [
{ name: 'label', label: 'Название (например, Instagram)', type: 'text', required: true },
{ name: 'url', label: 'Ссылка', type: 'text', required: true, validate: (v: string | null | undefined) => (v && /^https?:\/\//.test(v) ? true : 'Ссылка должна начинаться с https://') },
],
},
],
}