add new route "/vault-import" in the popup
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
import { inject } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
export class NavComponent {
|
||||
readonly #router = inject(Router);
|
||||
|
||||
navigateBack() {
|
||||
window.history.back();
|
||||
}
|
||||
|
||||
navigate(path: string) {
|
||||
this.#router.navigate([path]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,5 +39,5 @@ export abstract class GootiMetaHandler {
|
||||
await this.saveFullData(this.#gootiMetaData);
|
||||
}
|
||||
|
||||
abstract clearData(): Promise<void>;
|
||||
abstract clearData(keep: string[]): Promise<void>;
|
||||
}
|
||||
|
||||
@@ -120,7 +120,6 @@ export const deleteVault = async function (
|
||||
|
||||
await this.getBrowserSyncHandler().clearData();
|
||||
await this.getBrowserSessionHandler().clearData();
|
||||
await this.getGootiMetaHandler().clearData();
|
||||
|
||||
if (!doNotSetIsInitializedToFalse) {
|
||||
this.isInitialized = false;
|
||||
|
||||
@@ -115,6 +115,14 @@ export class StorageService {
|
||||
await deleteVault.call(this, doNotSetIsInitializedToFalse);
|
||||
}
|
||||
|
||||
async resetExtension() {
|
||||
this.assureIsInitialized();
|
||||
await this.getBrowserSyncHandler().clearData();
|
||||
await this.getBrowserSessionHandler().clearData();
|
||||
await this.getGootiMetaHandler().clearData([]);
|
||||
this.isInitialized = false;
|
||||
}
|
||||
|
||||
async unlockVault(password: string): Promise<void> {
|
||||
await unlockVault.call(this, password);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user