1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-19 09:43:27 +00:00

Assigning context to add site cells

This commit is contained in:
Kyle Spearrin
2016-07-08 00:35:48 -04:00
parent ecb7e9921d
commit 3291a0d78d
5 changed files with 141 additions and 92 deletions

View File

@@ -1,13 +1,34 @@
using System;
using Bit.App.Models;
using Foundation;
namespace Bit.iOS.Extension.Models
{
public class Context
{
private DomainName _domainName;
public NSExtensionContext ExtContext { get; set; }
public string ProviderType { get; set; }
public Uri Url { get; set; }
public DomainName DomainName
{
get
{
if(_domainName != null)
{
return _domainName;
}
DomainName domain;
if(Url?.Host != null && DomainName.TryParse(Url?.Host, out domain))
{
_domainName = domain;
}
return _domainName;
}
}
public string SiteTitle { get; set; }
public string Username { get; set; }
public string Password { get; set; }