1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-10 13:23:34 +00:00

[PM-4871] Remove clickable row in favor of clickable cell content (#6911)

* Improved UX on vault items

* Remove clickable row in vault collections

---------

Co-authored-by: SmithThe4th <gsmith@bitwarden.com>
This commit is contained in:
Spitfireap
2024-02-14 22:52:45 +00:00
committed by GitHub
parent 3edf098aaf
commit 973b95fe38
2 changed files with 3 additions and 43 deletions

View File

@@ -1,5 +1,4 @@
import { Component, EventEmitter, HostBinding, HostListener, Input, Output } from "@angular/core"; import { Component, EventEmitter, Input, Output } from "@angular/core";
import { ActivatedRoute, Router } from "@angular/router";
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
import { CipherType } from "@bitwarden/common/vault/enums"; import { CipherType } from "@bitwarden/common/vault/enums";
@@ -35,16 +34,6 @@ export class VaultCipherRowComponent {
protected CipherType = CipherType; protected CipherType = CipherType;
constructor(
private router: Router,
private activatedRoute: ActivatedRoute,
) {}
@HostBinding("class")
get classes() {
return [].concat(this.disabled ? [] : ["tw-cursor-pointer"]);
}
protected get showTotpCopyButton() { protected get showTotpCopyButton() {
return ( return (
(this.cipher.login?.hasTotp ?? false) && (this.cipher.login?.hasTotp ?? false) &&
@@ -56,16 +45,6 @@ export class VaultCipherRowComponent {
return this.cipher.hasOldAttachments && this.cipher.organizationId == null; return this.cipher.hasOldAttachments && this.cipher.organizationId == null;
} }
@HostListener("click")
protected click() {
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
// eslint-disable-next-line @typescript-eslint/no-floating-promises
this.router.navigate([], {
queryParams: { itemId: this.cipher.id },
queryParamsHandling: "merge",
});
}
protected copy(field: "username" | "password" | "totp") { protected copy(field: "username" | "password" | "totp") {
this.onEvent.emit({ type: "copyField", item: this.cipher, field }); this.onEvent.emit({ type: "copyField", item: this.cipher, field });
} }

View File

@@ -1,5 +1,4 @@
import { Component, EventEmitter, HostBinding, HostListener, Input, Output } from "@angular/core"; import { Component, EventEmitter, Input, Output } from "@angular/core";
import { Router } from "@angular/router";
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
@@ -38,15 +37,7 @@ export class VaultCollectionRowComponent {
@Input() checked: boolean; @Input() checked: boolean;
@Output() checkedToggled = new EventEmitter<void>(); @Output() checkedToggled = new EventEmitter<void>();
constructor( constructor(private i18nService: I18nService) {}
private router: Router,
private i18nService: I18nService,
) {}
@HostBinding("class")
get classes() {
return [].concat(this.disabled ? [] : ["tw-cursor-pointer"]);
}
get collectionGroups() { get collectionGroups() {
if (!(this.collection instanceof CollectionAdminView)) { if (!(this.collection instanceof CollectionAdminView)) {
@@ -71,16 +62,6 @@ export class VaultCollectionRowComponent {
} }
} }
@HostListener("click")
protected click() {
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
// eslint-disable-next-line @typescript-eslint/no-floating-promises
this.router.navigate([], {
queryParams: { collectionId: this.collection.id },
queryParamsHandling: "merge",
});
}
protected edit() { protected edit() {
this.onEvent.next({ type: "editCollection", item: this.collection }); this.onEvent.next({ type: "editCollection", item: this.collection });
} }