Skip to content

Releases: alineacms/alinea

v0.6.3

29 Jan 16:12
Compare
Choose a tag to compare
  • Add a preview widget which enables editors to easily switch from previewing
    to editing. Enable by setting widget to true:

    <cms.previews widget />
  • Add a function to retrieve the current logged in user:

    console.log(await cms.user())

v0.6.2

25 Jan 16:36
Compare
Choose a tag to compare
  • Live-reload changes to .css files used for custom fields and views.

v0.6.1

25 Jan 16:10
Compare
Choose a tag to compare
  • Allow importing .css and .module.css in custom fields and views.
  • Make isContainer optional if contains is used on Types.
  • Add i18nId to retrieved entry Link fields when queried.

v0.6.0

24 Jan 13:01
Compare
Choose a tag to compare
  • Field validation (#369)

    Introduces two new Field options available for every Field: required and
    validate. The required option will make sure the field value is not empty
    when saving. The validate option can be used to validate the field value
    using a custom function. The function should return true if the value is
    valid, false if it is not valid and a string if it is not valid and a
    message should be shown to the user.

    alinea.text('Hello field', {
      help: 'This field only accepts "hello" as a value',
      validate(value) {
        if (value !== 'hello') return 'Only "hello" is allowed!'
      }
    })

v0.5.12

24 Jan 10:48
Compare
Choose a tag to compare
  • Link fields using the condition option are now constrained with their locale
  • Upgrade the tiptap editor and fix a few stability issues with the editor

v0.5.11

23 Jan 09:57
Compare
Choose a tag to compare
  • Fix storing extra fields on the Link field correctly for multiple links.

  • In conditional configuration functions it's now possible to access fields from
    parent contexts. For example field options of a nested field inside a List
    field can depend on the value of a field in the entry root.

    const innerField = alinea.text('Read-only if status is published')
    const Type = alinea.type('Conditional example', {
      status: alinea.select('Status', {
        draft: 'Draft',
        published: 'Published'
      }),
      list: alinea.list('List', {
        schema: {ListRow: alinea.type({innerField})}
      })
    })
    alinea.track.options(innerField, get => {
      return {readOnly: get(Type.status) === 'published'}
    })

v0.5.10

22 Jan 13:43
Compare
Choose a tag to compare
  • Fix Entry fields showing up as type unkown in TypeScript.
  • The readOnly option that is included in all fields will now show a lock item
    next to the field label. The option is passed down in nested fields such as
    the List and Rich text fields.

v0.5.9

17 Jan 10:17
Compare
Choose a tag to compare
  • Changing entry order by dragging them in the sidebar is now applied
    immediately making changes much smoother.

v0.5.8

16 Jan 16:24
Compare
Choose a tag to compare
  • Fix navigation missing when selecting internal pages in Link fields.

v0.5.7

16 Jan 15:48
Compare
Choose a tag to compare
  • The interval at which Alinea polls the backend for content updates is
    now configurable. It can be set in config.syncInterval and overwritten
    per query.

    // Poll for updates every 60 seconds
    const results = await cms.syncInterval(60).find(Entry())
    // Disable syncing all for this query in case you want results fast,
    // but not necessarily up to date
    const matches = await cms.disableSync().find(Entry().search('fast'))