From 54b4766680dbb0e42d1474a93013fd191fc20bcd Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 20 Oct 2017 12:51:41 -0400 Subject: [PATCH] optimizations for secure notes --- src/App/Pages/Vault/VaultAddCipherPage.cs | 7 ++++++- src/App/Pages/Vault/VaultEditCipherPage.cs | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/App/Pages/Vault/VaultAddCipherPage.cs b/src/App/Pages/Vault/VaultAddCipherPage.cs index ca76d1ff7..c1cc1e5c6 100644 --- a/src/App/Pages/Vault/VaultAddCipherPage.cs +++ b/src/App/Pages/Vault/VaultAddCipherPage.cs @@ -109,7 +109,7 @@ namespace Bit.App.Pages } // Notes - NotesCell = new FormEditorCell(Keyboard.Text, 180); + NotesCell = new FormEditorCell(Keyboard.Text, _type == CipherType.SecureNote ? 500 : 180); // Folders var folderOptions = new List { AppResources.FolderNone }; @@ -458,6 +458,11 @@ namespace Bit.App.Pages TopSection.Add(IdPostalCodeCell); TopSection.Add(IdCountryCell); } + else if(_type == CipherType.SecureNote) + { + // Name + NameCell.NextElement = NotesCell.Editor; + } // Make table TableRoot = new TableRoot diff --git a/src/App/Pages/Vault/VaultEditCipherPage.cs b/src/App/Pages/Vault/VaultEditCipherPage.cs index 9b114377f..c76f0e20d 100644 --- a/src/App/Pages/Vault/VaultEditCipherPage.cs +++ b/src/App/Pages/Vault/VaultEditCipherPage.cs @@ -102,7 +102,7 @@ namespace Bit.App.Pages NameCell.Entry.Text = Cipher.Name?.Decrypt(Cipher.OrganizationId); // Notes - NotesCell = new FormEditorCell(Keyboard.Text, 180); + NotesCell = new FormEditorCell(Keyboard.Text, Cipher.Type == CipherType.SecureNote ? 500 : 180); NotesCell.Editor.Text = Cipher.Notes?.Decrypt(Cipher.OrganizationId); // Folders @@ -400,6 +400,11 @@ namespace Bit.App.Pages TopSection.Add(IdPostalCodeCell); TopSection.Add(IdCountryCell); } + else if(Cipher.Type == CipherType.SecureNote) + { + // Name + NameCell.NextElement = NotesCell.Editor; + } // Make table TableRoot = new TableRoot