Skip to content

Commit

Permalink
Increase image size (#1038)
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharykeeping authored Sep 17, 2024
1 parent 6c2b1ab commit c5707f2
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/MobileUI/Features/BaseViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ public partial class BaseViewModel : ObservableObject
string title = string.Empty;

public INavigation Navigation { get; set; }

public Page ViewPage { get; set; }
}
26 changes: 21 additions & 5 deletions src/MobileUI/Features/Redeem/RedeemRewardPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
<VerticalStackLayout>
<!-- Header section -->
<VerticalStackLayout IsVisible="{Binding IsHeaderVisible}">
<Border HeightRequest="80"
WidthRequest="80"
<Border HeightRequest="250"
WidthRequest="250"
BackgroundColor="{StaticResource FlyoutBackgroundColour}"
StrokeThickness="0"
StrokeShape="RoundRectangle 6"
Expand Down Expand Up @@ -163,7 +163,7 @@

<!-- Pending redemption QR code -->
<Grid IsVisible="{Binding IsQrCodeVisible}"
RowSpacing="10"
RowSpacing="20"
Margin="0,0,0,30"
RowDefinitions="Auto,Auto">
<Label Grid.Row="0"
Expand Down Expand Up @@ -331,7 +331,7 @@
</Grid>

<VerticalStackLayout HorizontalOptions="Center"
Spacing="15">
Spacing="20">
<Button Background="{StaticResource SSWRed}"
CornerRadius="10"
IsVisible="{Binding ConfirmEnabled}"
Expand All @@ -343,7 +343,23 @@

<Button Background="{StaticResource SSWRed}"
CornerRadius="10"
Text="Cancel redemption"
Text="Confirm Scanned"
FontAttributes="Bold"
VerticalOptions="Center"
HorizontalOptions="Center"
IsVisible="{Binding IsQrCodeVisible}"
Command="{Binding ClosePopupCommand}">
<Button.ImageSource>
<FontImageSource Glyph="&#xf00c;"
FontFamily="FA6Solid"
FontAutoScalingEnabled="True"
Size="16"/>
</Button.ImageSource>
</Button>

<Button Background="{StaticResource SSWRed}"
CornerRadius="10"
Text="Cancel"
FontAttributes="Bold"
VerticalOptions="Center"
HorizontalOptions="Center"
Expand Down
1 change: 1 addition & 0 deletions src/MobileUI/Features/Redeem/RedeemRewardPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public RedeemRewardPage(IFirebaseAnalyticsService firebaseAnalyticsService, Rede
_viewModel = viewModel;
_reward = reward;
BindingContext = _viewModel;
_viewModel.ViewPage = this;
}

protected override void OnAppearing()
Expand Down
6 changes: 6 additions & 0 deletions src/MobileUI/Features/Redeem/RedeemRewardViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,12 @@ private async Task RedeemInPersonClicked()
[RelayCommand]
private async Task CancelPendingRedemptionClicked()
{
var isConfirmed = await ViewPage.DisplayAlert("Cancel",
"Are you sure you want to cancel the pending redemption?", "Yes", "No");

if (!isConfirmed)
return;

IsBusy = true;

await rewardService.CancelPendingRedemption(new CancelPendingRedemptionDto
Expand Down

0 comments on commit c5707f2

Please sign in to comment.