2024-02-13 02:59:40 +01:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
|
<Page
|
2024-02-14 02:07:22 +01:00
|
|
|
x:Class="VDownload.Core.Views.Authentication.AuthenticationView"
|
2024-02-13 02:59:40 +01:00
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
2024-02-14 02:07:22 +01:00
|
|
|
xmlns:local="using:VDownload.Core.Views.Authentication"
|
2024-02-13 02:59:40 +01:00
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
|
xmlns:ctuc="using:CommunityToolkit.WinUI.UI.Controls"
|
|
|
|
|
xmlns:ctc="using:CommunityToolkit.WinUI.Controls"
|
|
|
|
|
xmlns:ct="using:CommunityToolkit.WinUI"
|
|
|
|
|
xmlns:i="using:Microsoft.Xaml.Interactivity"
|
|
|
|
|
xmlns:ic="using:Microsoft.Xaml.Interactions.Core"
|
|
|
|
|
mc:Ignorable="d"
|
|
|
|
|
Background="{ThemeResource ViewBackgroundColor}">
|
|
|
|
|
<i:Interaction.Behaviors>
|
|
|
|
|
<ic:EventTriggerBehavior EventName="Loaded">
|
|
|
|
|
<ic:InvokeCommandAction Command="{Binding NavigationCommand}"/>
|
|
|
|
|
</ic:EventTriggerBehavior>
|
|
|
|
|
</i:Interaction.Behaviors>
|
2024-02-14 02:07:22 +01:00
|
|
|
<Grid Padding="20"
|
|
|
|
|
RowSpacing="20">
|
2024-02-13 02:59:40 +01:00
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
|
<RowDefinition/>
|
|
|
|
|
</Grid.RowDefinitions>
|
2024-02-14 02:07:22 +01:00
|
|
|
<TextBlock x:Uid="/VDownload.Core.Strings/AuthenticationViewResources/Header"
|
|
|
|
|
Grid.Row="0"
|
2024-02-13 02:59:40 +01:00
|
|
|
FontSize="28"
|
2024-02-14 02:07:22 +01:00
|
|
|
FontWeight="SemiBold"/>
|
2024-02-13 02:59:40 +01:00
|
|
|
<StackPanel Grid.Row="1"
|
|
|
|
|
Spacing="10">
|
|
|
|
|
<ctc:SettingsCard Header="Twitch">
|
|
|
|
|
<i:Interaction.Behaviors>
|
2024-02-14 02:07:22 +01:00
|
|
|
<ic:DataTriggerBehavior Binding="{Binding TwitchButtonState, Converter={StaticResource ObjectToStringConverter}}"
|
2024-03-10 00:35:11 +01:00
|
|
|
ComparisonCondition="NotEqual"
|
|
|
|
|
Value="Loading">
|
2024-02-13 02:59:40 +01:00
|
|
|
<ic:ChangePropertyAction PropertyName="Description"
|
2024-03-10 00:35:11 +01:00
|
|
|
Value="{Binding TwitchDescription}"/>
|
2024-02-13 02:59:40 +01:00
|
|
|
<ic:ChangePropertyAction PropertyName="Content">
|
|
|
|
|
<ic:ChangePropertyAction.Value>
|
2024-03-10 00:35:11 +01:00
|
|
|
<Button Command="{Binding TwitchAuthenticationCommand}"
|
|
|
|
|
IsEnabled="{Binding TwitchButtonEnable}">
|
|
|
|
|
<Button.Content>
|
|
|
|
|
<ctuc:SwitchPresenter Value="{Binding TwitchButtonState, Converter={StaticResource ObjectToStringConverter}}">
|
|
|
|
|
<ctuc:Case Value="SignIn">
|
|
|
|
|
<TextBlock x:Uid="/VDownload.Core.Strings/AuthenticationViewResources/AuthenticationButtonSignIn"/>
|
|
|
|
|
</ctuc:Case>
|
|
|
|
|
<ctuc:Case Value="SignOut">
|
|
|
|
|
<TextBlock x:Uid="/VDownload.Core.Strings/AuthenticationViewResources/AuthenticationButtonSignOut"/>
|
|
|
|
|
</ctuc:Case>
|
|
|
|
|
</ctuc:SwitchPresenter>
|
|
|
|
|
</Button.Content>
|
2024-02-13 02:59:40 +01:00
|
|
|
</Button>
|
|
|
|
|
</ic:ChangePropertyAction.Value>
|
|
|
|
|
</ic:ChangePropertyAction>
|
|
|
|
|
</ic:DataTriggerBehavior>
|
2024-02-14 02:07:22 +01:00
|
|
|
<ic:DataTriggerBehavior Binding="{Binding TwitchButtonState, Converter={StaticResource ObjectToStringConverter}}"
|
2024-02-13 02:59:40 +01:00
|
|
|
ComparisonCondition="Equal"
|
|
|
|
|
Value="Loading">
|
2024-02-14 02:07:22 +01:00
|
|
|
<ic:ChangePropertyAction x:Uid="/VDownload.Core.Strings/AuthenticationViewResources/AuthenticationDescriptionLoading"
|
|
|
|
|
PropertyName="Description"/>
|
2024-02-13 02:59:40 +01:00
|
|
|
<ic:ChangePropertyAction PropertyName="Content">
|
|
|
|
|
<ic:ChangePropertyAction.Value>
|
|
|
|
|
<ProgressRing Width="20"
|
|
|
|
|
Height="20"/>
|
|
|
|
|
</ic:ChangePropertyAction.Value>
|
|
|
|
|
</ic:ChangePropertyAction>
|
|
|
|
|
</ic:DataTriggerBehavior>
|
|
|
|
|
</i:Interaction.Behaviors>
|
|
|
|
|
<ctc:SettingsCard.HeaderIcon>
|
|
|
|
|
<BitmapIcon ShowAsMonochrome="False"
|
|
|
|
|
UriSource="{StaticResource ImageSourcesTwitch}"/>
|
|
|
|
|
</ctc:SettingsCard.HeaderIcon>
|
|
|
|
|
</ctc:SettingsCard>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Page>
|