Skip to content

Commit

Permalink
♻️ Mobile - V3 flyout (#580)
Browse files Browse the repository at this point in the history
* Added initial layout

* Finished first draft of v3 flyout

* Add flyout style

* Add fonts

* Update Flyout Footer

* Adding FA6 to the Project. Fix Email binding

* Add bold text to flyout

* Add bindings and tweak design

* Fixed login issues

* Hide unused buttons

* Remove refresh token preference when no refresh token expiry is received

* Hide location

* Load ranking

* Rename variable

* Add comments with PBI links to todos

---------

Co-authored-by: Matt Goldman <matt.goldman@outlook.com>
Co-authored-by: Tylah Kapa <tylahkapa@gmail.com>
  • Loading branch information
3 people authored Jan 16, 2024
1 parent fbe0443 commit 5c1b9ac
Show file tree
Hide file tree
Showing 17 changed files with 357 additions and 101 deletions.
80 changes: 54 additions & 26 deletions src/MobileUI/AppShell.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@
</Tab>
</FlyoutItem>

<MenuItem Text="Rewards"
<!--<MenuItem Text="Rewards"
Clicked="Handle_HowToPlayClicked">
<MenuItem.IconImageSource>
<FontImageSource FontFamily="FluentIcons"
Expand Down Expand Up @@ -297,63 +297,91 @@
Glyph="&#xf5d1;"
Color="White"/>
</MenuItem.IconImageSource>
</MenuItem>
</MenuItem>-->

<Shell.FlyoutFooter>
<Grid
RowDefinitions="Auto,Auto,5,Auto"
ColumnDefinitions="Auto,*"
Margin="0,0,0,20"
Padding="20,0"
RowDefinitions="Auto,Auto,Auto"
ColumnDefinitions="Auto,*,Auto"
VerticalOptions="End">

<!-- Settings Button -->
<!-- TODO: Bind when settings implemented -->
<!-- https://github.com/SSWConsulting/SSW.Rewards.Mobile/issues/582 -->
<!-- <Grid -->
<!-- VerticalOptions="End" -->
<!-- Grid.Column="0" -->
<!-- Grid.Row="0" -->
<!-- ColumnDefinitions="Auto,*"> -->
<!-- <Grid.GestureRecognizers> -->
<!-- <TapGestureRecognizer NumberOfTapsRequired="1" -->
<!-- Tapped="Handle_SettingsClicked"/> -->
<!-- </Grid.GestureRecognizers> -->
<!-- ~1~ Update to settings Icon @1@ -->
<!-- <Label Grid.Column="0" -->
<!-- HeightRequest="30" -->
<!-- WidthRequest="30" -->
<!-- VerticalOptions="Center" -->
<!-- VerticalTextAlignment="Center" -->
<!-- FontSize="Medium" -->
<!-- FontFamily="FA6Solid" -->
<!-- TextColor="#DDDDDD" -->
<!-- Text="&#x2699;"> -->
<!-- </Label> -->
<!-- <Label Grid.Column="1" -->
<!-- Style="{StaticResource FlyoutLabelBold}" -->
<!-- TextColor="#DDDDDD" -->
<!-- HorizontalOptions="Center" -->
<!-- VerticalOptions="Center" -->
<!-- FontSize="Medium" -->
<!-- Text="Settings" /> -->
<!-- </Grid> -->

<!-- Logout Button -->
<Grid
VerticalOptions="End"
Grid.Column="0"
Grid.Row="1"
Padding="15,5"
ColumnDefinitions="Auto,*">
<Grid.GestureRecognizers>
<TapGestureRecognizer NumberOfTapsRequired="1"
Tapped="Handle_LogOutClicked"/>
</Grid.GestureRecognizers>
<!-- Update to different Icon -->
<Label Grid.Column="0"
Margin="0,0,25,0"
HeightRequest="30"
WidthRequest="30"
FontSize="28"
FontFamily="FluentIcons"
TextColor="White"
Text="&#xeafa;">
VerticalOptions="Center"
VerticalTextAlignment="Center"
FontSize="Medium"
FontFamily="FA6Solid"
TextColor="#DDDDDD"
Text="&#xf08b;">
</Label>

<Label Grid.Column="1"
TextColor="White"
Style="{StaticResource FlyoutLabelBold}"
TextColor="#DDDDDD"
HorizontalOptions="Center"
FontSize="18"
VerticalOptions="Center"
FontSize="Medium"
Text="Log Out" />
</Grid>

<!-- Version -->
<Image HorizontalOptions="End"
Margin="0,0,10,0"
Grid.Column="1"
Grid.Row="0"
HeightRequest="35"
WidthRequest="50"
VerticalOptions="End"
Source="ssw_white"/>


<Label HorizontalOptions="End"
VerticalTextAlignment="Center"
Margin="0,0,10,0"
x:Name="VersionLabel"
Grid.Column="1"
Grid.Column="2"
Grid.Row="1"
TextColor="White"/>
TextColor="#DDDDDD"/>

<!-- workaround for iOS footer safe area -->
<Label
Grid.ColumnSpan="2"
Grid.Row="3"
Grid.Row="2"
Text=" "
IsVisible="{OnPlatform Android='False', iOS='True'}"/>
</Grid>
Expand Down
5 changes: 5 additions & 0 deletions src/MobileUI/AppShell.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ public async void Handle_LogOutClicked(object sender, EventArgs e)
_authService.SignOut();
await Navigation.PushModalAsync<LoginPage>();
}
}

public async void Handle_SettingsClicked(object sender, EventArgs e)
{
//TODO: Perform SettingsClickedAction
}

public void Handle_EventsClicked(object sender, EventArgs e)
Expand Down
6 changes: 3 additions & 3 deletions src/MobileUI/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
public static class Constants
{
#if DEBUG
public const string ApiBaseUrl = "https://app-sswrewards-api-staging.azurewebsites.net";
//public const string ApiBaseUrl = "https://api.rewards.ssw.com.au";
//public const string ApiBaseUrl = "https://app-sswrewards-api-staging.azurewebsites.net";
public const string ApiBaseUrl = "https://api.rewards.ssw.com.au";
public const string AppCenterAndroidId = "285df68b-ea1b-4afb-94c3-2581613c6880";
public const string AppCenterIOSId = "21efe682-dc49-4d39-8af8-ad05911be003";

Expand All @@ -20,7 +20,7 @@ public static class Constants
public const string AuthRedirectUrl = "msauth.com.ssw.consulting://auth";

#if DEBUG
public const string AuthorityUri = /*"https://identity.ssw.com.au"; // */"https://app-ssw-ident-staging-api.azurewebsites.net";
public const string AuthorityUri = "https://identity.ssw.com.au"; //"https://app-ssw-ident-staging-api.azurewebsites.net";
#else
public const string AuthorityUri = "https://identity.ssw.com.au";
#endif
Expand Down
Loading

0 comments on commit 5c1b9ac

Please sign in to comment.