mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-06-22 05:47:28 +02:00
Version 3.0.342
This commit is contained in:
parent
d852ccef4c
commit
2cde196f16
54 changed files with 998 additions and 498 deletions
|
@ -25,7 +25,6 @@
|
|||
Source="{Binding Uri}" />
|
||||
|
||||
<ActivityIndicator Grid.Row="0"
|
||||
x:Name="ActivityIndicatorLoading"
|
||||
Scale="2"
|
||||
VerticalOptions="CenterAndExpand"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System.Globalization;
|
||||
using System.Globalization;
|
||||
using Serilog;
|
||||
using TINK.Model.Device;
|
||||
using TINK.ViewModel.Login;
|
||||
|
@ -14,40 +14,12 @@ namespace TINK.View.CopriWebView
|
|||
{
|
||||
InitializeComponent();
|
||||
|
||||
ManageAccount.Navigating += (sender, ev) =>
|
||||
{
|
||||
if (!ev.Url.ToUpper().EndsWith(".PDF"))
|
||||
{
|
||||
// Stay inside web view except for downloading pdf- files.
|
||||
this.IsEnabled = false;
|
||||
ActivityIndicatorLoading.IsVisible = true;
|
||||
ActivityIndicatorLoading.IsRunning = true;
|
||||
return;
|
||||
}
|
||||
ManageAccount.Navigating += WebViewHelper.SetBusyAndDisplayOrDownload;
|
||||
|
||||
DependencyService.Get<IExternalBrowserService>().OpenUrl(ev.Url);
|
||||
};
|
||||
|
||||
ManageAccount.Navigated += (sender, ev) =>
|
||||
{
|
||||
if (ev.Result == WebNavigationResult.Success)
|
||||
{
|
||||
this.IsEnabled = true;
|
||||
ActivityIndicatorLoading.IsVisible = false;
|
||||
ActivityIndicatorLoading.IsRunning = false;
|
||||
return;
|
||||
}
|
||||
|
||||
Log.ForContext<ManageAccountPage>().Error("Navigation did not succeed.{@Event}{@Sender}", ev, sender);
|
||||
ManageAccount.Source = new HtmlWebViewSource
|
||||
{
|
||||
Html = "<html><b>Kann persönliche Daten nicht anzeigen/ verwalten!</b><br>Verbindung mit Internet ok?</html>"
|
||||
};
|
||||
|
||||
this.IsEnabled = true;
|
||||
ActivityIndicatorLoading.IsVisible = false;
|
||||
ActivityIndicatorLoading.IsRunning = false;
|
||||
};
|
||||
ManageAccount.Navigated += (sender, eventArgs) => WebViewHelper.SetIdleAndHandleError(
|
||||
sender,
|
||||
eventArgs,
|
||||
"<html><b>Kann persönliche Daten nicht anzeigen/ verwalten!</b><br>Verbindung mit Internet ok?</html>");
|
||||
|
||||
ManageAccount.BindingContext = new ManageAccountViewModel(
|
||||
App.ModelRoot.ActiveUser.SessionCookie,
|
||||
|
@ -56,4 +28,4 @@ namespace TINK.View.CopriWebView
|
|||
App.ModelRoot.NextActiveUri.Host);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue