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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

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);