File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed
src/LinkDotNet.Blog.Web/Features/Home/Components
tests/LinkDotNet.Blog.UnitTests/Web/Features/Home/Components Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 2424 <li ><a class =" dropdown-item" target =" _blank" href =" https://github.com/linkdotnet/Blog/releases" rel =" noreferrer" >Releases</a ></li >
2525 </ul >
2626 </li >
27- <li class =" nav-item" ><a class =" nav-link" href =" logout?redirectUri=@CurrentUri" ><i class =" lock" ></i > Log out @if (authorName is not null ){@authorName }< / a >< / li >
27+ @if (authorName is not null )
28+ {
29+ <li class =" nav-item dropdown" >
30+ <a class =" nav-link dropdown-toggle" href =" #" id =" navbarDropdown" role =" button" data-bs-toggle =" dropdown" aria-expanded =" false" >
31+ <i class =" user-tie" ></i > @authorName
32+ </a >
33+ <ul class =" dropdown-menu ps-0" aria-labelledby =" navbarDropdown" >
34+ <li ><a class =" nav-link" href =" logout?redirectUri=@CurrentUri" ><i class =" lock" ></i > Log out </a ></li >
35+ </ul >
36+ </li >
37+ }
38+ else
39+ {
40+ <li class =" nav-item" ><a class =" nav-link" href =" logout?redirectUri=@CurrentUri" ><i class =" lock" ></i > Log out </a ></li >
41+ }
2842 </Authorized >
2943 <NotAuthorized >
3044 <li class =" nav-item" ><a class =" nav-link" href =" login?redirectUri=@CurrentUri" rel =" nofollow" ><i class =" unlocked" ></i > Log in</a ></li >
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ public void ShouldShowAuthorNameWhenUseMultiAuthorModeIsEnabled()
9191
9292 var cut = Render < AccessControl > ( ) ;
9393
94- cut . FindAll ( "a:contains('Log out Test Author')" ) . ShouldHaveSingleItem ( ) ;
94+ cut . FindAll ( "a:contains('Test Author')" ) . ShouldHaveSingleItem ( ) ;
9595 }
9696
9797 [ Fact ]
@@ -109,6 +109,6 @@ public void ShouldHideAuthorNameWhenUseMultiAuthorModeIsDisabled()
109109
110110 var cut = Render < AccessControl > ( ) ;
111111
112- cut . FindAll ( "a:contains('Log out Test Author')" ) . ShouldBeEmpty ( ) ;
112+ cut . FindAll ( "a:contains('Test Author')" ) . ShouldBeEmpty ( ) ;
113113 }
114114}
You can’t perform that action at this time.
0 commit comments