mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-11 19:40:47 +01:00
go back to view after sharing
This commit is contained in:
parent
fd80d4557f
commit
b83188993f
2
jslib
2
jslib
@ -1 +1 @@
|
||||
Subproject commit 2f510a798853ef3adfed7e8285c9d3f54eba493c
|
||||
Subproject commit 43c0cbce452daff9bcc4c70866a56c8cbd548b4a
|
@ -121,7 +121,7 @@ export const routerTransition = trigger('routerTransition', [
|
||||
transition('generator => add-cipher, generator => edit-cipher', outSlideDown),
|
||||
|
||||
transition('edit-cipher => share-cipher', inSlideUp),
|
||||
transition('share-cipher => edit-cipher', outSlideDown),
|
||||
transition('share-cipher => edit-cipher, share-cipher => view-cipher', outSlideDown),
|
||||
|
||||
transition('edit-cipher => attachments, edit-cipher => collections', inSlideLeft),
|
||||
transition('attachments => edit-cipher, collections => edit-cipher', outSlideRight),
|
||||
|
@ -1,6 +1,9 @@
|
||||
import { Location } from '@angular/common';
|
||||
import { Component } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import {
|
||||
ActivatedRoute,
|
||||
Router,
|
||||
} from '@angular/router';
|
||||
|
||||
import { CipherService } from 'jslib/abstractions/cipher.service';
|
||||
import { CollectionService } from 'jslib/abstractions/collection.service';
|
||||
@ -18,11 +21,14 @@ export class ShareComponent extends BaseShareComponent {
|
||||
constructor(collectionService: CollectionService, platformUtilsService: PlatformUtilsService,
|
||||
i18nService: I18nService, userService: UserService,
|
||||
cipherService: CipherService, private route: ActivatedRoute,
|
||||
private location: Location) {
|
||||
private location: Location, private router: Router) {
|
||||
super(collectionService, platformUtilsService, i18nService, userService, cipherService);
|
||||
}
|
||||
|
||||
async ngOnInit() {
|
||||
this.onSharedCipher.subscribe(() => {
|
||||
this.router.navigate(['view-cipher', { cipherId: this.cipherId }]);
|
||||
});
|
||||
this.route.queryParams.subscribe(async (params) => {
|
||||
this.cipherId = params.cipherId;
|
||||
await super.ngOnInit();
|
||||
|
Loading…
Reference in New Issue
Block a user