mirror of
https://github.com/bitwarden/mobile
synced 2025-12-10 13:23:39 +00:00
setup more models
This commit is contained in:
27
src/Core/Models/View/LoginView.cs
Normal file
27
src/Core/Models/View/LoginView.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Bit.Core.Models.Domain;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Bit.Core.Models.View
|
||||
{
|
||||
public class LoginView : View
|
||||
{
|
||||
public LoginView() { }
|
||||
|
||||
public LoginView(Login l)
|
||||
{
|
||||
PasswordRevisionDate = l.PasswordRevisionDate;
|
||||
}
|
||||
|
||||
public string Username { get; set; }
|
||||
public string Password { get; set; }
|
||||
public DateTime? PasswordRevisionDate { get; set; }
|
||||
public string Totp { get; set; }
|
||||
public List<LoginUriView> Uris { get; set; }
|
||||
public string Uri => HashUris ? Uris[0].Uri : null;
|
||||
public string MaskedPassword => Password != null ? "••••••••" : null;
|
||||
public string SubTitle => Username;
|
||||
// TODO: uri launch props
|
||||
public bool HashUris => (Uris?.Count ?? 0) > 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user