new_version_init
This commit is contained in:
80
VDownload.GUI/VDownload.GUI.Views/AuthenticationView.xaml
Normal file
80
VDownload.GUI/VDownload.GUI.Views/AuthenticationView.xaml
Normal file
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Page
|
||||
x:Class="VDownload.GUI.Views.AuthenticationView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:VDownload.GUI.Views"
|
||||
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>
|
||||
<Grid Padding="20" RowSpacing="20">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Row="0"
|
||||
FontSize="28"
|
||||
FontWeight="SemiBold"
|
||||
Text="Authentication"/>
|
||||
<StackPanel Grid.Row="1"
|
||||
Spacing="10">
|
||||
<ctc:SettingsCard Header="Twitch">
|
||||
<i:Interaction.Behaviors>
|
||||
<ic:DataTriggerBehavior Binding="{Binding TwitchButtonState, Converter={StaticResource EnumToStringConverter}}"
|
||||
ComparisonCondition="NotEqual"
|
||||
Value="Loading">
|
||||
<ic:ChangePropertyAction PropertyName="Description"
|
||||
Value="{Binding TwitchDescription}"/>
|
||||
<ic:ChangePropertyAction PropertyName="Content">
|
||||
<ic:ChangePropertyAction.Value>
|
||||
<Button Command="{Binding TwitchAuthenticationCommand}">
|
||||
<i:Interaction.Behaviors>
|
||||
<ic:DataTriggerBehavior Binding="{Binding TwitchButtonState, Converter={StaticResource EnumToStringConverter}}"
|
||||
ComparisonCondition="Equal"
|
||||
Value="SignIn">
|
||||
<ic:ChangePropertyAction PropertyName="Content"
|
||||
Value="Sign in"/>
|
||||
</ic:DataTriggerBehavior>
|
||||
<ic:DataTriggerBehavior Binding="{Binding TwitchButtonState, Converter={StaticResource EnumToStringConverter}}"
|
||||
ComparisonCondition="Equal"
|
||||
Value="SignOut">
|
||||
<ic:ChangePropertyAction PropertyName="Content"
|
||||
Value="Sign out"/>
|
||||
</ic:DataTriggerBehavior>
|
||||
</i:Interaction.Behaviors>
|
||||
</Button>
|
||||
</ic:ChangePropertyAction.Value>
|
||||
</ic:ChangePropertyAction>
|
||||
</ic:DataTriggerBehavior>
|
||||
<ic:DataTriggerBehavior Binding="{Binding TwitchButtonState, Converter={StaticResource EnumToStringConverter}}"
|
||||
ComparisonCondition="Equal"
|
||||
Value="Loading">
|
||||
<ic:ChangePropertyAction PropertyName="Description"
|
||||
Value="Loading..."/>
|
||||
<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>
|
||||
Reference in New Issue
Block a user