|
|
@ -5,10 +5,8 @@ |
|
|
// All rights reserved. Licensed under the MIT license.
|
|
|
// All rights reserved. Licensed under the MIT license.
|
|
|
// ==========================================================================
|
|
|
// ==========================================================================
|
|
|
|
|
|
|
|
|
using System.Collections.Generic; |
|
|
|
|
|
using System.Linq; |
|
|
using System.Linq; |
|
|
using Squidex.Domain.Apps.Entities.Apps; |
|
|
using Squidex.Domain.Apps.Entities.Apps; |
|
|
using Squidex.Infrastructure.Reflection; |
|
|
|
|
|
using Squidex.Infrastructure.Validation; |
|
|
using Squidex.Infrastructure.Validation; |
|
|
using Squidex.Web; |
|
|
using Squidex.Web; |
|
|
|
|
|
|
|
|
@ -20,19 +18,24 @@ namespace Squidex.Areas.Api.Controllers.Apps.Models |
|
|
/// The configured app patterns.
|
|
|
/// The configured app patterns.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
[LocalizedRequired] |
|
|
[LocalizedRequired] |
|
|
public List<PatternDto> Patterns { get; set; } |
|
|
public PatternDto[] Patterns { get; set; } |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// The configured UI editors.
|
|
|
/// The configured UI editors.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
[LocalizedRequired] |
|
|
[LocalizedRequired] |
|
|
public List<EditorDto> Editors { get; set; } |
|
|
public EditorDto[] Editors { get; set; } |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Hide the scheduler for content items.
|
|
|
/// Hide the scheduler for content items.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
public bool HideScheduler { get; set; } |
|
|
public bool HideScheduler { get; set; } |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Hide the datetime mode button.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public bool HideDateTimeModeButton { get; set; } |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// The version of the app.
|
|
|
/// The version of the app.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
@ -44,13 +47,10 @@ namespace Squidex.Areas.Api.Controllers.Apps.Models |
|
|
|
|
|
|
|
|
var result = new AppSettingsDto |
|
|
var result = new AppSettingsDto |
|
|
{ |
|
|
{ |
|
|
|
|
|
Editors = settings.Editors.Select(EditorDto.FromEditor).ToArray(), |
|
|
|
|
|
HideDateTimeModeButton = settings.HideDateTimeModeButton, |
|
|
HideScheduler = settings.HideScheduler, |
|
|
HideScheduler = settings.HideScheduler, |
|
|
Patterns = |
|
|
Patterns = settings.Patterns.Select(PatternDto.FromPattern).ToArray(), |
|
|
settings.Patterns |
|
|
|
|
|
.Select(x => SimpleMapper.Map(x, new PatternDto())).ToList(), |
|
|
|
|
|
Editors = |
|
|
|
|
|
settings.Editors |
|
|
|
|
|
.Select(x => SimpleMapper.Map(x, new EditorDto())).ToList(), |
|
|
|
|
|
Version = app.Version |
|
|
Version = app.Version |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|