diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index c2b67cbb5d..5c65af888b 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -122,7 +122,7 @@ const routes: Routes = [ canActivate: [OrganizationTypeGuardService], data: { allowedTypes: [OrganizationUserType.Owner, OrganizationUserType.Admin] }, children: [ - { path: '', pathMatch: 'full', redirectTo: 'export' }, + { path: '', pathMatch: 'full', redirectTo: 'import' }, { path: 'import', component: OrgImportComponent, data: { titleId: 'importData' } }, { path: 'export', component: OrgExportComponent, data: { titleId: 'exportVault' } }, ], diff --git a/src/app/organizations/tools/import.component.ts b/src/app/organizations/tools/import.component.ts index 1b8e800c63..adf67c0a5c 100644 --- a/src/app/organizations/tools/import.component.ts +++ b/src/app/organizations/tools/import.component.ts @@ -42,6 +42,7 @@ export class ImportComponent extends BaseImportComponent { ngOnInit() { this.route.parent.parent.params.subscribe(async (params) => { this.organizationId = params.organizationId; + this.successNavigate = ['organizations', this.organizationId, 'vault']; super.ngOnInit(); }); } diff --git a/src/app/tools/import.component.ts b/src/app/tools/import.component.ts index d011998ead..358cb4e88c 100644 --- a/src/app/tools/import.component.ts +++ b/src/app/tools/import.component.ts @@ -38,6 +38,8 @@ export class ImportComponent implements OnInit { fileContents: string; formPromise: Promise; + protected successNavigate: any[] = ['vault']; + constructor(protected i18nService: I18nService, protected analytics: Angulartics2, protected toasterService: ToasterService, protected cipherService: CipherService, protected folderService: FolderService, protected apiService: ApiService, @@ -117,7 +119,7 @@ export class ImportComponent implements OnInit { properties: { label: this.format }, }); this.toasterService.popAsync('success', null, this.i18nService.t('importSuccess')); - this.router.navigate(['vault']); + this.router.navigate(this.successNavigate); } catch { } } else { this.error(this.i18nService.t('importFormatError'));