From 29a6eab705257cba212c6bdd479ce84230ec3853 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Wed, 30 May 2018 02:15:13 +0300 Subject: [PATCH] Introduce IBrandingProvider --- .../Themes/Basic/Components/Brand/Default.cshtml | 4 +++- .../Components/DefaultBrandingProvider.cs | 11 +++++++++++ .../Components/IBrandingProvider.cs | 9 +++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Components/DefaultBrandingProvider.cs create mode 100644 src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Components/IBrandingProvider.cs diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Brand/Default.cshtml b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Brand/Default.cshtml index 0c61d3cacb..491594d966 100644 --- a/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Brand/Default.cshtml +++ b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Brand/Default.cshtml @@ -1 +1,3 @@ -ProjectName \ No newline at end of file +@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Components +@inject IBrandingProvider BrandingProvider +@BrandingProvider.AppName \ No newline at end of file diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Components/DefaultBrandingProvider.cs b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Components/DefaultBrandingProvider.cs new file mode 100644 index 0000000000..eb13a1cea0 --- /dev/null +++ b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Components/DefaultBrandingProvider.cs @@ -0,0 +1,11 @@ +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Components +{ + public class DefaultBrandingProvider : IBrandingProvider, ITransientDependency + { + public virtual string AppName => "MyApplication"; + + public virtual string LogoUrl => null; + } +} \ No newline at end of file diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Components/IBrandingProvider.cs b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Components/IBrandingProvider.cs new file mode 100644 index 0000000000..65e3cb8883 --- /dev/null +++ b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Components/IBrandingProvider.cs @@ -0,0 +1,9 @@ +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Components +{ + public interface IBrandingProvider + { + string AppName { get; } + + string LogoUrl { get; } + } +}