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 24
24
<li ><a class =" dropdown-item" target =" _blank" href =" https://github.com/linkdotnet/Blog/releases" rel =" noreferrer" >Releases</a ></li >
25
25
</ul >
26
26
</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
+ }
28
42
</Authorized >
29
43
<NotAuthorized >
30
44
<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()
91
91
92
92
var cut = Render < AccessControl > ( ) ;
93
93
94
- cut . FindAll ( "a:contains('Log out Test Author')" ) . ShouldHaveSingleItem ( ) ;
94
+ cut . FindAll ( "a:contains('Test Author')" ) . ShouldHaveSingleItem ( ) ;
95
95
}
96
96
97
97
[ Fact ]
@@ -109,6 +109,6 @@ public void ShouldHideAuthorNameWhenUseMultiAuthorModeIsDisabled()
109
109
110
110
var cut = Render < AccessControl > ( ) ;
111
111
112
- cut . FindAll ( "a:contains('Log out Test Author')" ) . ShouldBeEmpty ( ) ;
112
+ cut . FindAll ( "a:contains('Test Author')" ) . ShouldBeEmpty ( ) ;
113
113
}
114
114
}
You can’t perform that action at this time.
0 commit comments