From 05cd15f7c61290adb9be4e4288f3cf4f6ae26b4c Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Fri, 24 Jan 2025 14:56:21 +0800 Subject: [PATCH 1/8] FIx logout problem --- .../EventHub.IdentityServer.csproj | 2 +- .../Pages/Account/LoggedOut.cshtml | 34 ++++++++++--------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/src/EventHub.IdentityServer/EventHub.IdentityServer.csproj b/src/EventHub.IdentityServer/EventHub.IdentityServer.csproj index a686d69..2134161 100644 --- a/src/EventHub.IdentityServer/EventHub.IdentityServer.csproj +++ b/src/EventHub.IdentityServer/EventHub.IdentityServer.csproj @@ -48,7 +48,7 @@ - + diff --git a/src/EventHub.IdentityServer/Pages/Account/LoggedOut.cshtml b/src/EventHub.IdentityServer/Pages/Account/LoggedOut.cshtml index c088de1..f890a83 100644 --- a/src/EventHub.IdentityServer/Pages/Account/LoggedOut.cshtml +++ b/src/EventHub.IdentityServer/Pages/Account/LoggedOut.cshtml @@ -1,4 +1,5 @@ -page "/Account/LoggedOut" +@page "/Account/LoggedOut" + @using Microsoft.AspNetCore.Mvc.Localization @using Volo.Abp.Account.Localization @using Volo.Abp.Account.Web.Pages.Account @@ -18,18 +19,19 @@ page "/Account/LoggedOut" @section styles { } - - - - @L["LoggedOutTitle"] - @L["LoggedOutText"] - @if (Model.PostLogoutRedirectUri != null) - { - @L["ReturnToText"] - } - @if (Model.SignOutIframeUrl != null) - { - - } - - \ No newline at end of file +
+ + + @L["LoggedOutTitle"] + @L["LoggedOutText"] + @if (Model.PostLogoutRedirectUri != null) + { + @L["ReturnToText"] + } + @if (Model.SignOutIframeUrl != null) + { + + } + + +
\ No newline at end of file From dd1f7aa74379835743a3d215c61c1935be2f5d48 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Fri, 24 Jan 2025 15:23:23 +0800 Subject: [PATCH 2/8] Fix login problem --- .../Themes/EventHub/Components/MainNavbar/Default.cshtml | 7 +++++++ 1 file changed, 7 insertions(+) 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 a8bb708..268d49f 100644 --- a/src/EventHub.Web.Theme/Themes/EventHub/Components/MainNavbar/Default.cshtml +++ b/src/EventHub.Web.Theme/Themes/EventHub/Components/MainNavbar/Default.cshtml @@ -14,10 +14,17 @@ @{ var returnUrl = WebUtility.UrlEncode(Context.Request.GetEncodedPathAndQuery()); + + if(Context.Request.Path.Equals("/Account/Login", StringComparison.OrdinalIgnoreCase)) + { + returnUrl = WebUtility.UrlEncode(Context.Request.Query["returnUrl"]); + } + if (returnUrl.IsNullOrWhiteSpace()) { returnUrl = "/"; } + }