"copy" UI related things from chrome

This commit is contained in:
DEV Sam Hayes
2025-02-04 20:19:30 +01:00
parent 601ac8cd49
commit b20faf2359
100 changed files with 3514 additions and 362 deletions

View File

@@ -0,0 +1,34 @@
import { Component, inject } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { Router } from '@angular/router';
import { NavComponent, StorageService } from '@common';
@Component({
selector: 'app-new',
imports: [FormsModule],
templateUrl: './new.component.html',
styleUrl: './new.component.scss',
})
export class NewComponent extends NavComponent {
password = '';
readonly #router = inject(Router);
readonly #storage = inject(StorageService);
toggleType(element: HTMLInputElement) {
if (element.type === 'password') {
element.type = 'text';
} else {
element.type = 'password';
}
}
async createVault() {
if (!this.password) {
return;
}
await this.#storage.createNewVault(this.password);
this.#router.navigateByUrl('/home/identities');
}
}