diff --git a/src/App/Controls/ExtendedEditor.cs b/src/App/Controls/ExtendedEditor.cs index 76c24ef5c..782d33d4c 100644 --- a/src/App/Controls/ExtendedEditor.cs +++ b/src/App/Controls/ExtendedEditor.cs @@ -5,6 +5,11 @@ namespace Bit.App.Controls { public class ExtendedEditor : Editor { + public ExtendedEditor() + { + TextColor = Color.FromHex("333333"); + } + public static readonly BindableProperty HasBorderProperty = BindableProperty.Create(nameof(HasBorder), typeof(bool), typeof(ExtendedEditor), true); diff --git a/src/App/Controls/ExtendedEntry.cs b/src/App/Controls/ExtendedEntry.cs index a4679e206..b192399c4 100644 --- a/src/App/Controls/ExtendedEntry.cs +++ b/src/App/Controls/ExtendedEntry.cs @@ -6,6 +6,11 @@ namespace Bit.App.Controls { public class ExtendedEntry : Entry { + public ExtendedEntry() + { + TextColor = Color.FromHex("333333"); + } + public static readonly BindableProperty HasBorderProperty = BindableProperty.Create(nameof(HasBorder), typeof(bool), typeof(ExtendedEntry), true); diff --git a/src/App/Controls/ExtendedPicker.cs b/src/App/Controls/ExtendedPicker.cs index e78840638..6eda63a0a 100644 --- a/src/App/Controls/ExtendedPicker.cs +++ b/src/App/Controls/ExtendedPicker.cs @@ -5,6 +5,8 @@ namespace Bit.App.Controls { public class ExtendedPicker : Picker { + // TODO: text color + public static readonly BindableProperty HasBorderProperty = BindableProperty.Create(nameof(HasBorder), typeof(bool), typeof(ExtendedEntry), true); diff --git a/src/App/Pages/SettingsAddFolderPage.cs b/src/App/Pages/SettingsAddFolderPage.cs index ae8dc00e1..f0a8f50ad 100644 --- a/src/App/Pages/SettingsAddFolderPage.cs +++ b/src/App/Pages/SettingsAddFolderPage.cs @@ -29,7 +29,7 @@ namespace Bit.App.Pages { var nameCell = new FormEntryCell(AppResources.Name); - var mainTable = new ExtendedTableView + var table = new ExtendedTableView { Intent = TableIntent.Settings, EnableScrolling = false, @@ -46,8 +46,8 @@ namespace Bit.App.Pages if(Device.OS == TargetPlatform.iOS) { - mainTable.RowHeight = -1; - mainTable.EstimatedRowHeight = 70; + table.RowHeight = -1; + table.EstimatedRowHeight = 70; } var saveToolBarItem = new ToolbarItem(AppResources.Save, null, async () => @@ -79,7 +79,7 @@ namespace Bit.App.Pages }, ToolbarItemOrder.Default, 0); Title = "Add Folder"; - Content = mainTable; + Content = table; ToolbarItems.Add(saveToolBarItem); if(Device.OS == TargetPlatform.iOS) { diff --git a/src/App/Pages/VaultAddSitePage.cs b/src/App/Pages/VaultAddSitePage.cs index f68a8bba8..a292a7600 100644 --- a/src/App/Pages/VaultAddSitePage.cs +++ b/src/App/Pages/VaultAddSitePage.cs @@ -47,10 +47,10 @@ namespace Bit.App.Pages } var folderCell = new FormPickerCell(AppResources.Folder, folderOptions.ToArray()); - var mainTable = new ExtendedTableView + var table = new ExtendedTableView { Intent = TableIntent.Settings, - EnableScrolling = false, + EnableScrolling = true, HasUnevenRows = true, EnableSelection = false, Root = new TableRoot @@ -72,16 +72,10 @@ namespace Bit.App.Pages if(Device.OS == TargetPlatform.iOS) { - mainTable.RowHeight = -1; - mainTable.EstimatedRowHeight = 70; + table.RowHeight = -1; + table.EstimatedRowHeight = 70; } - var scrollView = new ScrollView - { - Content = mainTable, - Orientation = ScrollOrientation.Vertical - }; - var saveToolBarItem = new ToolbarItem(AppResources.Save, null, async () => { if(!_connectivity.IsConnected) @@ -126,7 +120,7 @@ namespace Bit.App.Pages }, ToolbarItemOrder.Default, 0); Title = AppResources.AddSite; - Content = scrollView; + Content = table; ToolbarItems.Add(saveToolBarItem); if(Device.OS == TargetPlatform.iOS) { diff --git a/src/App/Pages/VaultEditSitePage.cs b/src/App/Pages/VaultEditSitePage.cs index 3eee9c67a..189ef0e5b 100644 --- a/src/App/Pages/VaultEditSitePage.cs +++ b/src/App/Pages/VaultEditSitePage.cs @@ -39,14 +39,18 @@ namespace Bit.App.Pages return; } - var uriCell = new FormEntryCell(AppResources.URI, Keyboard.Url); - uriCell.Entry.Text = site.Uri?.Decrypt(); - var nameCell = new FormEntryCell(AppResources.Name); - nameCell.Entry.Text = site.Name?.Decrypt(); - var usernameCell = new FormEntryCell(AppResources.Username); - usernameCell.Entry.Text = site.Username?.Decrypt(); - var passwordCell = new FormEntryCell(AppResources.Password, IsPassword: true); + var notesCell = new FormEditorCell(height: 90); + notesCell.Editor.Text = site.Notes?.Decrypt(); + var passwordCell = new FormEntryCell(AppResources.Password, IsPassword: true, nextElement: notesCell.Editor); passwordCell.Entry.Text = site.Password?.Decrypt(); + var usernameCell = new FormEntryCell(AppResources.Username, nextElement: passwordCell.Entry); + usernameCell.Entry.Text = site.Username?.Decrypt(); + usernameCell.Entry.DisableAutocapitalize = true; + usernameCell.Entry.Autocorrect = false; + var uriCell = new FormEntryCell(AppResources.URI, Keyboard.Url, nextElement: usernameCell.Entry); + uriCell.Entry.Text = site.Uri?.Decrypt(); + var nameCell = new FormEntryCell(AppResources.Name, nextElement: uriCell.Entry); + nameCell.Entry.Text = site.Name?.Decrypt(); var folderOptions = new List { AppResources.FolderNone }; var folders = _folderService.GetAllAsync().GetAwaiter().GetResult().OrderBy(f => f.Name?.Decrypt()); @@ -65,13 +69,10 @@ namespace Bit.App.Pages var folderCell = new FormPickerCell(AppResources.Folder, folderOptions.ToArray()); folderCell.Picker.SelectedIndex = selectedIndex; - var notesCell = new FormEditorCell(height: 90); - notesCell.Editor.Text = site.Notes?.Decrypt(); - var table = new ExtendedTableView { Intent = TableIntent.Settings, - EnableScrolling = false, + EnableScrolling = true, HasUnevenRows = true, EnableSelection = false, Root = new TableRoot @@ -97,12 +98,6 @@ namespace Bit.App.Pages table.EstimatedRowHeight = 70; } - var scrollView = new ScrollView - { - Content = table, - Orientation = ScrollOrientation.Vertical - }; - var saveToolBarItem = new ToolbarItem(AppResources.Save, null, async () => { if(!_connectivity.IsConnected) @@ -148,7 +143,7 @@ namespace Bit.App.Pages }, ToolbarItemOrder.Default, 0); Title = "Edit Site"; - Content = scrollView; + Content = table; ToolbarItems.Add(saveToolBarItem); if(Device.OS == TargetPlatform.iOS) { diff --git a/src/App/Pages/VaultViewSitePage.cs b/src/App/Pages/VaultViewSitePage.cs index 72530698f..20198934c 100644 --- a/src/App/Pages/VaultViewSitePage.cs +++ b/src/App/Pages/VaultViewSitePage.cs @@ -64,11 +64,12 @@ namespace Bit.App.Pages var notesCell = new LabeledValueCell(); notesCell.Value.SetBinding(Label.TextProperty, s => s.Notes); notesCell.View.SetBinding(IsVisibleProperty, s => s.ShowNotes); + notesCell.Value.LineBreakMode = LineBreakMode.WordWrap; Table = new ExtendedTableView { Intent = TableIntent.Settings, - EnableScrolling = false, + EnableScrolling = true, HasUnevenRows = true, EnableSelection = false, Root = new TableRoot @@ -93,14 +94,8 @@ namespace Bit.App.Pages Table.EstimatedRowHeight = 70; } - var scrollView = new ScrollView - { - Content = Table, - Orientation = ScrollOrientation.Vertical - }; - Title = "View Site"; - Content = scrollView; + Content = Table; BindingContext = Model; }