1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-20 02:03:49 +00:00

access group for keychain. load sites for given hostname in extension

This commit is contained in:
Kyle Spearrin
2016-06-25 01:58:42 -04:00
parent 9d8f54af9d
commit 1307b6a1b2
12 changed files with 104 additions and 22 deletions

View File

@@ -0,0 +1,44 @@
using System;
using System.Collections.Generic;
using System.Text;
using Bit.App.Models;
namespace Bit.iOS.Extension.Models
{
public class SiteViewModel
{
public SiteViewModel(Site site)
{
Id = site.Id;
Name = site.Name?.Decrypt();
Username = site.Username?.Decrypt();
Password = site.Password?.Decrypt();
Uri = site.Uri?.Decrypt();
}
public string Id { get; set; }
public string Name { get; set; }
public string Username { get; set; }
public string Password { get; set; }
public string Uri { get; set; }
public string HostName
{
get
{
if(string.IsNullOrWhiteSpace(Uri))
{
return null;
}
try
{
return new Uri(Uri)?.Host;
}
catch
{
return null;
};
}
}
}
}