mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 02:18:27 +03:00
show launch fixes
This commit is contained in:
parent
d018eeb376
commit
72c7cd2536
2 changed files with 20 additions and 2 deletions
|
@ -109,7 +109,25 @@ namespace Bit.App.Models.Page
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public bool ShowUri => !string.IsNullOrWhiteSpace(Uri);
|
public bool ShowUri => !string.IsNullOrWhiteSpace(Uri);
|
||||||
public bool ShowLaunch => Uri.StartsWith("http://") || Uri.StartsWith("https://");
|
|
||||||
|
public bool ShowLaunch
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if(!ShowUri)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Uri uri;
|
||||||
|
if(!System.Uri.TryCreate(Uri, UriKind.Absolute, out uri))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public string UriHost
|
public string UriHost
|
||||||
{
|
{
|
||||||
|
|
|
@ -74,7 +74,7 @@ namespace Bit.App.Pages
|
||||||
// URI
|
// URI
|
||||||
UriCell = new LabeledValueCell(AppResources.Website, button1Text: AppResources.Launch);
|
UriCell = new LabeledValueCell(AppResources.Website, button1Text: AppResources.Launch);
|
||||||
UriCell.Value.SetBinding(Label.TextProperty, nameof(VaultViewLoginPageModel.UriHost));
|
UriCell.Value.SetBinding(Label.TextProperty, nameof(VaultViewLoginPageModel.UriHost));
|
||||||
UriCell.Value.SetBinding(IsVisibleProperty, nameof(VaultViewLoginPageModel.ShowLaunch));
|
UriCell.Button1.SetBinding(IsVisibleProperty, nameof(VaultViewLoginPageModel.ShowLaunch));
|
||||||
UriCell.Button1.Command = new Command(() => Device.OpenUri(new Uri(Model.Uri)));
|
UriCell.Button1.Command = new Command(() => Device.OpenUri(new Uri(Model.Uri)));
|
||||||
|
|
||||||
// Notes
|
// Notes
|
||||||
|
|
Loading…
Reference in a new issue