diff --git a/img/settings_80x80.png b/img/settings_80x80.png new file mode 100644 index 000000000..564d39b54 Binary files /dev/null and b/img/settings_80x80.png differ diff --git a/src/GWallet.Frontend.XF.Android/Resources/Resource.designer.cs b/src/GWallet.Frontend.XF.Android/Resources/Resource.designer.cs index 7613bdb85..1ff50fe9a 100644 --- a/src/GWallet.Frontend.XF.Android/Resources/Resource.designer.cs +++ b/src/GWallet.Frontend.XF.Android/Resources/Resource.designer.cs @@ -15,7 +15,7 @@ namespace GWallet.Frontend.XF.Android { - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "13.2.1.111")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")] public partial class Resource { diff --git a/src/GWallet.Frontend.XF/BalancesPage.xaml b/src/GWallet.Frontend.XF/BalancesPage.xaml index d255e34a0..8cc1042d2 100644 --- a/src/GWallet.Frontend.XF/BalancesPage.xaml +++ b/src/GWallet.Frontend.XF/BalancesPage.xaml @@ -1,12 +1,69 @@ - - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/GWallet.Frontend.XF/BalancesPage.xaml.fs b/src/GWallet.Frontend.XF/BalancesPage.xaml.fs index c08c66769..8ca519d43 100644 --- a/src/GWallet.Frontend.XF/BalancesPage.xaml.fs +++ b/src/GWallet.Frontend.XF/BalancesPage.xaml.fs @@ -34,7 +34,7 @@ type BalancesPage(state: FrontendHelpers.IGlobalAppState, currencyImages: Map, startWithReadOnlyAccounts: bool) as self = - inherit ContentPage() + inherit FlyoutPage() let _ = base.LoadFromXaml(typeof) @@ -46,6 +46,8 @@ type BalancesPage(state: FrontendHelpers.IGlobalAppState, let contentLayout = base.FindByName "contentLayout" let normalChartView = base.FindByName "normalChartView" let readonlyChartView = base.FindByName "readonlyChartView" + let sideMenuImg = base.FindByName "sideMenuImg" + let settingsImgBtn = base.FindByName "settingsImgBtn" let standardTimeToRefreshBalances = TimeSpan.FromMinutes 5.0 let standardTimeToRefreshBalancesWhenThereIsImminentIncomingPaymentOrNotEnoughInfoToKnow = TimeSpan.FromMinutes 1.0 @@ -500,6 +502,8 @@ type BalancesPage(state: FrontendHelpers.IGlobalAppState, member private self.Init () = normalChartView.DefaultImageSource <- FrontendHelpers.GetSizedImageSource "logo" 512 readonlyChartView.DefaultImageSource <- FrontendHelpers.GetSizedImageSource "logo" 512 + sideMenuImg.Source <- FrontendHelpers.GetSizedImageSource "logo" 512 + settingsImgBtn.Source <- FrontendHelpers.GetSizedImageSource "settings" 80 let tapGestureRecognizer = TapGestureRecognizer() tapGestureRecognizer.Tapped.Subscribe(fun _ -> @@ -535,3 +539,11 @@ type BalancesPage(state: FrontendHelpers.IGlobalAppState, self.StopTimer() self.CancelBalanceRefreshJobs() ) + + member self.OpenFlyoutClicked(_sender: obj, _evArgs: EventArgs) = + self.IsPresented <- true + + member self.OpenSettingsTapped(_sender: obj, evArgs: EventArgs) = + let title = (evArgs :?> TappedEventArgs).Parameter :?> string + let settingsPage () = SettingsPage title :> Page + FrontendHelpers.SwitchToNewPage self settingsPage true diff --git a/src/GWallet.Frontend.XF/GWallet.Frontend.XF.fsproj b/src/GWallet.Frontend.XF/GWallet.Frontend.XF.fsproj index 0cfc7078e..8b1d7f003 100644 --- a/src/GWallet.Frontend.XF/GWallet.Frontend.XF.fsproj +++ b/src/GWallet.Frontend.XF/GWallet.Frontend.XF.fsproj @@ -67,6 +67,9 @@ img\eth_grey_120x120.png + + img\settings_80x80.png + img\eth_red_60x60.png @@ -103,6 +106,10 @@ SendPage.xaml Code + + SettingsPage.xaml + Code + PairingToPage.xaml Code diff --git a/src/GWallet.Frontend.XF/SettingsPage.xaml b/src/GWallet.Frontend.XF/SettingsPage.xaml new file mode 100644 index 000000000..e60205ea1 --- /dev/null +++ b/src/GWallet.Frontend.XF/SettingsPage.xaml @@ -0,0 +1,129 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/GWallet.Frontend.XF/SettingsPage.xaml.fs b/src/GWallet.Frontend.XF/SettingsPage.xaml.fs new file mode 100644 index 000000000..49ff8578d --- /dev/null +++ b/src/GWallet.Frontend.XF/SettingsPage.xaml.fs @@ -0,0 +1,70 @@ +namespace GWallet.Frontend.XF + +open System +open System.Linq + +open Xamarin.Forms +open Xamarin.Forms.Xaml +open Fsdk + +open GWallet.Backend + +type SettingsPage(option: string) as this = + inherit ContentPage() + let _ = base.LoadFromXaml(typeof) + let titleLabel = base.FindByName