feat(cms): enable drafts + autosave for key globals

Enable versions with draft autosave (interval 2000ms, max 20) for
HomePage, GroupVisitsPage, BirthdayPage, TicketsPage, LocationsPage,
BlogIndexPage — editors can now save drafts without publishing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Vadym Samoilenko 2026-05-15 16:54:09 +01:00
parent a134be0df0
commit b1fd23d9a2
6 changed files with 6 additions and 0 deletions

View file

@ -7,6 +7,7 @@ export const BirthdayPage: GlobalConfig = {
label: 'Дні народження — сторінка',
access: { read: () => true, update: isAdminOrEditor },
hooks: { afterChange: [revalidateGlobalAfterChange] },
versions: { max: 20, drafts: { autosave: { interval: 2000 } } },
fields: [
{
name: 'heroTitle',

View file

@ -7,6 +7,7 @@ export const BlogIndexPage: GlobalConfig = {
label: 'Блог — список',
access: { read: () => true, update: isAdminOrEditor },
hooks: { afterChange: [revalidateGlobalAfterChange] },
versions: { max: 20, drafts: { autosave: { interval: 2000 } } },
fields: [
{
name: 'heroTitle',

View file

@ -7,6 +7,7 @@ export const GroupVisitsPage: GlobalConfig = {
label: 'Групові відвідування — сторінка',
access: { read: () => true, update: isAdminOrEditor },
hooks: { afterChange: [revalidateGlobalAfterChange] },
versions: { max: 20, drafts: { autosave: { interval: 2000 } } },
fields: [
{
name: 'heroTitle',

View file

@ -6,6 +6,7 @@ export const HomePage: GlobalConfig = {
slug: 'home-page',
access: { read: () => true, update: isAdminOrEditor },
hooks: { afterChange: [revalidateGlobalAfterChange] },
versions: { max: 20, drafts: { autosave: { interval: 2000 } } },
fields: [
{
name: 'hero',

View file

@ -7,6 +7,7 @@ export const LocationsPage: GlobalConfig = {
label: 'Локації — сторінка',
access: { read: () => true, update: isAdminOrEditor },
hooks: { afterChange: [revalidateGlobalAfterChange] },
versions: { max: 20, drafts: { autosave: { interval: 2000 } } },
fields: [
{
name: 'heroTitle',

View file

@ -7,6 +7,7 @@ export const TicketsPage: GlobalConfig = {
label: 'Квитки — сторінка',
access: { read: () => true, update: isAdminOrEditor },
hooks: { afterChange: [revalidateGlobalAfterChange] },
versions: { max: 20, drafts: { autosave: { interval: 2000 } } },
fields: [
{
name: 'heroTitle',