diff --git a/TransactionProcessor.Mobile/Pages/Support/SupportPage.xaml b/TransactionProcessor.Mobile/Pages/Support/SupportPage.xaml
index 858b6a53d..b264453c7 100644
--- a/TransactionProcessor.Mobile/Pages/Support/SupportPage.xaml
+++ b/TransactionProcessor.Mobile/Pages/Support/SupportPage.xaml
@@ -3,49 +3,66 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TransactionProcessor.Mobile.Pages.Support.SupportPage"
xmlns:common="clr-namespace:TransactionProcessor.Mobile.Pages.Common"
- xmlns:controls="clr-namespace:TransactionProcessor.Mobile.Controls"
- xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
Shell.NavBarIsVisible="False"
- x:Name="Support">
+ Padding="0">
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
-
+
+
+
-
+
-
+
+
-
-
-
-
-
\ No newline at end of file
diff --git a/TransactionProcessor.Mobile/Pages/Support/SupportPage.xaml.cs b/TransactionProcessor.Mobile/Pages/Support/SupportPage.xaml.cs
index 03a88f392..8842d68d7 100644
--- a/TransactionProcessor.Mobile/Pages/Support/SupportPage.xaml.cs
+++ b/TransactionProcessor.Mobile/Pages/Support/SupportPage.xaml.cs
@@ -1,3 +1,5 @@
+using System.Windows.Input;
+using CommunityToolkit.Mvvm.Input;
using TransactionProcessor.Mobile.BusinessLogic.ViewModels.Support;
using TransactionProcessor.Mobile.Pages.Common;
@@ -12,8 +14,62 @@ public SupportPage(SupportPageViewModel vm) {
BindingContext = vm;
}
- //protected override async void OnAppearing() {
- //SupportPageViewModel vm = MauiProgram.Container.Services.GetRequiredService();
- //}
+ protected override void OnAppearing() {
+ base.OnAppearing();
+ this.LoadSupportOptions(this.viewModel);
+ }
+
+ private void LoadSupportOptions(SupportPageViewModel viewModel) {
+ this.SupportOptionsList.Children.Clear();
+
+ var options = new List<(String Title, String Icon, String AutomationId, IRelayCommand Command)>
+
+ {
+ ("Upload Logs", "supportbutton.svg", "UploadLogsButton", viewModel.UploadLogsCommand),
+ ("View Logs", "reportbutton.svg", "ViewLogsButton", viewModel.ViewLogsCommand),
+ };
+
+ foreach (var option in options) {
+ Frame tile = this.CreateSupportTile(option.Title, option.Icon, option.AutomationId, option.Command);
+ this.SupportOptionsList.Children.Add(tile);
+ }
+ }
+
+ private Frame CreateSupportTile(String title, String iconSource, String automationId, IRelayCommand command) {
+ Frame tile = new Frame();
+ tile.SetDynamicResource(VisualElement.StyleProperty, "SelectionTileFrame");
+ tile.AutomationId = automationId;
+
+ Image icon = new Image
+ {
+ Source = iconSource,
+ HeightRequest = 36,
+ WidthRequest = 36,
+ HorizontalOptions = LayoutOptions.Center
+ };
+
+ Label nameLabel = new Label
+ {
+ Text = title,
+ HorizontalTextAlignment = TextAlignment.Center,
+ HorizontalOptions = LayoutOptions.Center,
+ FontAttributes = FontAttributes.Bold,
+ FontSize = 13
+ };
+ nameLabel.SetDynamicResource(Label.TextColorProperty, "support");
+
+ tile.Content = new VerticalStackLayout
+ {
+ Spacing = 8,
+ HorizontalOptions = LayoutOptions.Center,
+ Children = { icon, nameLabel }
+ };
+
+ TapGestureRecognizer tapGesture = new TapGestureRecognizer();
+ tapGesture.Command = command;
+ tile.GestureRecognizers.Add(tapGesture);
+
+ return tile;
+ }
}
}
\ No newline at end of file