From cfe34355bd3a7a24f8f5f95d6f56a56df20c0e31 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 20 Nov 2017 22:39:49 -0500 Subject: [PATCH] helper for empty header value --- src/App/Pages/Lock/LockPasswordPage.cs | 2 +- src/App/Pages/LoginPage.cs | 2 +- src/App/Pages/LoginTwoFactorPage.cs | 6 +++--- src/App/Pages/PasswordHintPage.cs | 2 +- src/App/Pages/RegisterPage.cs | 4 ++-- src/App/Pages/Settings/SettingsAboutPage.cs | 3 ++- src/App/Pages/Settings/SettingsAddFolderPage.cs | 3 ++- src/App/Pages/Settings/SettingsEditFolderPage.cs | 5 +++-- src/App/Pages/Settings/SettingsFeaturesPage.cs | 11 ++++++----- src/App/Pages/Settings/SettingsHelpPage.cs | 7 ++++--- src/App/Pages/Tools/ToolsPage.cs | 3 ++- src/App/Pages/Tools/ToolsPasswordGeneratorPage.cs | 2 +- .../Pages/Tools/ToolsPasswordGeneratorSettingsPage.cs | 7 ++++--- src/App/Pages/Vault/VaultAddCipherPage.cs | 2 +- src/App/Pages/Vault/VaultCustomFieldsPage.cs | 2 +- src/App/Pages/Vault/VaultEditCipherPage.cs | 4 ++-- src/App/Utilities/Helpers.cs | 10 ++++++++++ 17 files changed, 46 insertions(+), 29 deletions(-) diff --git a/src/App/Pages/Lock/LockPasswordPage.cs b/src/App/Pages/Lock/LockPasswordPage.cs index a03d0f0bf..54b85c6db 100644 --- a/src/App/Pages/Lock/LockPasswordPage.cs +++ b/src/App/Pages/Lock/LockPasswordPage.cs @@ -50,7 +50,7 @@ namespace Bit.App.Pages NoFooter = true, Root = new TableRoot { - new TableSection(" ") + new TableSection(Helpers.GetEmptyTableSectionTitle()) { PasswordCell } diff --git a/src/App/Pages/LoginPage.cs b/src/App/Pages/LoginPage.cs index b01ba1dc5..ca0c9d4d5 100644 --- a/src/App/Pages/LoginPage.cs +++ b/src/App/Pages/LoginPage.cs @@ -76,7 +76,7 @@ namespace Bit.App.Pages VerticalOptions = LayoutOptions.Start, Root = new TableRoot { - new TableSection(" ") + new TableSection(Helpers.GetEmptyTableSectionTitle()) { EmailCell, PasswordCell diff --git a/src/App/Pages/LoginTwoFactorPage.cs b/src/App/Pages/LoginTwoFactorPage.cs index d15afcd47..151a373e2 100644 --- a/src/App/Pages/LoginTwoFactorPage.cs +++ b/src/App/Pages/LoginTwoFactorPage.cs @@ -130,7 +130,7 @@ namespace Bit.App.Pages TokenCell.Entry.ReturnType = ReturnType.Go; var table = new TwoFactorTable( - new TableSection(" ") + new TableSection(Helpers.GetEmptyTableSectionTitle()) { TokenCell, RememberCell @@ -209,7 +209,7 @@ namespace Bit.App.Pages }); var table = new TwoFactorTable( - new TableSection(" ") + new TableSection(Helpers.GetEmptyTableSectionTitle()) { RememberCell }); @@ -240,7 +240,7 @@ namespace Bit.App.Pages }; var table = new TwoFactorTable( - new TableSection(" ") + new TableSection(Helpers.GetEmptyTableSectionTitle()) { RememberCell }); diff --git a/src/App/Pages/PasswordHintPage.cs b/src/App/Pages/PasswordHintPage.cs index 7cf5023af..8f6224b5f 100644 --- a/src/App/Pages/PasswordHintPage.cs +++ b/src/App/Pages/PasswordHintPage.cs @@ -50,7 +50,7 @@ namespace Bit.App.Pages VerticalOptions = LayoutOptions.Start, Root = new TableRoot { - new TableSection(" ") + new TableSection(Helpers.GetEmptyTableSectionTitle()) { EmailCell } diff --git a/src/App/Pages/RegisterPage.cs b/src/App/Pages/RegisterPage.cs index 1ace15971..1c008724d 100644 --- a/src/App/Pages/RegisterPage.cs +++ b/src/App/Pages/RegisterPage.cs @@ -67,7 +67,7 @@ namespace Bit.App.Pages { Root = new TableRoot { - new TableSection(" ") + new TableSection(Helpers.GetEmptyTableSectionTitle()) { EmailCell, PasswordCell @@ -89,7 +89,7 @@ namespace Bit.App.Pages NoHeader = true, Root = new TableRoot { - new TableSection(" ") + new TableSection(Helpers.GetEmptyTableSectionTitle()) { ConfirmPasswordCell, PasswordHintCell diff --git a/src/App/Pages/Settings/SettingsAboutPage.cs b/src/App/Pages/Settings/SettingsAboutPage.cs index 6650d2382..2eb5aa121 100644 --- a/src/App/Pages/Settings/SettingsAboutPage.cs +++ b/src/App/Pages/Settings/SettingsAboutPage.cs @@ -5,6 +5,7 @@ using Bit.App.Abstractions; using XLabs.Ioc; using Bit.App.Resources; using FFImageLoading.Forms; +using Bit.App.Utilities; namespace Bit.App.Pages { @@ -59,7 +60,7 @@ namespace Bit.App.Pages HasUnevenRows = true, Root = new TableRoot { - new TableSection(" ") + new TableSection(Helpers.GetEmptyTableSectionTitle()) { CreditsCell } diff --git a/src/App/Pages/Settings/SettingsAddFolderPage.cs b/src/App/Pages/Settings/SettingsAddFolderPage.cs index 0b4b10a09..0381548fe 100644 --- a/src/App/Pages/Settings/SettingsAddFolderPage.cs +++ b/src/App/Pages/Settings/SettingsAddFolderPage.cs @@ -8,6 +8,7 @@ using Plugin.Connectivity.Abstractions; using Xamarin.Forms; using XLabs.Ioc; using System.Linq; +using Bit.App.Utilities; namespace Bit.App.Pages { @@ -42,7 +43,7 @@ namespace Bit.App.Pages HasUnevenRows = true, Root = new TableRoot { - new TableSection(" ") + new TableSection(Helpers.GetEmptyTableSectionTitle()) { NameCell } diff --git a/src/App/Pages/Settings/SettingsEditFolderPage.cs b/src/App/Pages/Settings/SettingsEditFolderPage.cs index dd66619d3..2d4b1528b 100644 --- a/src/App/Pages/Settings/SettingsEditFolderPage.cs +++ b/src/App/Pages/Settings/SettingsEditFolderPage.cs @@ -7,6 +7,7 @@ using Plugin.Connectivity.Abstractions; using Xamarin.Forms; using XLabs.Ioc; using System.Linq; +using Bit.App.Utilities; namespace Bit.App.Pages { @@ -55,11 +56,11 @@ namespace Bit.App.Pages VerticalOptions = LayoutOptions.Start, Root = new TableRoot { - new TableSection(" ") + new TableSection(Helpers.GetEmptyTableSectionTitle()) { NameCell }, - new TableSection(" ") + new TableSection(Helpers.GetEmptyTableSectionTitle()) { DeleteCell } diff --git a/src/App/Pages/Settings/SettingsFeaturesPage.cs b/src/App/Pages/Settings/SettingsFeaturesPage.cs index fddfddfc4..20e2ee226 100644 --- a/src/App/Pages/Settings/SettingsFeaturesPage.cs +++ b/src/App/Pages/Settings/SettingsFeaturesPage.cs @@ -5,6 +5,7 @@ using Xamarin.Forms; using XLabs.Ioc; using Bit.App.Controls; using Plugin.Settings.Abstractions; +using Bit.App.Utilities; namespace Bit.App.Pages { @@ -49,7 +50,7 @@ namespace Bit.App.Pages { Root = new TableRoot { - new TableSection(" ") + new TableSection(Helpers.GetEmptyTableSectionTitle()) { WebsiteIconsCell } @@ -66,7 +67,7 @@ namespace Bit.App.Pages { Root = new TableRoot { - new TableSection(" ") + new TableSection(Helpers.GetEmptyTableSectionTitle()) { CopyTotpCell } @@ -83,7 +84,7 @@ namespace Bit.App.Pages { Root = new TableRoot { - new TableSection(" ") + new TableSection(Helpers.GetEmptyTableSectionTitle()) { AnalyticsCell } @@ -150,7 +151,7 @@ namespace Bit.App.Pages { Root = new TableRoot { - new TableSection(" ") + new TableSection(Helpers.GetEmptyTableSectionTitle()) { AutofillPersistNotificationCell } @@ -172,7 +173,7 @@ namespace Bit.App.Pages { Root = new TableRoot { - new TableSection(" ") + new TableSection(Helpers.GetEmptyTableSectionTitle()) { AutofillPasswordFieldCell } diff --git a/src/App/Pages/Settings/SettingsHelpPage.cs b/src/App/Pages/Settings/SettingsHelpPage.cs index a6f0fecc0..01235f9d3 100644 --- a/src/App/Pages/Settings/SettingsHelpPage.cs +++ b/src/App/Pages/Settings/SettingsHelpPage.cs @@ -4,6 +4,7 @@ using Xamarin.Forms; using Bit.App.Abstractions; using XLabs.Ioc; using Bit.App.Resources; +using Bit.App.Utilities; namespace Bit.App.Pages { @@ -38,7 +39,7 @@ namespace Bit.App.Pages { Root = new TableRoot { - new TableSection(" ") + new TableSection(Helpers.GetEmptyTableSectionTitle()) { EmailCell } @@ -61,7 +62,7 @@ namespace Bit.App.Pages NoHeader = true, Root = new TableRoot { - new TableSection(" ") + new TableSection(Helpers.GetEmptyTableSectionTitle()) { WebsiteCell } @@ -84,7 +85,7 @@ namespace Bit.App.Pages NoHeader = true, Root = new TableRoot { - new TableSection(" ") + new TableSection(Helpers.GetEmptyTableSectionTitle()) { BugCell } diff --git a/src/App/Pages/Tools/ToolsPage.cs b/src/App/Pages/Tools/ToolsPage.cs index 0b266ea74..f41c81ea8 100644 --- a/src/App/Pages/Tools/ToolsPage.cs +++ b/src/App/Pages/Tools/ToolsPage.cs @@ -7,6 +7,7 @@ using Bit.App.Resources; using Xamarin.Forms; using XLabs.Ioc; using FFImageLoading.Forms; +using Bit.App.Utilities; namespace Bit.App.Pages { @@ -38,7 +39,7 @@ namespace Bit.App.Pages ShareCell = new ToolsViewCell(AppResources.ShareVault, AppResources.ShareVaultDescription, "share_tools.png"); ImportCell = new ToolsViewCell(AppResources.ImportItems, AppResources.ImportItemsDescription, "cloudup.png"); - var section = new TableSection(" ") { GeneratorCell }; + var section = new TableSection(Helpers.GetEmptyTableSectionTitle()) { GeneratorCell }; if(Device.RuntimePlatform == Device.iOS) { diff --git a/src/App/Pages/Tools/ToolsPasswordGeneratorPage.cs b/src/App/Pages/Tools/ToolsPasswordGeneratorPage.cs index f52fa5423..1c7c34669 100644 --- a/src/App/Pages/Tools/ToolsPasswordGeneratorPage.cs +++ b/src/App/Pages/Tools/ToolsPasswordGeneratorPage.cs @@ -74,7 +74,7 @@ namespace Bit.App.Pages NoHeader = true, Root = new TableRoot { - new TableSection(" ") + new TableSection(Helpers.GetEmptyTableSectionTitle()) { RegenerateCell, CopyCell diff --git a/src/App/Pages/Tools/ToolsPasswordGeneratorSettingsPage.cs b/src/App/Pages/Tools/ToolsPasswordGeneratorSettingsPage.cs index 98b5eedeb..704631749 100644 --- a/src/App/Pages/Tools/ToolsPasswordGeneratorSettingsPage.cs +++ b/src/App/Pages/Tools/ToolsPasswordGeneratorSettingsPage.cs @@ -8,6 +8,7 @@ using Plugin.Connectivity.Abstractions; using Plugin.Settings.Abstractions; using Xamarin.Forms; using XLabs.Ioc; +using Bit.App.Utilities; namespace Bit.App.Pages { @@ -77,19 +78,19 @@ namespace Bit.App.Pages EnableSelection = false, Root = new TableRoot { - new TableSection(" ") + new TableSection(Helpers.GetEmptyTableSectionTitle()) { UppercaseCell, LowercaseCell, NumbersCell, SpecialCell }, - new TableSection(" ") + new TableSection(Helpers.GetEmptyTableSectionTitle()) { NumbersMinCell, SpecialMinCell }, - new TableSection(" ") + new TableSection(Helpers.GetEmptyTableSectionTitle()) { AvoidAmbiguousCell } diff --git a/src/App/Pages/Vault/VaultAddCipherPage.cs b/src/App/Pages/Vault/VaultAddCipherPage.cs index 9826020d9..a8ecf6ed0 100644 --- a/src/App/Pages/Vault/VaultAddCipherPage.cs +++ b/src/App/Pages/Vault/VaultAddCipherPage.cs @@ -359,7 +359,7 @@ namespace Bit.App.Pages NameCell }; - MiddleSection = new TableSection(" ") + MiddleSection = new TableSection(Helpers.GetEmptyTableSectionTitle()) { FolderCell, FavoriteCell diff --git a/src/App/Pages/Vault/VaultCustomFieldsPage.cs b/src/App/Pages/Vault/VaultCustomFieldsPage.cs index 5e5c2b09c..cad36ee5b 100644 --- a/src/App/Pages/Vault/VaultCustomFieldsPage.cs +++ b/src/App/Pages/Vault/VaultCustomFieldsPage.cs @@ -43,7 +43,7 @@ namespace Bit.App.Pages private void Init() { - FieldsSection = new TableSection(" "); + FieldsSection = new TableSection(Helpers.GetEmptyTableSectionTitle()); Table = new ExtendedTableView { diff --git a/src/App/Pages/Vault/VaultEditCipherPage.cs b/src/App/Pages/Vault/VaultEditCipherPage.cs index c76f0e20d..a84c6f6b5 100644 --- a/src/App/Pages/Vault/VaultEditCipherPage.cs +++ b/src/App/Pages/Vault/VaultEditCipherPage.cs @@ -165,7 +165,7 @@ namespace Bit.App.Pages NameCell }; - MiddleSection = new TableSection(" ") + MiddleSection = new TableSection(Helpers.GetEmptyTableSectionTitle()) { FolderCell, FavoriteCell, @@ -415,7 +415,7 @@ namespace Bit.App.Pages { NotesCell }, - new TableSection(" ") + new TableSection(Helpers.GetEmptyTableSectionTitle()) { DeleteCell } diff --git a/src/App/Utilities/Helpers.cs b/src/App/Utilities/Helpers.cs index 26b7f6468..360716897 100644 --- a/src/App/Utilities/Helpers.cs +++ b/src/App/Utilities/Helpers.cs @@ -56,5 +56,15 @@ namespace Bit.App.Utilities return false; } + + public static string GetEmptyTableSectionTitle() + { + if(Device.RuntimePlatform == Device.iOS) + { + return null; + } + + return " "; + } } }