mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
no issue - moves the `NavItem` object from the navigation controller to an explicit `NavigationItem` model file - adds a custom transform `navigation-settings` that transforms the navigation settings JSON string to/from an array of `NavigationItem` objects - simplifies the `settings/navigation` controller as it no longer has to export it's own internal model and handle serialization and deserialization This pattern should also help simplify the apps/slack integration code if implemented there.
25 lines
782 B
JavaScript
25 lines
782 B
JavaScript
/* jscs:disable requireCamelCaseOrUpperCaseIdentifiers */
|
|
import Model from 'ember-data/model';
|
|
import attr from 'ember-data/attr';
|
|
import ValidationEngine from 'ghost/mixins/validation-engine';
|
|
|
|
export default Model.extend(ValidationEngine, {
|
|
validationType: 'setting',
|
|
|
|
title: attr('string'),
|
|
description: attr('string'),
|
|
logo: attr('string'),
|
|
cover: attr('string'),
|
|
defaultLang: attr('string'),
|
|
postsPerPage: attr('number'),
|
|
forceI18n: attr('boolean'),
|
|
permalinks: attr('string'),
|
|
activeTheme: attr('string'),
|
|
availableThemes: attr(),
|
|
ghost_head: attr('string'),
|
|
ghost_foot: attr('string'),
|
|
labs: attr('string'),
|
|
navigation: attr('navigation-settings'),
|
|
isPrivate: attr('boolean'),
|
|
password: attr('string')
|
|
});
|