Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ namespace Umbraco.Cms.Api.Management.Controllers.Security;
public class BackOfficeGraphicsController : Controller
{
public const string LogoRouteName = nameof(BackOfficeGraphicsController) + "." + nameof(Logo);
public const string LogoAlternativeRouteName = nameof(BackOfficeGraphicsController) + "." + nameof(LogoAlternative);
public const string LoginBackGroundRouteName = nameof(BackOfficeGraphicsController) + "." + nameof(LoginBackground);
public const string LoginLogoRouteName = nameof(BackOfficeGraphicsController) + "." + nameof(LoginLogo);
public const string LoginLogoAlternativeRouteName = nameof(BackOfficeGraphicsController) + "." + nameof(LoginLogoAlternative);
Expand All @@ -44,6 +45,11 @@ public BackOfficeGraphicsController(IOptions<ContentSettings> contentSettings, I
[MapToApiVersion("1.0")]
public IActionResult Logo() => HandleFileRequest(_contentSettings.Value.BackOfficeLogo);

[HttpGet("logo-alternative", Name = LogoAlternativeRouteName)]
[AllowAnonymous]
[MapToApiVersion("1.0")]
public IActionResult LogoAlternative() => HandleFileRequest(_contentSettings.Value.BackOfficeLogoAlternative);

[HttpGet("login-logo", Name = LoginLogoRouteName)]
[AllowAnonymous]
[MapToApiVersion("1.0")]
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/Umbraco.Core/Configuration/Models/ContentSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class ContentSettings
internal const string StaticLoginLogoImage = "assets/logo_light.svg";
internal const string StaticLoginLogoImageAlternative = "assets/logo_dark.svg";
internal const string StaticBackOfficeLogo = "assets/logo.svg";
internal const string StaticBackOfficeLogoAlternative = "assets/logo_blue.svg";
internal const bool StaticHideBackOfficeLogo = false;
internal const bool StaticDisableDeleteWhenReferenced = false;
internal const bool StaticDisableUnpublishWhenReferenced = false;
Expand Down Expand Up @@ -88,9 +89,18 @@ public class ContentSettings
/// <summary>
/// Gets or sets a value for the path to the backoffice logo.
/// </summary>
/// <remarks>The alternative version of this logo can be found at <see cref="BackOfficeLogoAlternative"/>.</remarks>
[DefaultValue(StaticBackOfficeLogo)]
public string BackOfficeLogo { get; set; } = StaticBackOfficeLogo;

/// <summary>
/// Gets or sets a value for the path to the alternative backoffice logo, which can be shown
/// on top of a light background.
/// </summary>
/// <remarks>This is the alternative version to the regular logo found at <see cref="BackOfficeLogo"/>.</remarks>
[DefaultValue(StaticBackOfficeLogoAlternative)]
public string BackOfficeLogoAlternative { get; set; } = StaticBackOfficeLogoAlternative;

/// <summary>
/// Gets or sets a value indicating whether to hide the backoffice umbraco logo or not.
/// </summary>
Expand Down
Loading
Loading