Merge pull request #1673 from sbwalker/dev
Enhance Settings API for public Site Settings. Added Settings to Site model by default. Added new parameters to Login and UserProfile components. Enhanced Oqtane Theme settings to use new component parameters. Enhanced image download and resizing logic.
This commit is contained in:
@ -104,10 +104,13 @@ namespace Oqtane.Models
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public List<Resource> Resources { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public string Permissions { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public Dictionary<string, string> Settings { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public int Level { get; set; }
|
||||
|
||||
|
@ -32,6 +32,11 @@ namespace Oqtane.Models
|
||||
/// </summary>
|
||||
public string SettingValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if this setting is publicly available - only applicable to Site Settings as other entities have more granular permissions
|
||||
/// </summary>
|
||||
public bool IsPublic { get; set; }
|
||||
|
||||
#region IAuditable Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Oqtane.Models
|
||||
@ -81,6 +82,9 @@ namespace Oqtane.Models
|
||||
[NotMapped]
|
||||
public string SiteTemplateType { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public Dictionary<string, string> Settings { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
[Obsolete("This property is deprecated.", false)]
|
||||
public string DefaultLayoutType { get; set; }
|
||||
|
@ -112,10 +112,10 @@ namespace Oqtane.Shared
|
||||
return $"{aliasUrl}{Constants.ContentUrl}{fileId}{method}";
|
||||
}
|
||||
|
||||
public static string ImageUrl(Alias alias, int fileId, string size, string mode)
|
||||
public static string ImageUrl(Alias alias, int fileId, int width, int height, string mode)
|
||||
{
|
||||
var aliasUrl = (alias != null && !string.IsNullOrEmpty(alias.Path)) ? "/" + alias.Path : "";
|
||||
return $"{aliasUrl}{Constants.ImageUrl}{fileId}/{size}/{mode}";
|
||||
return $"{aliasUrl}{Constants.ImageUrl}{fileId}/{width}/{height}/{mode}";
|
||||
}
|
||||
|
||||
public static string TenantUrl(Alias alias, string url)
|
||||
|
Reference in New Issue
Block a user