Skip to content
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.

サービス終了済み画面にこのアプリについてリンクを追加 #1201

Merged
merged 1 commit into from
Nov 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Covid19Radar/Covid19Radar/Destination.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static class DestinationExtensions
{
private static string SplashPagePath = "/" + nameof(SplashPage);
private static string EndOfServiceNoticePath => $"/{nameof(MenuPage)}/{nameof(NavigationPage)}/{nameof(EndOfServiceNoticePage)}";
private static string EndOfServicePath => $"/{nameof(EndOfServicePage)}";
private static string EndOfServicePath => $"/{nameof(NavigationPage)}/{nameof(EndOfServicePage)}";

public static string ToPath(this Destination destination)
{
Expand Down
9 changes: 9 additions & 0 deletions Covid19Radar/Covid19Radar/Resources/AppResources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Covid19Radar/Covid19Radar/Resources/AppResources.ja.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1510,6 +1510,10 @@ COCOAのソースコードは次のURLから入手できます。</comment>
<value>詳細を確認する</value>
<comment>詳細を確認する</comment>
</data>
<data name="EndOfServicePageAboutAppTextLink" xml:space="preserve">
<value>このアプリについて</value>
<comment>このアプリについて</comment>
</data>

<data name="TerminationOfUsePageTitle" xml:space="preserve">
<value>機能停止の確認</value>
Expand Down
4 changes: 4 additions & 0 deletions Covid19Radar/Covid19Radar/Resources/AppResources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1616,6 +1616,10 @@ By collecting the number of notifications, we can use it to understand how many
<value>Check the Details</value>
<comment>詳細を確認する</comment>
</data>
<data name="EndOfServicePageAboutAppTextLink" xml:space="preserve">
<value>About this app</value>
<comment>このアプリについて</comment>
</data>

<data name="TerminationOfUsePageTitle" xml:space="preserve">
<value>Confirm to end COCOA</value>
Expand Down
4 changes: 4 additions & 0 deletions Covid19Radar/Covid19Radar/Resources/AppResources.zh-Hans.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1514,6 +1514,10 @@ COCOAのソースコードは次のURLから入手できます。</comment>
<value>确认详情​</value>
<comment>詳細を確認する</comment>
</data>
<data name="EndOfServicePageAboutAppTextLink" xml:space="preserve">
<value>关于本应用</value>
<comment>このアプリについて</comment>
</data>

<data name="TerminationOfUsePageTitle" xml:space="preserve">
<value>确认功能关停​</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
using Covid19Radar.Common;
using Covid19Radar.Resources;
using Covid19Radar.Views;
using Prism.Navigation;
using Xamarin.Essentials;
using Xamarin.Forms;
Expand All @@ -12,6 +13,7 @@ namespace Covid19Radar.ViewModels.EndOfService
public class EndOfServicePageViewModel : ViewModelBase
{
public string CheckDetailsLinkReadText => $"{AppResources.EndOfServicePageTextLink} {AppResources.Button}";
public string AboutAppLinkReadText => $"{AppResources.EndOfServicePageAboutAppTextLink} {AppResources.Button}";

public EndOfServicePageViewModel(INavigationService navigationService) : base(navigationService)
{
Expand All @@ -21,6 +23,11 @@ public EndOfServicePageViewModel(INavigationService navigationService) : base(na
{
await Browser.OpenAsync(AppConstants.EndOfServiceCheckDetailsUrl, BrowserLaunchMode.SystemPreferred);
});

public Command AboutAppCommand => new Command(async () =>
{
await NavigationService.NavigateAsync(nameof(SettingsPage));
});
}
}

13 changes: 13 additions & 0 deletions Covid19Radar/Covid19Radar/Views/EndOfService/EndOfServicePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
xmlns:prism="http://prismlibrary.com"
xmlns:resources="clr-namespace:Covid19Radar.Resources;assembly=Covid19Radar"
Title="{x:Static resources:AppResources.EndOfServicePageTitle}"
NavigationPage.HasNavigationBar="False"
ios:Page.UseSafeArea="true"
prism:ViewModelLocator.AutowireViewModel="True"
Style="{StaticResource DefaultPageStyle}"
Expand Down Expand Up @@ -49,6 +50,18 @@
<TapGestureRecognizer Command="{Binding Path=CheckDetailsCommand}" />
</Label.GestureRecognizers>
</Label>
<Label
Margin="0, 10, 0, 0"
AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{Binding AboutAppLinkReadText}"
Style="{StaticResource LinkLabelStyleMedium}"
HorizontalOptions="Center"
HorizontalTextAlignment="Center"
Text="{x:Static resources:AppResources.EndOfServicePageAboutAppTextLink}">
<Label.GestureRecognizers>
<TapGestureRecognizer Command="{Binding Path=AboutAppCommand}" />
</Label.GestureRecognizers>
</Label>
</StackLayout>
</ScrollView>
</ContentView>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public async Task NavigateNextAsyncTest_EndOfServicePage()
await unitUnderTest.NavigateNextAsync();

mockUserDataRepository.Verify(x => x.IsAllAgreed(), Times.Once());
mockNavigatoinService.Verify(x => x.NavigateAsync("/EndOfServicePage", It.IsAny<INavigationParameters>()), Times.Once());
mockNavigatoinService.Verify(x => x.NavigateAsync("/NavigationPage/EndOfServicePage", It.IsAny<INavigationParameters>()), Times.Once());
}

[Fact]
Expand Down