mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 02:18:27 +03:00
Modified listing of website from Hostname to Host (#1012)
* Modified listing of website from Hostname to Host * Removed last _hostname artifact.
This commit is contained in:
parent
cf6021d898
commit
10a78c1c94
2 changed files with 9 additions and 9 deletions
|
@ -470,7 +470,7 @@
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
IsVisible="{Binding IsWebsite, Mode=OneWay}" />
|
IsVisible="{Binding IsWebsite, Mode=OneWay}" />
|
||||||
<Label
|
<Label
|
||||||
Text="{Binding HostnameOrUri, Mode=OneWay}"
|
Text="{Binding HostOrUri, Mode=OneWay}"
|
||||||
StyleClass="box-value"
|
StyleClass="box-value"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Grid.Column="0" />
|
Grid.Column="0" />
|
||||||
|
|
|
@ -25,7 +25,7 @@ namespace Bit.Core.Models.View
|
||||||
|
|
||||||
private string _uri;
|
private string _uri;
|
||||||
private string _domain;
|
private string _domain;
|
||||||
private string _hostname;
|
private string _host;
|
||||||
private bool? _canLaunch;
|
private bool? _canLaunch;
|
||||||
|
|
||||||
public LoginUriView() { }
|
public LoginUriView() { }
|
||||||
|
@ -63,7 +63,7 @@ namespace Bit.Core.Models.View
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Hostname
|
public string Host
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
@ -71,19 +71,19 @@ namespace Bit.Core.Models.View
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (_hostname == null && Uri != null)
|
if (_host == null && Uri != null)
|
||||||
{
|
{
|
||||||
_hostname = CoreHelpers.GetHostname(Uri);
|
_host = CoreHelpers.GetHost(Uri);
|
||||||
if (_hostname == string.Empty)
|
if (_host == string.Empty)
|
||||||
{
|
{
|
||||||
_hostname = null;
|
_host = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return _hostname;
|
return _host;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string HostnameOrUri => Hostname ?? Uri;
|
public string HostOrUri => Host ?? Uri;
|
||||||
|
|
||||||
public bool IsWebsite => Uri != null && (Uri.StartsWith("http://") || Uri.StartsWith("https://") ||
|
public bool IsWebsite => Uri != null && (Uri.StartsWith("http://") || Uri.StartsWith("https://") ||
|
||||||
(Uri.Contains("://") && Regex.IsMatch(Uri, CoreHelpers.TldEndingRegex)));
|
(Uri.Contains("://") && Regex.IsMatch(Uri, CoreHelpers.TldEndingRegex)));
|
||||||
|
|
Loading…
Reference in a new issue