[PR #734] [MERGED] Add ability to clone personal vault items #2561

Closed
opened 2025-11-26 23:21:03 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/734
Author: @vincentsalucci
Created: 2/16/2020
Status: Merged
Merged: 2/18/2020
Merged by: @vincentsalucci

Base: masterHead: feature-clone-item-android


📝 Commits (6)

  • 6af0d53 Add clone ability to personal vault items
  • 38b3c56 Fixed formatter
  • 23d8783 Made requested changes and removed some extra whitespace added by Rider formatter
  • 9f3930c Removed formatting on AppResources file
  • f2d1ca1 Fixed casing on UpdateCipherId method
  • 4d4f8d3 Update calling method

📊 Changes

7 files changed (+1031 additions, -2350 deletions)

View changed files

📝 src/App/Pages/Vault/AddEditPage.xaml (+2 -2)
📝 src/App/Pages/Vault/AddEditPage.xaml.cs (+10 -6)
📝 src/App/Pages/Vault/AddEditPageViewModel.cs (+24 -8)
📝 src/App/Pages/Vault/ViewPage.xaml (+7 -5)
📝 src/App/Pages/Vault/ViewPage.xaml.cs (+40 -3)
📝 src/App/Resources/AppResources.Designer.cs (+944 -2326)
📝 src/App/Resources/AppResources.resx (+4 -0)

📄 Description

Objective

  • Add ability to clone personal vault items on both iOS and Android
  • Place 'Clone' option in the respective action sheet/dropdown
  • Do not allow cloning of items owned by the organization
  • Attachments, Delete, and Share are not allowable actions during the clone flow
  • Allow ownership and collection assignment

Code Changes

  • AddEditPage.xaml: Adjusted conditional for when to show ownership options.
  • AddEditPage.xaml.cs: Added a clone mode boolean along with an instance of ViewPage into the constructor. Assigned above fields to the view model instance and adjusted visibility of toolbar items.
  • AddEditPageViewModel.cs: Added CloneMode property. Added AllowOwnershipChanges property that includes clone mode and preservers original conditional of not being in edit mode. Adjusted ShowCollections property to include clone mode. Added ViewPage property that is used to update existing instance of the ViewPage with the newly clone cipher ID. Adjusted load/submit procedures to handle Clone mode existence.
  • ViewPage.xaml: Added 'Clone' toolbar item
  • ViewPage.xaml.cs: Added Clone_Clicked function which is triggered via toolbar item click. Adjusted toolbar items when More_Clicked is fired and when AdjustToolbar is called.
  • AppResources.resx: Added 'Clone' string

Android Images

android-0-view-overflow-clone
android-1-clone-top
android-2-clone-bottom-self-owned
android-3-clone-bottom-org-owned
android-4-clone-success
android-5-org-item-no-clone

iOS Images

ios-0-view-overflow-clone
ios-1-clone-top
ios-2-clone-bottom-self-owned
ios-3-clone-bottom-org-owned
ios-4-clone-success-to-org
ios-5-org-item-no-clone


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/734 **Author:** [@vincentsalucci](https://github.com/vincentsalucci) **Created:** 2/16/2020 **Status:** ✅ Merged **Merged:** 2/18/2020 **Merged by:** [@vincentsalucci](https://github.com/vincentsalucci) **Base:** `master` ← **Head:** `feature-clone-item-android` --- ### 📝 Commits (6) - [`6af0d53`](https://github.com/bitwarden/android/commit/6af0d5373d59a1014ffc24a234d67a1e804890b6) Add clone ability to personal vault items - [`38b3c56`](https://github.com/bitwarden/android/commit/38b3c56e2f9b2e7c316dc027bc12c62b1b24f2b3) Fixed formatter - [`23d8783`](https://github.com/bitwarden/android/commit/23d8783ffb484ea1b1f340e2d0d329d69e58c11f) Made requested changes and removed some extra whitespace added by Rider formatter - [`9f3930c`](https://github.com/bitwarden/android/commit/9f3930c020e24c974b88509e57839457d2b3601b) Removed formatting on AppResources file - [`f2d1ca1`](https://github.com/bitwarden/android/commit/f2d1ca1f5a7606dfb0228b9a53626743c41a62b6) Fixed casing on UpdateCipherId method - [`4d4f8d3`](https://github.com/bitwarden/android/commit/4d4f8d360f3f447990a25a0c804080aab508c5da) Update calling method ### 📊 Changes **7 files changed** (+1031 additions, -2350 deletions) <details> <summary>View changed files</summary> 📝 `src/App/Pages/Vault/AddEditPage.xaml` (+2 -2) 📝 `src/App/Pages/Vault/AddEditPage.xaml.cs` (+10 -6) 📝 `src/App/Pages/Vault/AddEditPageViewModel.cs` (+24 -8) 📝 `src/App/Pages/Vault/ViewPage.xaml` (+7 -5) 📝 `src/App/Pages/Vault/ViewPage.xaml.cs` (+40 -3) 📝 `src/App/Resources/AppResources.Designer.cs` (+944 -2326) 📝 `src/App/Resources/AppResources.resx` (+4 -0) </details> ### 📄 Description ## Objective - Add ability to clone personal vault items on both iOS and Android - Place 'Clone' option in the respective action sheet/dropdown - Do not allow cloning of items owned by the organization - Attachments, Delete, and Share are not allowable actions during the clone flow - Allow ownership and collection assignment ## Code Changes - **AddEditPage.xaml**: Adjusted conditional for when to show ownership options. - **AddEditPage.xaml.cs**: Added a clone mode boolean along with an instance of ViewPage into the constructor. Assigned above fields to the view model instance and adjusted visibility of toolbar items. - **AddEditPageViewModel.cs**: Added CloneMode property. Added AllowOwnershipChanges property that includes clone mode and preservers original conditional of not being in edit mode. Adjusted ShowCollections property to include clone mode. Added ViewPage property that is used to update existing instance of the ViewPage with the newly clone cipher ID. Adjusted load/submit procedures to handle Clone mode existence. - **ViewPage.xaml**: Added 'Clone' toolbar item - **ViewPage.xaml.cs**: Added Clone_Clicked function which is triggered via toolbar item click. Adjusted toolbar items when More_Clicked is fired and when AdjustToolbar is called. - **AppResources.resx**: Added 'Clone' string ## Android Images ![android-0-view-overflow-clone](https://user-images.githubusercontent.com/26154748/74611108-ca85dc00-50be-11ea-87ff-337cae307437.png) ![android-1-clone-top](https://user-images.githubusercontent.com/26154748/74611110-cc4f9f80-50be-11ea-85f7-28d7253a4c3d.png) ![android-2-clone-bottom-self-owned](https://user-images.githubusercontent.com/26154748/74611111-cce83600-50be-11ea-8f9a-09064a28b993.png) ![android-3-clone-bottom-org-owned](https://user-images.githubusercontent.com/26154748/74611113-cd80cc80-50be-11ea-8658-c537e6ba3ce5.png) ![android-4-clone-success](https://user-images.githubusercontent.com/26154748/74611114-ce196300-50be-11ea-945b-c1ac1546c67b.png) ![android-5-org-item-no-clone](https://user-images.githubusercontent.com/26154748/74611115-ce196300-50be-11ea-95ac-2fa88a5581f0.png) ## iOS Images ![ios-0-view-overflow-clone](https://user-images.githubusercontent.com/26154748/74611124-da9dbb80-50be-11ea-8bf8-31c1e7ee073a.png) ![ios-1-clone-top](https://user-images.githubusercontent.com/26154748/74611127-dc677f00-50be-11ea-9370-31b405916aa2.png) ![ios-2-clone-bottom-self-owned](https://user-images.githubusercontent.com/26154748/74611130-dd001580-50be-11ea-8324-a9abe4d42848.png) ![ios-3-clone-bottom-org-owned](https://user-images.githubusercontent.com/26154748/74611131-dd001580-50be-11ea-9038-7f66b8afd9e1.png) ![ios-4-clone-success-to-org](https://user-images.githubusercontent.com/26154748/74611132-dd98ac00-50be-11ea-9c55-13e16ed9d4fe.png) ![ios-5-org-item-no-clone](https://user-images.githubusercontent.com/26154748/74611133-dd98ac00-50be-11ea-8f87-5ae9d6de2080.png) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-26 23:21:03 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#2561