1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00:00

Has Totp method will be used to enable quick copy (#225)

This commit is contained in:
Matt Gibson
2020-12-15 10:02:54 -06:00
committed by GitHub
parent 2c414ce27a
commit cc801ce0d7

View File

@@ -1,6 +1,7 @@
import { LoginUriView } from './loginUriView';
import { View } from './view';
import { Utils } from '../../misc/utils';
import { Login } from '../domain/login';
export class LoginView implements View {
@@ -34,6 +35,10 @@ export class LoginView implements View {
return this.hasUris && this.uris.some((u) => u.canLaunch);
}
get hasTotp(): boolean {
return !Utils.isNullOrWhitespace(this.totp);
}
get launchUri(): string {
if (this.hasUris) {
const uri = this.uris.find((u) => u.canLaunch);