Shumiland/src/globals/Footer.ts
Vadym Samoilenko 55a3aafc27
Some checks are pending
CI / Type Check (push) Waiting to run
CI / Lint (push) Waiting to run
CI / Unit Tests (push) Waiting to run
Deploy / Build & Push Image (push) Waiting to run
Deploy / Deploy to VPS (push) Blocked by required conditions
feat(cms): admin UX — groups, timezone, title suffix
Add admin.group to all 24 globals/collections so the Payload Admin
sidebar is organized into logical sections (Сторінки, Контент сайту,
Каталог, Блог, Заявки та замовлення, Медіа, Система). Add admin.meta
titleSuffix '— Шуміленд CMS', defaultTimezone Europe/Kyiv, dateFormat
dd.MM.yyyy HH:mm.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 16:58:47 +01:00

49 lines
1.3 KiB
TypeScript

import type { GlobalConfig } from 'payload'
import { isAdminOrEditor } from '@/access/isAdminOrEditor'
import { revalidateGlobalAfterChange } from '@/hooks/revalidatePath'
export const Footer: GlobalConfig = {
slug: 'footer',
admin: { group: 'Контент сайту' },
access: { read: () => true, update: isAdminOrEditor },
hooks: { afterChange: [revalidateGlobalAfterChange] },
fields: [
{ name: 'logo', type: 'upload', relationTo: 'media' },
{ name: 'logoAlt', type: 'text' },
{
name: 'navLinks',
type: 'array',
fields: [
{ name: 'label', type: 'text' },
{ name: 'href', type: 'text' },
],
},
{
name: 'contacts',
type: 'group',
fields: [
{ name: 'phone', type: 'text' },
{ name: 'email', type: 'email' },
{ name: 'address', type: 'text' },
],
},
{
name: 'socials',
type: 'array',
fields: [
{
name: 'platform',
type: 'select',
options: [
{ label: 'Instagram', value: 'instagram' },
{ label: 'Facebook', value: 'facebook' },
{ label: 'YouTube', value: 'youtube' },
{ label: 'TikTok', value: 'tiktok' },
],
},
{ name: 'url', type: 'text' },
],
},
{ name: 'copyrightText', type: 'text' },
],
}