1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-14 23:33:31 +00:00
Files
browser/libs/vault/src/cipher-view/autofill-options/autofill-options-view.component.ts
Cesar Gonzalez 9b471e6633 [PM-13715] Launching a website from the extension does not trigger an update to reference the correct autofill value (#11587)
* [PM-13715] Launching page from cipher does not set correct autofill action

* [PM-13715] Fix autofill not triggering for correct cipher after page has been launched from browser extension
2024-10-24 08:22:43 -05:00

46 lines
1.3 KiB
TypeScript

import { CommonModule } from "@angular/common";
import { Component, Input } from "@angular/core";
import { JslibModule } from "@bitwarden/angular/jslib.module";
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
import { LoginUriView } from "@bitwarden/common/vault/models/view/login-uri.view";
import {
CardComponent,
FormFieldModule,
IconButtonModule,
SectionComponent,
SectionHeaderComponent,
TypographyModule,
} from "@bitwarden/components";
@Component({
selector: "app-autofill-options-view",
templateUrl: "autofill-options-view.component.html",
standalone: true,
imports: [
CommonModule,
JslibModule,
CardComponent,
SectionComponent,
SectionHeaderComponent,
TypographyModule,
FormFieldModule,
IconButtonModule,
],
})
export class AutofillOptionsViewComponent {
@Input() loginUris: LoginUriView[];
@Input() cipherId: string;
constructor(
private platformUtilsService: PlatformUtilsService,
private cipherService: CipherService,
) {}
async openWebsite(selectedUri: string) {
await this.cipherService.updateLastLaunchedDate(this.cipherId);
this.platformUtilsService.launchUri(selectedUri);
}
}