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:
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user