diff --git a/package.json b/package.json
index 86a7fc73e4..4694dbee8e 100644
--- a/package.json
+++ b/package.json
@@ -4,7 +4,7 @@
"scripts": {
"sub:init": "git submodule update --init --recursive",
"sub:update": "git submodule update --remote",
- "sub:pull": "git submodule foreach git pull",
+ "sub:pull": "git submodule foreach git pull origin master",
"postinstall": "npm run sub:init && gulp postinstall",
"symlink:win": "rm -rf ./jslib && cmd /c mklink /J .\\jslib ..\\jslib",
"symlink:mac": "npm run symlink:lin",
diff --git a/src/_locales/en/messages.json b/src/_locales/en/messages.json
index 71e5c1ded6..b604bc6467 100644
--- a/src/_locales/en/messages.json
+++ b/src/_locales/en/messages.json
@@ -1238,5 +1238,11 @@
},
"selectOneCollection": {
"message": "You must select at least one collection."
+ },
+ "cloneItem": {
+ "message": "Clone Item"
+ },
+ "clone": {
+ "message": "Clone"
}
}
diff --git a/src/popup/app-routing.animations.ts b/src/popup/app-routing.animations.ts
index 0de48a8166..a852922b0c 100644
--- a/src/popup/app-routing.animations.ts
+++ b/src/popup/app-routing.animations.ts
@@ -106,14 +106,16 @@ export function ciphersToView(fromState: string, toState: string) {
if (fromState == null || toState === null) {
return false;
}
- return fromState.indexOf('ciphers_') === 0 && (toState === 'view-cipher' || toState === 'add-cipher');
+ return fromState.indexOf('ciphers_') === 0 &&
+ (toState === 'view-cipher' || toState === 'add-cipher' || toState === 'clone-cipher');
}
export function viewToCiphers(fromState: string, toState: string) {
if (fromState == null || toState === null) {
return false;
}
- return (fromState === 'view-cipher' || fromState === 'add-cipher') && toState.indexOf('ciphers_') === 0;
+ return (fromState === 'view-cipher' || fromState === 'add-cipher' || fromState === 'clone-cipher') &&
+ toState.indexOf('ciphers_') === 0;
}
export const routerTransition = trigger('routerTransition', [
@@ -145,14 +147,17 @@ export const routerTransition = trigger('routerTransition', [
transition('view-cipher => edit-cipher, view-cipher => cipher-password-history', inSlideUp),
transition('edit-cipher => view-cipher, cipher-password-history => view-cipher, edit-cipher => tabs', outSlideDown),
+ transition('view-cipher => clone-cipher', inSlideUp),
+ transition('clone-cipher => view-cipher, clone-cipher => tabs', outSlideDown),
+
transition('tabs => add-cipher', inSlideUp),
transition('add-cipher => tabs', outSlideDown),
transition('generator => generator-history, tabs => generator-history', inSlideLeft),
transition('generator-history => generator, generator-history => tabs', outSlideRight),
- transition('add-cipher => generator, edit-cipher => generator', inSlideUp),
- transition('generator => add-cipher, generator => edit-cipher', outSlideDown),
+ transition('add-cipher => generator, edit-cipher => generator, clone-cipher => generator', inSlideUp),
+ transition('generator => add-cipher, generator => edit-cipher, generator => clone-cipher', outSlideDown),
transition('edit-cipher => share-cipher', inSlideUp),
transition('share-cipher => edit-cipher, share-cipher => view-cipher', outSlideDown),
@@ -160,6 +165,9 @@ export const routerTransition = trigger('routerTransition', [
transition('edit-cipher => attachments, edit-cipher => collections', inSlideLeft),
transition('attachments => edit-cipher, collections => edit-cipher', outSlideRight),
+ transition('clone-cipher => attachments, clone-cipher => collections', inSlideLeft),
+ transition('attachments => clone-cipher, collections => clone-cipher', outSlideRight),
+
transition('tabs => export', inSlideLeft),
transition('export => tabs', outSlideRight),
diff --git a/src/popup/app-routing.module.ts b/src/popup/app-routing.module.ts
index fe575fc771..b92d9830e0 100644
--- a/src/popup/app-routing.module.ts
+++ b/src/popup/app-routing.module.ts
@@ -204,6 +204,12 @@ const routes: Routes = [
component: PrivateModeComponent,
data: { state: 'private-mode' },
},
+ {
+ path: 'clone-cipher',
+ component: AddEditComponent,
+ canActivate: [AuthGuardService],
+ data: { state: 'clone-cipher' },
+ },
{
path: 'tabs',
component: TabsComponent,
diff --git a/src/popup/vault/add-edit.component.html b/src/popup/vault/add-edit.component.html
index 3feda8951f..a1b40ae794 100644
--- a/src/popup/vault/add-edit.component.html
+++ b/src/popup/vault/add-edit.component.html
@@ -256,7 +256,7 @@
+ (click)="editCollections()" *ngIf="editMode && cipher.organizationId && !cloneMode">