diff --git a/src/popup/settings/export.component.html b/src/popup/settings/export.component.html index de5063bf01..d3a87858ec 100644 --- a/src/popup/settings/export.component.html +++ b/src/popup/settings/export.component.html @@ -1,10 +1,10 @@
{{'exportVault' | i18n}} diff --git a/src/popup/settings/export.component.ts b/src/popup/settings/export.component.ts index 68e8493ab7..f518c73299 100644 --- a/src/popup/settings/export.component.ts +++ b/src/popup/settings/export.component.ts @@ -1,8 +1,8 @@ import { ToasterService } from 'angular2-toaster'; import { Angulartics2 } from 'angulartics2'; -import { Location } from '@angular/common'; import { Component } from '@angular/core'; +import { Router } from '@angular/router'; import { CipherService } from 'jslib/abstractions/cipher.service'; import { CryptoService } from 'jslib/abstractions/crypto.service'; @@ -22,17 +22,13 @@ export class ExportComponent extends BaseExportComponent { cipherService: CipherService, folderService: FolderService, cryptoService: CryptoService, userService: UserService, i18nService: I18nService, platformUtilsService: PlatformUtilsService, - private location: Location) { + private router: Router) { super(analytics, toasterService, cipherService, folderService, cryptoService, userService, i18nService, platformUtilsService, window); } - close() { - this.location.back(); - } - protected saved() { super.saved(); - this.close(); + this.router.navigate(['/tabs/settings']); } } diff --git a/src/popup/settings/folder-add-edit.component.html b/src/popup/settings/folder-add-edit.component.html index e5e93aca74..f0735a36f5 100644 --- a/src/popup/settings/folder-add-edit.component.html +++ b/src/popup/settings/folder-add-edit.component.html @@ -1,7 +1,7 @@
- + {{'cancel' | i18n}}
{{title}} diff --git a/src/popup/settings/folder-add-edit.component.ts b/src/popup/settings/folder-add-edit.component.ts index 0af1359d74..428ae500c2 100644 --- a/src/popup/settings/folder-add-edit.component.ts +++ b/src/popup/settings/folder-add-edit.component.ts @@ -1,4 +1,3 @@ -import { Location } from '@angular/common'; import { Component } from '@angular/core'; import { ActivatedRoute, @@ -23,8 +22,8 @@ import { export class FolderAddEditComponent extends BaseFolderAddEditComponent { constructor(folderService: FolderService, i18nService: I18nService, analytics: Angulartics2, toasterService: ToasterService, - platformUtilsService: PlatformUtilsService, private location: Location, - private router: Router, private route: ActivatedRoute) { + platformUtilsService: PlatformUtilsService, private router: Router, + private route: ActivatedRoute) { super(folderService, i18nService, analytics, toasterService, platformUtilsService); } @@ -39,21 +38,17 @@ export class FolderAddEditComponent extends BaseFolderAddEditComponent { async submit(): Promise { if (await super.submit()) { - this.location.back(); + this.router.navigate(['/folders']); return true; } return false; } - cancel() { - this.location.back(); - } - async delete(): Promise { const confirmed = await super.delete(); if (confirmed) { - this.location.back(); + this.router.navigate(['/folders']); } return confirmed; } diff --git a/src/popup/settings/folders.component.html b/src/popup/settings/folders.component.html index 926dc1310b..4d20abe52e 100644 --- a/src/popup/settings/folders.component.html +++ b/src/popup/settings/folders.component.html @@ -1,9 +1,9 @@
{{'folders' | i18n}} diff --git a/src/popup/settings/folders.component.ts b/src/popup/settings/folders.component.ts index 69aa31319a..54465b33c8 100644 --- a/src/popup/settings/folders.component.ts +++ b/src/popup/settings/folders.component.ts @@ -1,4 +1,3 @@ -import { Location } from '@angular/common'; import { Component, OnInit, @@ -16,8 +15,7 @@ import { FolderService } from 'jslib/abstractions/folder.service'; export class FoldersComponent implements OnInit { folders: FolderView[]; - constructor(private folderService: FolderService, private location: Location, - private router: Router) { + constructor(private folderService: FolderService, private router: Router) { } async ngOnInit() { @@ -31,8 +29,4 @@ export class FoldersComponent implements OnInit { addFolder() { this.router.navigate(['/add-folder']); } - - close() { - this.location.back(); - } } diff --git a/src/popup/settings/sync.component.html b/src/popup/settings/sync.component.html index e016a8a9c5..bfb69e8a59 100644 --- a/src/popup/settings/sync.component.html +++ b/src/popup/settings/sync.component.html @@ -1,9 +1,9 @@
{{'sync' | i18n}} diff --git a/src/popup/settings/sync.component.ts b/src/popup/settings/sync.component.ts index a9bc4cafa5..93df70d826 100644 --- a/src/popup/settings/sync.component.ts +++ b/src/popup/settings/sync.component.ts @@ -47,8 +47,4 @@ export class SyncComponent implements OnInit { this.lastSync = this.i18nService.t('never'); } } - - close() { - this.router.navigate(['/tabs/settings']); - } }