Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VER-355] feat: Remove Profiles concept #96

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/App/Pages/Vault/AddEditPageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ public AddEditPageViewModel()
{
new KeyValuePair<string, CipherType>(AppResources.TypeLogin, CipherType.Login),
new KeyValuePair<string, CipherType>(AppResources.TypeCard, CipherType.Card),
// Cozy Customization, Prevent to create Profiles as they will be replaced by Cozy Contacts
/*
new KeyValuePair<string, CipherType>(AppResources.TypeIdentity, CipherType.Identity)
//*/
};
CardBrandOptions = new List<KeyValuePair<string, string>>
{
Expand Down
9 changes: 9 additions & 0 deletions src/App/Pages/Vault/ViewPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,15 @@ private void AdjustToolbar()
{
ToolbarItems.Insert(1, _editItem);
}
// Cozy customization, Prevent to restore/edit/clone/move Profiles as they will be replaced by Cozy Contacts
//*
if (_vm.Cipher.Type == Core.Enums.CipherType.Identity)
{
ToolbarItems.Remove(_editItem);
ToolbarItems.Remove(_cloneItem);
ToolbarItems.Remove(_shareItem);
}
//*/
}
}
}
2 changes: 1 addition & 1 deletion src/App/Pages/Vault/ViewPageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public bool TotpLow
}
}
public bool IsDeleted => Cipher.IsDeleted;
public bool CanEdit => !Cipher.IsDeleted;
public bool CanEdit => !Cipher.IsDeleted && Cipher.Type != CipherType.Identity;

// Cozy customization, display folder (Cozy concept)
//*
Expand Down
6 changes: 6 additions & 0 deletions src/App/Utilities/AppHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ public static async Task<string> CipherListOptions(ContentPage page, CipherView
var clipboardService = ServiceContainer.Resolve<IClipboardService>("clipboardService");

var options = new List<string> { AppResources.View };

// Cozy customization, Prevent to edit Profiles as they will be replaced by Cozy Contacts
/*
if (!cipher.IsDeleted)
/*/
if (!cipher.IsDeleted && cipher.Type != CipherType.Identity)
//*/
{
options.Add(AppResources.Edit);
}
Expand Down