From cc801ce0d7e200a365bed02c35b8d97666dbeab4 Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Tue, 15 Dec 2020 10:02:54 -0600 Subject: [PATCH] Has Totp method will be used to enable quick copy (#225) --- src/models/view/loginView.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/models/view/loginView.ts b/src/models/view/loginView.ts index 7c13a33faa..a891f9d231 100644 --- a/src/models/view/loginView.ts +++ b/src/models/view/loginView.ts @@ -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);