Skip to content

Commit 9bd5499

Browse files
committed
Added the settings icon and side menu
1 parent 252551b commit 9bd5499

File tree

8 files changed

+147
-76
lines changed

8 files changed

+147
-76
lines changed

src/GWallet.Frontend.XF.Android/Resources/Resource.designer.cs

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/GWallet.Frontend.XF.iOS/GWallet.Frontend.XF.iOS.fsproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,12 @@
294294
<HintPath>..\..\packages\Fsdk.0.6.0--date20230118-0634.git-b829db2\lib\netstandard2.0\Fsdk.dll</HintPath>
295295
</Reference>
296296
</ItemGroup>
297+
<ItemGroup>
298+
<Folder Include="Resources\" />
299+
</ItemGroup>
300+
<ItemGroup>
301+
<BundleResource Include="Resources\logo_512x512.png" />
302+
</ItemGroup>
297303
<Import Project="..\..\packages\NETStandard.Library.2.0.3\build\netstandard2.0\NETStandard.Library.targets" Condition="Exists('..\..\packages\NETStandard.Library.2.0.3\build\netstandard2.0\NETStandard.Library.targets')" />
298304
<Import Project="..\..\packages\Xamarin.Forms.5.0.0.2515\build\Xamarin.Forms.targets" Condition="Exists('..\..\packages\Xamarin.Forms.5.0.0.2515\build\Xamarin.Forms.targets')" />
299305
</Project>
Loading
Lines changed: 123 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,137 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<FlyoutPage xmlns="http://xamarin.com/schemas/2014/forms"
33
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
44
xmlns:local="clr-namespace:GWallet.Frontend.XF"
5+
xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core"
6+
ios:FlyoutPage.ApplyShadow="True"
57
xmlns:controls="clr-namespace:GWallet.Frontend.XF.Controls"
68
x:Class="GWallet.Frontend.XF.BalancesPage">
7-
<StackLayout x:Name="mainLayout"
8-
Padding="0,0,0,0"
9-
VerticalOptions="FillAndExpand">
109

11-
<StackLayout Orientation="Horizontal"
12-
Padding="15, 10"
13-
Spacing="30"
14-
VerticalOptions="FillAndExpand"
15-
HorizontalOptions="FillAndExpand">
10+
<!-- Side menu-->
11+
<FlyoutPage.Flyout>
12+
<ContentPage Title="FlyoutMenu"
13+
ios:Page.UseSafeArea="True" >
14+
<StackLayout Spacing="20" Margin="10,0,15,0">
1615

17-
<!-- we add {V|H}Options=Center* not only to the Label, as a workaround to
18-
https://github.com/xamarin/Xamarin.Forms/issues/4655 -->
19-
<Frame x:Name="totalFiatAmountFrame"
20-
HasShadow="false"
21-
BackgroundColor="Transparent"
22-
BorderColor="Transparent"
23-
VerticalOptions="CenterAndExpand"
24-
HorizontalOptions="End"
25-
Padding="0"
26-
Margin="0,0,0,0">
27-
<StackLayout x:Name="totalFiatAmountLayout"
28-
Orientation="Horizontal"
29-
VerticalOptions="CenterAndExpand"
30-
HorizontalOptions="Center"
31-
Margin="0,0,0,0">
32-
<Label Text="..." x:Name="totalFiatAmountLabel"
33-
VerticalOptions="CenterAndExpand"
34-
HorizontalOptions="Center"
35-
Margin="0,0,0,0"
36-
FontSize="22" />
16+
<Image HeightRequest="80"
17+
WidthRequest="80"
18+
Margin="0,0,0,10"
19+
Source="logo_512x512.png"/>
20+
21+
<StackLayout Spacing="15" Orientation="Horizontal">
22+
<Label TextColor="#BF0C27" VerticalOptions="Center" FontFamily="Icons" Text="&#x23;"/>
23+
<Label Text="Check you still remember your payment password"/>
24+
<StackLayout.GestureRecognizers><TapGestureRecognizer Tapped="OpenSettings_Tapped"/></StackLayout.GestureRecognizers>
25+
</StackLayout>
26+
27+
<StackLayout Spacing="15" Orientation="Horizontal">
28+
<Label TextColor="#BF0C27" VerticalOptions="Center" FontFamily="Icons" Text="&#x23;"/>
29+
<Label Text="Check you still remember your secret recovery phrase"/>
30+
<StackLayout.GestureRecognizers><TapGestureRecognizer Tapped="OpenSettings_Tapped"/></StackLayout.GestureRecognizers>
3731
</StackLayout>
38-
</Frame>
3932

40-
<!-- keep this frame&stacklayout&label below almost same as previous! -->
41-
<Frame x:Name="totalReadOnlyFiatAmountFrame"
42-
HasShadow="false"
43-
IsVisible="false"
44-
BackgroundColor="Transparent"
45-
BorderColor="Transparent"
46-
VerticalOptions="CenterAndExpand"
47-
HorizontalOptions="End"
48-
Padding="0"
49-
Margin="0,0,0,0">
50-
<StackLayout x:Name="totalReadOnlyFiatAmountLayout"
51-
Orientation="Horizontal"
52-
VerticalOptions="CenterAndExpand"
53-
HorizontalOptions="Center"
54-
Margin="0,0,0,0">
55-
<Label Text="..." x:Name="totalReadOnlyFiatAmountLabel"
56-
VerticalOptions="CenterAndExpand"
57-
HorizontalOptions="Center"
58-
Margin="0,0,0,0"
59-
FontSize="22"
60-
TextColor="DarkBlue" />
33+
<StackLayout Spacing="15" Orientation="Horizontal">
34+
<Label TextColor="#BF0C27" VerticalOptions="Center" FontFamily="Icons" Text="&#x23;"/>
35+
<Label Text="Wipe your current wallet, in order to start from scratch"/>
36+
<StackLayout.GestureRecognizers><TapGestureRecognizer Tapped="OpenSettings_Tapped"/></StackLayout.GestureRecognizers>
6137
</StackLayout>
62-
</Frame>
38+
</StackLayout>
39+
</ContentPage>
40+
</FlyoutPage.Flyout>
41+
42+
<!-- Main page-->
43+
<FlyoutPage.Detail>
44+
<ContentPage ios:Page.UseSafeArea="True"
45+
Title="Balances">
46+
<StackLayout x:Name="mainLayout"
47+
Padding="0,0,0,0"
48+
VerticalOptions="FillAndExpand">
49+
50+
<!-- Settings icon-->
51+
<Button BackgroundColor="Transparent"
52+
TextColor="Black"
53+
FontFamily="Icons"
54+
Text="&#xf1de;"
55+
FontSize="20"
56+
HeightRequest="20"
57+
HorizontalOptions="Start"
58+
Margin="20,0"
59+
Clicked="OpenFlyout_Clicked"/>
60+
61+
62+
<StackLayout Orientation="Horizontal"
63+
Padding="15, 10"
64+
Spacing="30"
65+
VerticalOptions="FillAndExpand"
66+
HorizontalOptions="FillAndExpand">
67+
68+
<!-- we add {V|H}Options=Center* not only to the Label, as a workaround to
69+
https://github.com/xamarin/Xamarin.Forms/issues/4655 -->
70+
<Frame x:Name="totalFiatAmountFrame"
71+
HasShadow="false"
72+
BackgroundColor="Transparent"
73+
BorderColor="Transparent"
74+
VerticalOptions="CenterAndExpand"
75+
HorizontalOptions="End"
76+
Padding="0"
77+
Margin="0,0,0,0">
78+
<StackLayout x:Name="totalFiatAmountLayout"
79+
Orientation="Horizontal"
80+
VerticalOptions="CenterAndExpand"
81+
HorizontalOptions="Center"
82+
Margin="0,0,0,0">
83+
<Label Text="..." x:Name="totalFiatAmountLabel"
84+
VerticalOptions="CenterAndExpand"
85+
HorizontalOptions="Center"
86+
Margin="0,0,0,0"
87+
FontSize="22" />
88+
</StackLayout>
89+
</Frame>
90+
91+
<!-- keep this frame&stacklayout&label below almost same as previous! -->
92+
<Frame x:Name="totalReadOnlyFiatAmountFrame"
93+
HasShadow="false"
94+
IsVisible="false"
95+
BackgroundColor="Transparent"
96+
BorderColor="Transparent"
97+
VerticalOptions="CenterAndExpand"
98+
HorizontalOptions="End"
99+
Padding="0"
100+
Margin="0,0,0,0">
101+
<StackLayout x:Name="totalReadOnlyFiatAmountLayout"
102+
Orientation="Horizontal"
103+
VerticalOptions="CenterAndExpand"
104+
HorizontalOptions="Center"
105+
Margin="0,0,0,0">
106+
<Label Text="..." x:Name="totalReadOnlyFiatAmountLabel"
107+
VerticalOptions="CenterAndExpand"
108+
HorizontalOptions="Center"
109+
Margin="0,0,0,0"
110+
FontSize="22"
111+
TextColor="DarkBlue" />
112+
</StackLayout>
113+
</Frame>
63114

64-
<controls:CircleChartView x:Name="normalChartView"
65-
HorizontalOptions="FillAndExpand"
66-
VerticalOptions="FillAndExpand"/>
115+
<controls:CircleChartView x:Name="normalChartView"
116+
HorizontalOptions="FillAndExpand"
117+
VerticalOptions="FillAndExpand"/>
67118

68-
<controls:CircleChartView x:Name="readonlyChartView"
69-
IsVisible="False"
70-
HorizontalOptions="FillAndExpand"
71-
VerticalOptions="FillAndExpand"/>
119+
<controls:CircleChartView x:Name="readonlyChartView"
120+
IsVisible="False"
121+
HorizontalOptions="FillAndExpand"
122+
VerticalOptions="FillAndExpand"/>
72123

73-
</StackLayout>
124+
</StackLayout>
74125

75-
<ScrollView HorizontalOptions="FillAndExpand">
76-
<StackLayout x:Name="contentLayout" />
77-
</ScrollView>
126+
<ScrollView HorizontalOptions="FillAndExpand">
127+
<StackLayout x:Name="contentLayout" />
128+
</ScrollView>
78129

79-
<Label Text="www.geewallet.com" x:Name="footerLabel"
80-
VerticalOptions="End"
81-
HorizontalOptions="Center"
82-
Margin="0,10,0,10" />
83-
</StackLayout>
84-
</ContentPage>
130+
<Label Text="www.geewallet.com" x:Name="footerLabel"
131+
VerticalOptions="End"
132+
HorizontalOptions="Center"
133+
Margin="0,10,0,10" />
134+
</StackLayout>
135+
</ContentPage>
136+
</FlyoutPage.Detail>
137+
</FlyoutPage>

src/GWallet.Frontend.XF/BalancesPage.xaml.fs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ type BalancesPage(state: FrontendHelpers.IGlobalAppState,
3434
currencyImages: Map<Currency*bool,Image>,
3535
startWithReadOnlyAccounts: bool)
3636
as this =
37-
inherit ContentPage()
37+
inherit FlyoutPage()
3838

3939
let _ = base.LoadFromXaml(typeof<BalancesPage>)
4040

@@ -535,3 +535,9 @@ type BalancesPage(state: FrontendHelpers.IGlobalAppState,
535535
this.StopTimer()
536536
this.CancelBalanceRefreshJobs()
537537
)
538+
539+
member this.OpenFlyout_Clicked(_: obj, _: EventArgs) =
540+
this.IsPresented <- true
541+
542+
member this.OpenSettings_Tapped(_: obj, _: EventArgs) =
543+
Application.Current.MainPage.DisplayAlert("Settings", "Succesfully opened the settings page", "Ok") |> ignore

src/GWallet.Frontend.XF/GWallet.Frontend.XF.fsproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@
22
<PropertyGroup>
33
<TargetFramework>netstandard2.0</TargetFramework>
44
<EnableDefaultEmbeddedResourceItems>true</EnableDefaultEmbeddedResourceItems>
5+
<Configurations>Release;Debug</Configurations>
56
</PropertyGroup>
67
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
78
<DebugSymbols>true</DebugSymbols>
89
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
910
</PropertyGroup>
1011
<ItemGroup>
1112
<Folder Include="Properties\" />
12-
<Folder Include="img\" />
1313
<Folder Include="Controls\" />
14+
<Folder Include="img\" />
15+
<Folder Include="Resources\" />
16+
<Folder Include="Resources\Fonts\" />
1417
</ItemGroup>
1518
<ItemGroup>
1619
<EmbeddedResource Include="..\..\img\btc_grey_60x60.png">
@@ -141,5 +144,6 @@
141144
<PackageReference Include="Fsdk" Version="0.6.0--date20230118-0634.git-b829db2">
142145
<GeneratePathProperty></GeneratePathProperty>
143146
</PackageReference>
147+
<EmbeddedResource Include="Resources\Fonts\FontAwesomeSolid.otf" />
144148
</ItemGroup>
145149
</Project>
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
namespace GWallet.Frontend.XF
22

33
open System.Reflection
4-
open System.Runtime.CompilerServices
4+
open Xamarin.Forms
55

66
[<assembly: AssemblyTitle("GWallet.Frontend.XF")>]
77
[<assembly: AssemblyDescription("")>]
88
[<assembly: AssemblyConfiguration("")>]
99
[<assembly: AssemblyTrademark("")>]
10-
10+
[<assembly: ExportFont("FontAwesomeSolid.otf", Alias = "Icons")>]
11+
do ()
1112
//[<assembly: AssemblyDelaySign(false)>]
1213
//[<assembly: AssemblyKeyFile("")>]
1314

14-
()
15+
Binary file not shown.

0 commit comments

Comments
 (0)