|
5 | 5 | <CascadingValue Value="this" IsFixed="true"> |
6 | 6 | <MudStack Class="@Class" Style="@Style"> @*Row="Vertical"*@ |
7 | 7 | <MudStack Row="true" AlignItems="@(HeaderTextView == HeaderTextView.NewLine ? AlignItems.Start : AlignItems.Center)"> @*Row="!Vertical"*@ |
| 8 | + |
8 | 9 | @foreach (MudStep step in _steps) |
9 | 10 | { |
10 | | - if (step.IsResultStep) |
| 11 | + if (step.IsResultStep || (MobileView == true && IsStepActive(step) == false)) |
11 | 12 | { |
12 | 13 | continue; |
13 | 14 | } |
14 | 15 | bool active = IsStepActive(step); |
15 | 16 | <div @onclick="@(Linear ? null : () => SetActiveIndex(step))" Class="@HeaderClassname"> |
16 | | - <MudAvatar Class="@((active || step.Status != StepStatus.Continued) ? $"mud-theme-{Color.ToDescriptionString()}" : null)" Variant="@Variant" Size="Size.Small"> |
17 | | - @if (step.Status == Enums.StepStatus.Completed) |
18 | | - { |
19 | | - <MudIcon Icon="@Icons.Material.Filled.Done" Size="Size.Small" /> |
20 | | - } |
21 | | - else if (step.Status == StepStatus.Skipped) |
22 | | - { |
23 | | - <MudIcon Icon="@Icons.Material.Filled.Remove" Size="Size.Small" /> |
24 | | - } |
25 | | - else |
26 | | - { |
27 | | - @(Steps.IndexOf(step) + 1) |
28 | | - } |
29 | | - </MudAvatar> |
| 17 | + <MudAvatar Class="@((active || step.Status != StepStatus.Continued) ? $"mud-theme-{Color.ToDescriptionString()}" : null)" Variant="@Variant" Size="Size.Small"> |
| 18 | + @if (step.Status == Enums.StepStatus.Completed) |
| 19 | + { |
| 20 | + <MudIcon Icon="@Icons.Material.Filled.Done" Size="Size.Small" /> |
| 21 | + } |
| 22 | + else if (step.Status == StepStatus.Skipped) |
| 23 | + { |
| 24 | + <MudIcon Icon="@Icons.Material.Filled.Remove" Size="Size.Small" /> |
| 25 | + } |
| 26 | + else |
| 27 | + { |
| 28 | + @(Steps.IndexOf(step) + 1) |
| 29 | + } |
| 30 | + </MudAvatar> |
30 | 31 | @if (HeaderTextView == HeaderTextView.All || HeaderTextView == HeaderTextView.NewLine || (HeaderTextView == HeaderTextView.OnlyActiveText && active)) |
31 | 32 | { |
32 | 33 | <div> |
|
39 | 40 | } |
40 | 41 | </div> |
41 | 42 |
|
42 | | - if (_steps.Count - 1 != _steps.IndexOf(step)) |
| 43 | + if (_steps.Count - 1 != _steps.IndexOf(step) || MobileView == true) |
43 | 44 | { |
44 | 45 | <span class="@GetDashClassname(step)"></span> |
45 | 46 | } |
| 47 | + |
| 48 | + @if (MobileView == true) |
| 49 | + { |
| 50 | + <MudText Typo="Typo.body2" Color="@Color">@(_steps?.IndexOf(step) + 1) / @(_steps?.Count)</MudText> |
| 51 | + } |
46 | 52 | } |
| 53 | + |
| 54 | + |
47 | 55 | </MudStack> |
48 | 56 | <MudStack Class="mud-width-full" Justify="Justify.SpaceBetween"> |
49 | 57 | <div class="@ContentClassname" style="@ContentStyle"> |
|
64 | 72 | } |
65 | 73 | else |
66 | 74 | { |
67 | | - <MudButton Color="@Color" Variant="@Variant" OnClick="@(() => SetActiveIndex(-1))">@LocalizedStrings.Previous</MudButton> |
| 75 | + if (IconActionButtons || MobileView) |
| 76 | + { |
| 77 | + <MudTooltip Text="@LocalizedStrings.Previous" Delay="300"> |
| 78 | + <MudIconButton Color="@Color" Variant="@Variant" Icon="@Icons.Material.Filled.ChevronLeft" OnClick="@(() => SetActiveIndex(-1))" /> |
| 79 | + </MudTooltip> |
| 80 | + } |
| 81 | + else |
| 82 | + { |
| 83 | + <MudButton Color="@Color" Variant="@Variant" OnClick="@(() => SetActiveIndex(-1))">@LocalizedStrings.Previous</MudButton> |
| 84 | + } |
68 | 85 | } |
69 | 86 | } |
70 | 87 |
|
|
82 | 99 | { |
83 | 100 | if ((ActiveIndex < Steps.Count && Steps[ActiveIndex].Status != StepStatus.Continued) || (ActiveIndex == Steps.Count - 1 && HasResultStep() == false && IsAllStepsCompleted())) |
84 | 101 | { |
85 | | - if (!DisableStepResultIndicator) |
| 102 | + if (!DisableStepResultIndicator && MobileView == false) |
86 | 103 | { |
87 | 104 | <MudButton Color="@Color" Variant="@Variant" Disabled="true">@(Steps[ActiveIndex].Status == StepStatus.Completed ? LocalizedStrings.Completed : LocalizedStrings.Skipped)</MudButton> |
88 | 105 | } |
|
91 | 108 | { |
92 | 109 | if (!DisableSkipButton) |
93 | 110 | { |
94 | | - <MudButton Color="@Color" Variant="@Variant" OnClick="@(() => SkipStep(ActiveIndex))">@LocalizedStrings.Skip</MudButton> |
| 111 | + if (IconActionButtons || MobileView) |
| 112 | + { |
| 113 | + <MudTooltip Text="@LocalizedStrings.Skip" Delay="300"> |
| 114 | + <MudIconButton Color="@Color" Variant="@Variant" Icon="@Icons.Material.Filled.SkipNext" OnClick="@(() => SkipStep(ActiveIndex))" /> |
| 115 | + </MudTooltip> |
| 116 | + } |
| 117 | + else |
| 118 | + { |
| 119 | + <MudButton Color="@Color" Variant="@Variant" OnClick="@(() => SkipStep(ActiveIndex))">@LocalizedStrings.Skip</MudButton> |
| 120 | + } |
| 121 | + |
95 | 122 | } |
96 | 123 | } |
97 | 124 | } |
|
104 | 131 | } |
105 | 132 | else |
106 | 133 | { |
107 | | - <MudButton Color="@Color" Variant="@Variant" OnClick="@(() => CompleteStep(ActiveIndex))">@GetNextButtonString()</MudButton> |
| 134 | + if (IconActionButtons || MobileView) |
| 135 | + { |
| 136 | + <MudTooltip Text="@GetNextButtonString()" Delay="300"> |
| 137 | + <MudIconButton Color="@Color" Variant="@Variant" Icon="@Icons.Material.Filled.ChevronRight" OnClick="@(() => CompleteStep(ActiveIndex))" /> |
| 138 | + </MudTooltip> |
| 139 | + } |
| 140 | + else |
| 141 | + { |
| 142 | + <MudButton Color="@Color" Variant="@Variant" OnClick="@(() => CompleteStep(ActiveIndex))">@GetNextButtonString()</MudButton> |
| 143 | + } |
| 144 | + |
108 | 145 | } |
109 | 146 | } |
110 | 147 |
|
|
0 commit comments