|
4 | 4 |
|
5 | 5 | <MNavigationDrawer @bind-Value="Visible" Class="@($"navigation {ComputedNavigationStyle}")" Width=300 MiniVariantWidth=80 Fixed ExpandOnHover="GlobalConfig.ExpandOnHover" @bind-MiniVariant="GlobalConfig.NavigationMini" App>
|
6 | 6 |
|
7 |
| - <div style="height:132px" class="@($"block-center {(GlobalConfig.NavigationMini?"px-4":"px-12")}")" @onclick="()=>NavHelper.NavigateTo(GlobalVariables.DefaultRoute)"> |
| 7 | + <div style="height:132px" class="@($"block-center {(GlobalConfig.NavigationMini ? "px-4" : "px-12")}")" @onclick="() => NavHelper.NavigateTo(GlobalVariables.DefaultRoute)"> |
8 | 8 | @if (GlobalConfig.NavigationMini)
|
9 | 9 | {
|
10 | 10 | <img height="48" width="48" class="hover-pointer" src="/img/mainLayout/logo.svg" />
|
|
15 | 15 | }
|
16 | 16 | </div>
|
17 | 17 |
|
18 |
| - <MList Nav Linkage Dense Class="@($"pa-0 {(GlobalConfig.NavigationMini?"mini-navigation":"")}")"> |
| 18 | + <MList Nav Routable Dense Class="@($"pa-0 {(GlobalConfig.NavigationMini ? "mini-navigation" : "")}")"> |
19 | 19 |
|
20 | 20 | @foreach (var nav in NavHelper.Navs)
|
21 | 21 | {
|
|
25 | 25 | <MListItem Ripple=false Class="mb-4" ActiveClass="fill-lighten-1" Href="@nav.Href">
|
26 | 26 | <ItemContent>
|
27 | 27 | <MListItemIcon>
|
28 |
| - <MIcon Color="@(context.Active?"primary":"neutral-lighten-2")" Size=20>@nav.Icon</MIcon> |
| 28 | + <MIcon Color="@(context.Active ? "primary" : "neutral-lighten-2")" Size=20>@nav.Icon</MIcon> |
29 | 29 | </MListItemIcon>
|
30 | 30 | <MListItemContent>
|
31 |
| - <div style="margin-left:6.5px;" class="text-truncate white-space:nowrap @(context.Active?"text-subtitle":"text-body neutral-lighten-2--text")">@T(nav.Title)</div> |
| 31 | + <div style="margin-left:6.5px;" class="text-truncate white-space:nowrap @(context.Active ? "text-subtitle" : "text-body neutral-lighten-2--text")">@T(nav.Title)</div> |
32 | 32 | </MListItemContent>
|
33 | 33 | </ItemContent>
|
34 | 34 | </MListItem>
|
|
45 | 45 | <ChildContent>
|
46 | 46 | @foreach (var navChild in nav.Children)
|
47 | 47 | {
|
48 |
| - @if (NavHelper.CurrentUri.EndsWith(navChild.Href)) |
49 |
| - { |
50 |
| - <MBorder Value=false Width=4 Class="rounded-r-1" Border="Borders.Right"> |
51 |
| - <MListItem Ripple=false ActiveClass="fill-lighten-1" Link Href="@navChild.Href"> |
52 |
| - <ItemContent> |
53 |
| - <MListItemContent> |
54 |
| - <div class="text-truncate white-space:nowrap @(context.Active?"text-subtitle2":"text-btn neutral-lighten-2--text")">@T(navChild.Title)</div> |
55 |
| - </MListItemContent> |
56 |
| - </ItemContent> |
57 |
| - </MListItem> |
58 |
| - </MBorder> |
59 |
| - } |
60 |
| - else |
61 |
| - { |
| 48 | + <MBorder Value=false Width=4 Class="rounded-r-1" Border="Borders.Right"> |
62 | 49 | <MListItem Ripple=false ActiveClass="fill-lighten-1" Link Href="@navChild.Href">
|
63 | 50 | <ItemContent>
|
64 | 51 | <MListItemContent>
|
65 |
| - <div class="text-truncate white-space:nowrap @(context.Active?"text-subtitle2":"text-btn neutral-lighten-2--text")">@T(navChild.Title)</div> |
| 52 | + <div class="text-truncate white-space:nowrap @(context.Active ? "text-subtitle2" : "text-btn neutral-lighten-2--text")">@T(navChild.Title)</div> |
66 | 53 | </MListItemContent>
|
67 | 54 | </ItemContent>
|
68 | 55 | </MListItem>
|
69 |
| - } |
| 56 | + </MBorder> |
70 | 57 | }
|
71 | 58 | </ChildContent>
|
72 | 59 | </MListGroup>
|
|
85 | 72 | }
|
86 | 73 |
|
87 | 74 | @code {
|
| 75 | + |
88 | 76 | [Inject]
|
89 | 77 | public MasaBlazor Masa { get; set; } = default!;
|
90 | 78 |
|
|
102 | 90 | }
|
103 | 91 | else Visible = true;
|
104 | 92 | }
|
105 |
| -} |
| 93 | + } |
| 94 | + |
| 95 | + |
0 commit comments