diff --git a/src/EventHub.IdentityServer/EventHub.IdentityServer.csproj b/src/EventHub.IdentityServer/EventHub.IdentityServer.csproj index 2f83886..af05e89 100644 --- a/src/EventHub.IdentityServer/EventHub.IdentityServer.csproj +++ b/src/EventHub.IdentityServer/EventHub.IdentityServer.csproj @@ -46,6 +46,7 @@ + diff --git a/src/EventHub.IdentityServer/EventHubIdentityServerModule.cs b/src/EventHub.IdentityServer/EventHubIdentityServerModule.cs index 65f1825..99959f8 100644 --- a/src/EventHub.IdentityServer/EventHubIdentityServerModule.cs +++ b/src/EventHub.IdentityServer/EventHubIdentityServerModule.cs @@ -9,13 +9,13 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using EventHub.EntityFrameworkCore; using EventHub.Localization; +using EventHub.Web.Theme; +using EventHub.Web.Theme.Bundling; using StackExchange.Redis; using Volo.Abp; using Volo.Abp.Account; using Volo.Abp.Account.Web; using Volo.Abp.AspNetCore.Mvc.UI.Bundling; -using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic; -using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Bundling; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; using Volo.Abp.AspNetCore.Serilog; using Volo.Abp.Auditing; @@ -35,7 +35,7 @@ namespace EventHub typeof(AbpCachingStackExchangeRedisModule), typeof(AbpAccountWebIdentityServerModule), typeof(AbpAccountApplicationModule), - typeof(AbpAspNetCoreMvcUiBasicThemeModule), + typeof(EventHubWebThemeModule), typeof(EventHubEntityFrameworkCoreDbMigrationsModule), typeof(AbpAspNetCoreSerilogModule) )] @@ -56,25 +56,13 @@ namespace EventHub typeof(AbpUiResource) ); - options.Languages.Add(new LanguageInfo("ar", "ar", "العربية")); - options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština")); options.Languages.Add(new LanguageInfo("en", "en", "English")); - options.Languages.Add(new LanguageInfo("en-GB", "en-GB", "English (UK)")); - options.Languages.Add(new LanguageInfo("fr", "fr", "Français")); - options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar")); - options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português")); - options.Languages.Add(new LanguageInfo("ru", "ru", "Русский")); - options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); - options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文")); - options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文")); - options.Languages.Add(new LanguageInfo("de-DE", "de-DE", "Deutsch", "de")); - options.Languages.Add(new LanguageInfo("es", "es", "Español", "es")); }); Configure(options => { options.StyleBundles.Configure( - BasicThemeBundles.Styles.Global, + EventHubThemeBundles.Styles.Global, bundle => { bundle.AddFiles("/global-styles.css"); @@ -94,6 +82,7 @@ namespace EventHub { options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}EventHub.Domain.Shared")); options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}EventHub.Domain")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}EventHub.Web.Theme")); }); } diff --git a/src/EventHub.IdentityServer/Pages/Index.cshtml b/src/EventHub.IdentityServer/Pages/Index.cshtml index 357f324..f0c5e89 100644 --- a/src/EventHub.IdentityServer/Pages/Index.cshtml +++ b/src/EventHub.IdentityServer/Pages/Index.cshtml @@ -1,34 +1,3 @@ @page @using EventHub.Pages -@using Volo.Abp.Users -@model IndexModel -@inject ICurrentUser CurrentUser -@if (CurrentUser.IsAuthenticated) -{ -
- - - - Logout - - -

@CurrentUser.UserName

-
@CurrentUser.Email
-
- Roles: @CurrentUser.Roles.JoinAsString(", ") -
- Claims:
- @Html.Raw(CurrentUser.GetAllClaims().Select(c => $"{c.Type}={c.Value}").JoinAsString("
")) -
-
-
-
-} - -@if (!CurrentUser.IsAuthenticated) -{ -
-

- Login -
-} +@model IndexModel \ No newline at end of file diff --git a/src/EventHub.IdentityServer/Pages/Index.cshtml.cs b/src/EventHub.IdentityServer/Pages/Index.cshtml.cs index 1f015d1..202838a 100644 --- a/src/EventHub.IdentityServer/Pages/Index.cshtml.cs +++ b/src/EventHub.IdentityServer/Pages/Index.cshtml.cs @@ -1,11 +1,14 @@ +using EventHub.Web; +using Microsoft.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; namespace EventHub.Pages { public class IndexModel : AbpPageModel { - public void OnGet() + public IActionResult OnGet() { + return Redirect(EventHubExternalUrls.EhWww); } } } \ No newline at end of file diff --git a/src/EventHub.IdentityServer/wwwroot/assets/dropdown-arrow.svg b/src/EventHub.IdentityServer/wwwroot/assets/dropdown-arrow.svg new file mode 100644 index 0000000..53156c3 --- /dev/null +++ b/src/EventHub.IdentityServer/wwwroot/assets/dropdown-arrow.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/EventHub.IdentityServer/wwwroot/assets/seperator.png b/src/EventHub.IdentityServer/wwwroot/assets/seperator.png new file mode 100644 index 0000000..421b6a1 Binary files /dev/null and b/src/EventHub.IdentityServer/wwwroot/assets/seperator.png differ diff --git a/src/EventHub.IdentityServer/wwwroot/assets/seperator2.svg b/src/EventHub.IdentityServer/wwwroot/assets/seperator2.svg new file mode 100644 index 0000000..94c140a --- /dev/null +++ b/src/EventHub.IdentityServer/wwwroot/assets/seperator2.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/EventHub.Web.Theme/Themes/EventHub/Components/Footer/Default.cshtml b/src/EventHub.Web.Theme/Themes/EventHub/Components/Footer/Default.cshtml index 2cd5616..149877e 100644 --- a/src/EventHub.Web.Theme/Themes/EventHub/Components/Footer/Default.cshtml +++ b/src/EventHub.Web.Theme/Themes/EventHub/Components/Footer/Default.cshtml @@ -51,13 +51,13 @@ © 2021 EventHub diff --git a/src/EventHub.Web.Theme/Themes/EventHub/Components/MainNavbar/Default.cshtml b/src/EventHub.Web.Theme/Themes/EventHub/Components/MainNavbar/Default.cshtml index a350ee8..fe935b1 100644 --- a/src/EventHub.Web.Theme/Themes/EventHub/Components/MainNavbar/Default.cshtml +++ b/src/EventHub.Web.Theme/Themes/EventHub/Components/MainNavbar/Default.cshtml @@ -8,6 +8,13 @@ @inject ILanguageProvider LanguageProvider @inject IStringLocalizer L +@{ + var returnUrl = System.Net.WebUtility.UrlEncode(Context.Request.GetEncodedPathAndQuery()); + if (returnUrl.IsNullOrWhiteSpace()) + { + returnUrl = "/"; + } +}