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:
parent
a134be0df0
commit
b1fd23d9a2
6 changed files with 6 additions and 0 deletions
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue