Login error Popup page implemented.
This commit is contained in:
parent
5008dea0db
commit
d931b840dc
@ -146,6 +146,9 @@
|
|||||||
<MauiXaml Update="Views\InstallCompletePage.xaml">
|
<MauiXaml Update="Views\InstallCompletePage.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</MauiXaml>
|
</MauiXaml>
|
||||||
|
<MauiXaml Update="Views\LoginErrorAlertDialogPage.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</MauiXaml>
|
||||||
<MauiXaml Update="Views\LoginPage.xaml">
|
<MauiXaml Update="Views\LoginPage.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</MauiXaml>
|
</MauiXaml>
|
||||||
|
@ -163,7 +163,7 @@ public partial class HomePage : ContentPage
|
|||||||
var lastLatitude = Convert.ToDouble(Preferences.Get("lastLat", "0"));
|
var lastLatitude = Convert.ToDouble(Preferences.Get("lastLat", "0"));
|
||||||
var lastLongitude = Convert.ToDouble(Preferences.Get("lastLng", "0"));
|
var lastLongitude = Convert.ToDouble(Preferences.Get("lastLng", "0"));
|
||||||
await gmCabsDriverService.LogoutDriverApp(token, lastLatitude, lastLongitude);
|
await gmCabsDriverService.LogoutDriverApp(token, lastLatitude, lastLongitude);
|
||||||
//Navigation.ShowPopup(new LoginErrorAlertDialogPage());
|
this.ShowPopup(new LoginErrorAlertDialogPage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -197,10 +197,10 @@ public partial class HomePage : ContentPage
|
|||||||
if (HasUnreadNotifications && !IsBookingAvailable)
|
if (HasUnreadNotifications && !IsBookingAvailable)
|
||||||
{
|
{
|
||||||
//open notification page
|
//open notification page
|
||||||
//Device.BeginInvokeOnMainThread(() =>
|
Device.BeginInvokeOnMainThread(() =>
|
||||||
//{
|
{
|
||||||
// Navigation.PushAsync(new NotificationsPage());
|
Navigation.PushAsync(new NotificationsPage());
|
||||||
//});
|
});
|
||||||
}
|
}
|
||||||
else if (!HasUnreadNotifications && IsBookingAvailable && availableBookingIDs != null && availableBookingIDs.Count == 1)
|
else if (!HasUnreadNotifications && IsBookingAvailable && availableBookingIDs != null && availableBookingIDs.Count == 1)
|
||||||
{
|
{
|
||||||
@ -223,7 +223,7 @@ public partial class HomePage : ContentPage
|
|||||||
|
|
||||||
Device.BeginInvokeOnMainThread(async () =>
|
Device.BeginInvokeOnMainThread(async () =>
|
||||||
{
|
{
|
||||||
//await Shell.Current.GoToAsync($"{nameof(BookingDetailsPage)}?{nameof(BookingDetailViewModel.BookingJson)}={bookingJson}");
|
await Shell.Current.GoToAsync($"{nameof(BookingDetailsPage)}?{nameof(BookingDetailViewModel.BookingJson)}={bookingJson}");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<toolkit:Popup xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="GMCabsDriverAssistantSolution.Views.LoginErrorAlertDialogPage"
|
||||||
|
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
|
||||||
|
Size="300,300"
|
||||||
|
Color="Transparent">
|
||||||
|
<Frame BackgroundColor="White" CornerRadius="10">
|
||||||
|
<StackLayout Orientation="Vertical">
|
||||||
|
<StackLayout VerticalOptions="CenterAndExpand">
|
||||||
|
<Label Text="Cannot work further as the same credential is currently using in a tablet, Press OK to Exit" VerticalTextAlignment="Center" VerticalOptions="CenterAndExpand" HorizontalOptions="CenterAndExpand" FontSize="20"/>
|
||||||
|
</StackLayout>
|
||||||
|
<StackLayout VerticalOptions="EndAndExpand" Margin="10,10,0,10">
|
||||||
|
<Button Text="Ok" Clicked="OkButton_Clicked" TextColor="White" FontSize="20" />
|
||||||
|
</StackLayout>
|
||||||
|
</StackLayout>
|
||||||
|
</Frame>
|
||||||
|
</toolkit:Popup>
|
@ -0,0 +1,17 @@
|
|||||||
|
using CommunityToolkit.Maui.Views;
|
||||||
|
|
||||||
|
namespace GMCabsDriverAssistantSolution.Views;
|
||||||
|
|
||||||
|
public partial class LoginErrorAlertDialogPage : Popup
|
||||||
|
{
|
||||||
|
public LoginErrorAlertDialogPage()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void OkButton_Clicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
await Shell.Current.GoToAsync($"//{nameof(LoginPage)}");
|
||||||
|
//Dismiss(null);
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user