Skip to content

Commit 081abf5

Browse files
committed
Hide tabbars when not signed in
1 parent 8912766 commit 081abf5

5 files changed

Lines changed: 25 additions & 8 deletions

File tree

StudentUsos/Features/Authorization/Views/LoginSettingsPage.xaml.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public LoginSettingsPage(INavigationService navigationService, IApplicationServi
1818

1919
private void AppInfoButton_Clicked(object sender, EventArgs e)
2020
{
21-
navigationService.PushAsync<AppInfoPage>();
21+
navigationService.PushAsync<AppInfoPage, bool>(false);
2222
}
2323

2424
void CopyEmailToClipboard(object sender, EventArgs e)
@@ -39,11 +39,11 @@ private async void GitHubButton_Clicked(object sender, EventArgs e)
3939

4040
private void LogsButton_Clicked(object sender, EventArgs e)
4141
{
42-
navigationService.PushAsync<LogsPage>();
42+
navigationService.PushAsync<LogsPage, bool>(false);
4343
}
4444

4545
private void DevTunnelButton_Clicked_1(object sender, EventArgs e)
4646
{
47-
navigationService.PushAsync<DevTunnelPage>();
47+
navigationService.PushAsync<DevTunnelPage, bool>(false);
4848
}
4949
}

StudentUsos/Features/Settings/Views/AppInfoPage.xaml.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace StudentUsos.Features.Settings.Views;
55

6-
public partial class AppInfoPage : CustomContentPageNotAnimated
6+
public partial class AppInfoPage : CustomContentPageNotAnimated, INavigableWithParameter<bool>
77
{
88
IApplicationService applicationService;
99
public AppInfoPage(IApplicationService applicationService)
@@ -13,6 +13,11 @@ public AppInfoPage(IApplicationService applicationService)
1313
this.applicationService = applicationService;
1414
}
1515

16+
public void OnNavigated(bool navigationParameter)
17+
{
18+
this.IsTabBarVisible = navigationParameter;
19+
}
20+
1621
void CopyEmailToClipboard(object sender, EventArgs e)
1722
{
1823
Clipboard.Default.SetTextAsync("studenckiusosput@gmail.com");

StudentUsos/Features/Settings/Views/LogsPage.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
x:DataType="views:LogsViewModel">
1111

1212
<StackLayout Margin="20,45,20,0">
13-
<Button Text="{x:Static string:LocalizedStrings.LogsPage_RemoveAll}" Command="{Binding RemoveAllLogsCommand}"
13+
<Button x:Name="removeButton" Text="{x:Static string:LocalizedStrings.LogsPage_RemoveAll}" Command="{Binding RemoveAllLogsCommand}"
1414
Margin="5"/>
15-
<Button Text="{x:Static string:LocalizedStrings.LogsPage_SendAllLogs}" Command="{Binding SendAllLogsCommand}"
15+
<Button x:Name="sendButton" Text="{x:Static string:LocalizedStrings.LogsPage_SendAllLogs}" Command="{Binding SendAllLogsCommand}"
1616
Margin="5"/>
1717
<CollectionView Margin="0" ItemsSource="{Binding Logs}" VerticalOptions="FillAndExpand">
1818
<CollectionView.FooterTemplate>

StudentUsos/Features/Settings/Views/LogsPage.xaml.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace StudentUsos.Features.Settings.Views;
44

5-
public partial class LogsPage : CustomContentPageNotAnimated
5+
public partial class LogsPage : CustomContentPageNotAnimated, INavigableWithParameter<bool>
66
{
77
LogsViewModel viewModel;
88
public LogsPage(LogsViewModel viewModel)
@@ -26,4 +26,11 @@ protected override void OnNavigatedTo(NavigatedToEventArgs args)
2626
viewModel.Init();
2727
});
2828
}
29+
30+
public void OnNavigated(bool navigationParameter)
31+
{
32+
this.IsTabBarVisible = navigationParameter;
33+
this.removeButton.IsVisible = false;
34+
this.sendButton.IsVisible = false;
35+
}
2936
}

StudentUsos/Features/Settings/Views/Subpages/DevTunnelPage.xaml.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace StudentUsos.Features.Settings.Views.Subpages;
55

6-
public partial class DevTunnelPage : CustomContentPageNotAnimated
6+
public partial class DevTunnelPage : CustomContentPageNotAnimated, INavigableWithParameter<bool>
77
{
88
IDevTunnelService devTunnelService;
99
public DevTunnelPage(IDevTunnelService devTunnelService)
@@ -45,4 +45,9 @@ private void TextEdit_TextChanged(object sender, EventArgs e)
4545
devTunnelService.SaveDevTunnelId(text);
4646
}
4747
}
48+
49+
public void OnNavigated(bool navigationParameter)
50+
{
51+
this.IsTabBarVisible = navigationParameter;
52+
}
4853
}

0 commit comments

Comments
 (0)