mirror of
https://github.com/bitwarden/mobile.git
synced 2024-11-29 12:45:20 +01:00
move settings pages to modals instead of navigation pages
This commit is contained in:
parent
a429dcf978
commit
230722945e
@ -74,6 +74,11 @@ namespace Bit.App.Pages
|
||||
Spacing = 0
|
||||
};
|
||||
|
||||
if(Device.OS == TargetPlatform.iOS)
|
||||
{
|
||||
ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Cancel));
|
||||
}
|
||||
|
||||
Title = AppResources.About;
|
||||
Content = new ScrollView { Content = stackLayout };
|
||||
}
|
||||
|
@ -104,6 +104,11 @@ namespace Bit.App.Pages
|
||||
bugLabel.WidthRequest = stackLayout.Bounds.Width - bugLabel.Bounds.Left * 2;
|
||||
};
|
||||
|
||||
if(Device.OS == TargetPlatform.iOS)
|
||||
{
|
||||
ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Cancel));
|
||||
}
|
||||
|
||||
Title = AppResources.HelpAndFeedback;
|
||||
Content = new ScrollView { Content = stackLayout };
|
||||
}
|
||||
|
@ -38,6 +38,11 @@ namespace Bit.App.Pages
|
||||
listView.ItemSelected += FolderSelected;
|
||||
listView.ItemTemplate = new DataTemplate(() => new SettingsFolderListViewCell(this));
|
||||
|
||||
if(Device.OS == TargetPlatform.iOS)
|
||||
{
|
||||
ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Cancel));
|
||||
}
|
||||
|
||||
Title = AppResources.Folders;
|
||||
Content = listView;
|
||||
}
|
||||
|
@ -244,12 +244,12 @@ namespace Bit.App.Pages
|
||||
|
||||
private void SyncCell_Tapped(object sender, EventArgs e)
|
||||
{
|
||||
Navigation.PushAsync(new SettingsSyncPage());
|
||||
Navigation.PushModalAsync(new ExtendedNavigationPage(new SettingsSyncPage()));
|
||||
}
|
||||
|
||||
private void AboutCell_Tapped(object sender, EventArgs e)
|
||||
{
|
||||
Navigation.PushAsync(new SettingsAboutPage());
|
||||
Navigation.PushModalAsync(new ExtendedNavigationPage(new SettingsAboutPage()));
|
||||
}
|
||||
|
||||
private void RateCell_Tapped(object sender, EventArgs e)
|
||||
@ -268,7 +268,7 @@ namespace Bit.App.Pages
|
||||
|
||||
private void HelpCell_Tapped(object sender, EventArgs e)
|
||||
{
|
||||
Navigation.PushAsync(new SettingsHelpPage());
|
||||
Navigation.PushModalAsync(new ExtendedNavigationPage(new SettingsHelpPage()));
|
||||
}
|
||||
|
||||
private void LockCell_Tapped(object sender, EventArgs e)
|
||||
@ -342,7 +342,7 @@ namespace Bit.App.Pages
|
||||
cell.On = false;
|
||||
var pinPage = new SettingsPinPage();
|
||||
pinPage.OnPinEntered += PinEntered;
|
||||
Navigation.PushAsync(pinPage);
|
||||
Navigation.PushModalAsync(new ExtendedNavigationPage(pinPage));
|
||||
}
|
||||
else if(!cell.On)
|
||||
{
|
||||
@ -353,7 +353,8 @@ namespace Bit.App.Pages
|
||||
private void PinEntered(object sender, EventArgs args)
|
||||
{
|
||||
var page = sender as SettingsPinPage;
|
||||
page.Navigation.PopAsync();
|
||||
page.PinControl.Entry.Unfocus();
|
||||
page.Navigation.PopModalAsync();
|
||||
|
||||
_authService.PIN = page.Model.PIN;
|
||||
|
||||
@ -369,7 +370,7 @@ namespace Bit.App.Pages
|
||||
|
||||
private void FoldersCell_Tapped(object sender, EventArgs e)
|
||||
{
|
||||
Navigation.PushAsync(new SettingsListFoldersPage());
|
||||
Navigation.PushModalAsync(new ExtendedNavigationPage(new SettingsListFoldersPage()));
|
||||
}
|
||||
|
||||
private string GetLockOptionsDetailsText()
|
||||
|
@ -56,6 +56,11 @@ namespace Bit.App.Pages
|
||||
PinControl.Label.GestureRecognizers.Add(tgr);
|
||||
instructionLabel.GestureRecognizers.Add(tgr);
|
||||
|
||||
if(Device.OS == TargetPlatform.iOS)
|
||||
{
|
||||
ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Cancel));
|
||||
}
|
||||
|
||||
Title = AppResources.SetPIN;
|
||||
Content = stackLayout;
|
||||
Content.GestureRecognizers.Add(tgr);
|
||||
|
@ -57,6 +57,11 @@ namespace Bit.App.Pages
|
||||
Padding = new Thickness(15, 0)
|
||||
};
|
||||
|
||||
if(Device.OS == TargetPlatform.iOS)
|
||||
{
|
||||
ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Cancel));
|
||||
}
|
||||
|
||||
Title = AppResources.Sync;
|
||||
Content = stackLayout;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user