1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-21 02:33:46 +00:00

Create "new Send-button with type selection (#9842)

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
This commit is contained in:
Daniel James Smith
2024-06-26 18:08:18 +02:00
committed by GitHub
parent 1495b06736
commit 5a74371672
3 changed files with 38 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
import { CommonModule } from "@angular/common";
import { Component } from "@angular/core";
import { Router, RouterLink } from "@angular/router";
import { JslibModule } from "@bitwarden/angular/jslib.module";
import { SendType } from "@bitwarden/common/tools/send/enums/send-type";
import { ButtonModule, MenuModule } from "@bitwarden/components";
@Component({
selector: "tools-new-send-dropdown",
templateUrl: "new-send-dropdown.component.html",
standalone: true,
imports: [JslibModule, CommonModule, ButtonModule, RouterLink, MenuModule],
})
export class NewSendDropdownComponent {
sendType = SendType;
constructor(private router: Router) {}
newItemNavigate(type: SendType) {
void this.router.navigate(["/add-send"], { queryParams: { type: type, isNew: true } });
}
}