Add privacy policy for wino accounts when registering.
This commit is contained in:
@@ -261,6 +261,31 @@
|
||||
PasswordChanged="InputChanged" />
|
||||
</StackPanel>
|
||||
|
||||
<Border
|
||||
Padding="14"
|
||||
Background="{ThemeResource CardBackgroundFillColorSecondaryBrush}"
|
||||
CornerRadius="12">
|
||||
<StackPanel Spacing="10">
|
||||
<TextBlock
|
||||
Style="{StaticResource BodyStrongTextBlockStyle}"
|
||||
Text="{x:Bind domain:Translator.WinoAccount_RegisterDialog_PrivacyTitle}" />
|
||||
<TextBlock
|
||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
Text="{x:Bind domain:Translator.WinoAccount_RegisterDialog_PrivacyDescription}"
|
||||
TextWrapping="WrapWholeWords" />
|
||||
<HyperlinkButton
|
||||
HorizontalAlignment="Left"
|
||||
Click="PrivacyPolicyLink_Click"
|
||||
Content="{x:Bind domain:Translator.WinoAccount_RegisterDialog_PrivacyLinkText}" />
|
||||
<CheckBox
|
||||
x:Name="PrivacyPolicyCheckBox"
|
||||
Checked="InputChanged"
|
||||
Unchecked="InputChanged"
|
||||
Content="{x:Bind domain:Translator.WinoAccount_RegisterDialog_PrivacyCheckbox}" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<ProgressRing
|
||||
x:Name="BusyRing"
|
||||
Width="20"
|
||||
|
||||
@@ -12,6 +12,7 @@ namespace Wino.Dialogs;
|
||||
|
||||
public sealed partial class WinoAccountRegistrationDialog : ContentDialog
|
||||
{
|
||||
private const string PrivacyPolicyUrl = "https://www.winomail.app/accounts_policy.html";
|
||||
private readonly IWinoAccountProfileService _profileService;
|
||||
|
||||
public WinoAccountRegistrationDialog(IWinoAccountProfileService profileService)
|
||||
@@ -93,6 +94,11 @@ public sealed partial class WinoAccountRegistrationDialog : ContentDialog
|
||||
return Translator.WinoAccount_Validation_PasswordMismatch;
|
||||
}
|
||||
|
||||
if (PrivacyPolicyCheckBox.IsChecked != true)
|
||||
{
|
||||
return Translator.WinoAccount_Validation_PrivacyConsentRequired;
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
@@ -123,6 +129,11 @@ public sealed partial class WinoAccountRegistrationDialog : ContentDialog
|
||||
}
|
||||
}
|
||||
|
||||
private async void PrivacyPolicyLink_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
await Launcher.LaunchUriAsync(new Uri(PrivacyPolicyUrl));
|
||||
}
|
||||
|
||||
private void InputChanged(TextBox sender, TextBoxTextChangingEventArgs args) => HideError();
|
||||
|
||||
private void InputChanged(object sender, RoutedEventArgs e) => HideError();
|
||||
|
||||
Reference in New Issue
Block a user