|
10 | 10 | xmlns:mi_material="clr-namespace:MauiIcons.Material;assembly=MauiIcons.Material" |
11 | 11 | xmlns:mtk="http://schemas.microsoft.com/dotnet/2022/maui/toolkit" |
12 | 12 | xmlns:ts="clr-namespace:SecureFolderFS.Maui.TemplateSelectors" |
13 | | - xmlns:uc="clr-namespace:SecureFolderFS.Maui.UserControls" |
14 | 13 | xmlns:uco="clr-namespace:SecureFolderFS.Maui.UserControls.Options" |
15 | 14 | xmlns:vc="clr-namespace:SecureFolderFS.Maui.ValueConverters" |
16 | 15 | xmlns:vm="clr-namespace:SecureFolderFS.Sdk.ViewModels.Controls.Widgets.Health;assembly=SecureFolderFS.Sdk" |
|
82 | 81 | <RowDefinition /> |
83 | 82 | </Grid.RowDefinitions> |
84 | 83 |
|
85 | | - <!-- Scan button --> |
86 | | - <apesui:ContextMenuContainer |
87 | | - x:Name="ItemContainer" |
| 84 | + <!-- Status card --> |
| 85 | + <Border |
| 86 | + x:Name="StatusCard" |
88 | 87 | Grid.Row="0" |
89 | | - Margin="0,4,0,0"> |
90 | | - <apesui:ContextMenuContainer.MenuItems> |
91 | | - <apesui:ContextMenuItem |
92 | | - Command="{Binding ViewModel.HealthViewModel.StartScanningCommand, Mode=OneWay}" |
93 | | - CommandParameter="include_file_contents" |
94 | | - Text="Scan full vault (include file contents)" /> |
95 | | - </apesui:ContextMenuContainer.MenuItems> |
96 | | - <apesui:ContextMenuContainer.Content> |
97 | | - <uc:ProgressiveButton |
98 | | - x:Name="ProgressiveButton" |
99 | | - Title="{Binding ViewModel.HealthViewModel.StatusTitle, Mode=OneWay}" |
100 | | - Clicked="ProgressiveButton_Clicked" |
101 | | - DefaultIcon="{OnPlatform Android={x:Static mi_material:MaterialIcons.Search}, |
102 | | - iOS={x:Static mi_cupertino:CupertinoIcons.Search}}" |
103 | | - HorizontalOptions="Fill" |
104 | | - IsProgressing="{Binding ViewModel.HealthViewModel.IsProgressing, Mode=OneWay}" |
105 | | - Progress="{Binding ViewModel.HealthViewModel.CurrentProgress, Mode=OneWay}" |
106 | | - Subtitle="{Binding ViewModel.HealthViewModel.Subtitle, Mode=OneWay}" /> |
107 | | - </apesui:ContextMenuContainer.Content> |
108 | | - </apesui:ContextMenuContainer> |
| 88 | + Margin="0,4,0,0" |
| 89 | + StrokeThickness="0" |
| 90 | + VerticalOptions="Start"> |
| 91 | + <Border.StrokeShape> |
| 92 | + <RoundRectangle CornerRadius="12" /> |
| 93 | + </Border.StrokeShape> |
| 94 | + |
| 95 | + <Grid> |
| 96 | + <!-- Gradient background (set from code-behind) --> |
| 97 | + <BoxView x:Name="GradientBackground" CornerRadius="12" /> |
| 98 | + |
| 99 | + <!-- Shimmer sweep overlay --> |
| 100 | + <BoxView |
| 101 | + x:Name="ShimmerOverlay" |
| 102 | + CornerRadius="12" |
| 103 | + IsVisible="False" |
| 104 | + Opacity="0.18"> |
| 105 | + <BoxView.Background> |
| 106 | + <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5"> |
| 107 | + <GradientStop Offset="0.0" Color="Transparent" /> |
| 108 | + <GradientStop Offset="0.4" Color="White" /> |
| 109 | + <GradientStop Offset="0.6" Color="White" /> |
| 110 | + <GradientStop Offset="1.0" Color="Transparent" /> |
| 111 | + </LinearGradientBrush> |
| 112 | + </BoxView.Background> |
| 113 | + </BoxView> |
| 114 | + |
| 115 | + <!-- Progress strip at bottom --> |
| 116 | + <BoxView |
| 117 | + x:Name="ProgressStrip" |
| 118 | + HeightRequest="3" |
| 119 | + IsVisible="{Binding ViewModel.HealthViewModel.IsProgressing, Mode=OneWay}" |
| 120 | + Opacity="0.5" |
| 121 | + VerticalOptions="End"> |
| 122 | + <BoxView.Background> |
| 123 | + <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5"> |
| 124 | + <GradientStop Offset="0" Color="White" /> |
| 125 | + <GradientStop Offset="1" Color="Transparent" /> |
| 126 | + </LinearGradientBrush> |
| 127 | + </BoxView.Background> |
| 128 | + </BoxView> |
| 129 | + |
| 130 | + <!-- Content row --> |
| 131 | + <Grid Padding="16,14" ColumnSpacing="14"> |
| 132 | + <Grid.ColumnDefinitions> |
| 133 | + <ColumnDefinition Width="Auto" /> |
| 134 | + <ColumnDefinition /> |
| 135 | + <ColumnDefinition Width="Auto" /> |
| 136 | + </Grid.ColumnDefinitions> |
| 137 | + |
| 138 | + <!-- Severity icon --> |
| 139 | + <Image |
| 140 | + Grid.Column="0" |
| 141 | + HeightRequest="32" |
| 142 | + Source="{Binding ViewModel.HealthViewModel.Severity, Mode=OneWay, Converter={StaticResource SeverityHealthIconConverter}}" |
| 143 | + VerticalOptions="Center" |
| 144 | + WidthRequest="32" /> |
| 145 | + |
| 146 | + <!-- Title + subtitle --> |
| 147 | + <VerticalStackLayout |
| 148 | + Grid.Column="1" |
| 149 | + Spacing="2" |
| 150 | + VerticalOptions="Center"> |
| 151 | + <Label |
| 152 | + FontAttributes="Bold" |
| 153 | + FontSize="16" |
| 154 | + Text="{Binding ViewModel.HealthViewModel.StatusTitle, Mode=OneWay}" |
| 155 | + TextColor="White" /> |
| 156 | + <Label |
| 157 | + FontSize="13" |
| 158 | + IsVisible="{Binding ViewModel.HealthViewModel.Subtitle, Mode=OneWay, Converter={StaticResource NullToBoolConverter}}" |
| 159 | + Opacity="0.75" |
| 160 | + Text="{Binding ViewModel.HealthViewModel.Subtitle, Mode=OneWay}" |
| 161 | + TextColor="White" /> |
| 162 | + </VerticalStackLayout> |
| 163 | + |
| 164 | + <!-- Options button --> |
| 165 | + <apesui:ContextMenuContainer Grid.Column="2" VerticalOptions="Center"> |
| 166 | + <apesui:ContextMenuContainer.MenuItems> |
| 167 | + <apesui:ContextMenuItem Command="{Binding ViewModel.HealthViewModel.StartScanningCommand, Mode=OneWay}" Text="Scan vault" /> |
| 168 | + <apesui:ContextMenuItem |
| 169 | + Command="{Binding ViewModel.HealthViewModel.StartScanningCommand, Mode=OneWay}" |
| 170 | + CommandParameter="include_file_contents" |
| 171 | + Text="Scan full vault (include file contents)" /> |
| 172 | + <apesui:ContextMenuItem Command="{Binding ViewModel.HealthViewModel.CancelScanningCommand, Mode=OneWay}" Text="Cancel scan" /> |
| 173 | + </apesui:ContextMenuContainer.MenuItems> |
| 174 | + <apesui:ContextMenuContainer.Content> |
| 175 | + <Border |
| 176 | + Padding="8,6" |
| 177 | + BackgroundColor="#22FFFFFF" |
| 178 | + StrokeThickness="0"> |
| 179 | + <Border.StrokeShape> |
| 180 | + <RoundRectangle CornerRadius="8" /> |
| 181 | + </Border.StrokeShape> |
| 182 | + <Grid> |
| 183 | + <mi:MauiIcon |
| 184 | + Icon="{mi_material:Material MoreVert}" |
| 185 | + IconColor="White" |
| 186 | + IconSize="20" |
| 187 | + OnPlatforms="Android" /> |
| 188 | + <mi:MauiIcon |
| 189 | + Icon="{mi_cupertino:Cupertino Ellipsis}" |
| 190 | + IconColor="White" |
| 191 | + IconSize="20" |
| 192 | + OnPlatforms="iOS" /> |
| 193 | + </Grid> |
| 194 | + </Border> |
| 195 | + </apesui:ContextMenuContainer.Content> |
| 196 | + </apesui:ContextMenuContainer> |
| 197 | + </Grid> |
| 198 | + </Grid> |
| 199 | + </Border> |
109 | 200 |
|
110 | 201 | <!-- Issues list --> |
111 | 202 | <Grid Grid.Row="1"> |
|
0 commit comments