1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +00:00

Move web to apps/web and bitwarden_license/bit-web

This commit is contained in:
Hinton
2022-06-02 11:55:37 +02:00
parent fb35805202
commit 02fe715903
619 changed files with 2 additions and 7 deletions

View File

@@ -0,0 +1,39 @@
import { Component, EventEmitter, Input, OnInit, Output } from "@angular/core";
import { CipherService } from "jslib-common/abstractions/cipher.service";
import { FolderService } from "jslib-common/abstractions/folder.service";
import { I18nService } from "jslib-common/abstractions/i18n.service";
import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service";
import { FolderView } from "jslib-common/models/view/folderView";
@Component({
selector: "app-vault-bulk-move",
templateUrl: "bulk-move.component.html",
})
export class BulkMoveComponent implements OnInit {
@Input() cipherIds: string[] = [];
@Output() onMoved = new EventEmitter();
folderId: string = null;
folders: FolderView[] = [];
formPromise: Promise<any>;
constructor(
private cipherService: CipherService,
private platformUtilsService: PlatformUtilsService,
private i18nService: I18nService,
private folderService: FolderService
) {}
async ngOnInit() {
this.folders = await this.folderService.getAllDecrypted();
this.folderId = this.folders[0].id;
}
async submit() {
this.formPromise = this.cipherService.moveManyWithServer(this.cipherIds, this.folderId);
await this.formPromise;
this.onMoved.emit();
this.platformUtilsService.showToast("success", null, this.i18nService.t("movedItems"));
}
}