Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

Commit

Permalink
Has Totp method will be used to enable quick copy (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
MGibson1 committed Dec 15, 2020
1 parent 2c414ce commit cc801ce
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/models/view/loginView.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit cc801ce

Please sign in to comment.