-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAccountDialog.axaml
More file actions
179 lines (161 loc) · 12.5 KB
/
AccountDialog.axaml
File metadata and controls
179 lines (161 loc) · 12.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:i="https://github.com/projektanker/icons.avalonia"
xmlns:loc="clr-namespace:JustLauncher.Resources"
mc:Ignorable="d" d:DesignWidth="600" d:DesignHeight="550"
x:Class="JustLauncher.AccountDialog"
Width="600">
<Border Background="{DynamicResource ContentBackground}"
CornerRadius="24"
BorderBrush="{DynamicResource BorderBrush}"
BorderThickness="1"
BoxShadow="0 12 32 0 #50000000"
Margin="20">
<Grid Margin="32" RowDefinitions="Auto,*,Auto">
<!-- Header -->
<Grid Grid.Row="0" Margin="0,0,0,32" RowDefinitions="Auto,Auto">
<StackPanel Grid.Row="0" Spacing="8" HorizontalAlignment="Center">
<TextBlock x:Name="DialogTitle" Text="{loc:Localize Key=AccountDialog_Title}" Classes="PageHeader"/>
<TextBlock x:Name="DialogSubtitle" Text="{loc:Localize Key=AccountDialog_Subtitle}" Classes="PageDescription"/>
</StackPanel>
<Button x:Name="CloseButton" Grid.Row="0" HorizontalAlignment="Right" VerticalAlignment="Top" Classes="Secondary" Padding="8" CornerRadius="20">
<i:Icon Value="fa-solid fa-times" FontSize="18"/>
</Button>
</Grid>
<!-- Steps Container -->
<Grid Grid.Row="1">
<!-- Step 1: Provider Selection -->
<StackPanel x:Name="Step1Container" Spacing="24">
<TextBlock Text="{loc:Localize Key=AccountDialog_Step1}" Classes="PageDescription" FontSize="11" FontWeight="Bold" LetterSpacing="1"/>
<ListBox x:Name="AuthTypeListBox" Background="Transparent" BorderThickness="0" Padding="0">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="2" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.Styles>
<Style Selector="ListBoxItem">
<Setter Property="Padding" Value="8"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Template">
<ControlTemplate>
<Border x:Name="SelectionBorder"
BorderThickness="2"
BorderBrush="Transparent"
CornerRadius="24"
Padding="{TemplateBinding Padding}"
Background="Transparent">
<ContentPresenter Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"/>
</Border>
</ControlTemplate>
</Setter>
</Style>
<Style Selector="ListBoxItem:pointerover /template/ Border#SelectionBorder">
<Setter Property="Background" Value="{DynamicResource HoverBackground}"/>
<Setter Property="Opacity" Value="0.5"/>
</Style>
<Style Selector="ListBoxItem:selected /template/ Border#SelectionBorder">
<Setter Property="BorderBrush" Value="{DynamicResource AccentBrush}"/>
<Setter Property="Background" Value="{DynamicResource HoverBackground}"/>
<Setter Property="Opacity" Value="1"/>
</Style>
</ListBox.Styles>
<!-- Offline Card -->
<ListBoxItem Tag="Offline">
<Border Classes="Card" Padding="20" Height="140">
<Grid RowDefinitions="*,Auto,Auto">
<i:Icon Value="fa-solid fa-user-slash" FontSize="32" Foreground="{DynamicResource SuccessBrush}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
<TextBlock Grid.Row="1" Text="{loc:Localize Key=AccountDialog_OfflineAccount}" FontSize="16" FontWeight="Bold" Margin="0,12,0,4"/>
<TextBlock Grid.Row="2" Text="{loc:Localize Key=AccountDialog_OfflineDesc}" FontSize="11" Foreground="{DynamicResource SecondaryText}" TextWrapping="Wrap" Opacity="0.7"/>
</Grid>
</Border>
</ListBoxItem>
<!-- Ely.by Card -->
<ListBoxItem Tag="ElyBy">
<Border Classes="Card" Padding="20" Height="140">
<Grid RowDefinitions="*,Auto,Auto">
<i:Icon Value="fa-solid fa-globe" FontSize="32" Foreground="{DynamicResource AccentBrush}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
<TextBlock Grid.Row="1" Text="{loc:Localize Key=AccountDialog_ElyByAccount}" FontSize="16" FontWeight="Bold" Margin="0,12,0,4"/>
<TextBlock Grid.Row="2" Text="{loc:Localize Key=AccountDialog_ElyByDesc}" FontSize="11" Foreground="{DynamicResource SecondaryText}" TextWrapping="Wrap" Opacity="0.7"/>
</Grid>
</Border>
</ListBoxItem>
<!-- Microsoft Card -->
<ListBoxItem Tag="Microsoft">
<Border Classes="Card" Padding="20" Height="140">
<Grid RowDefinitions="*,Auto,Auto">
<i:Icon Value="fa-brands fa-microsoft" FontSize="32" Foreground="{DynamicResource AccentBrush}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
<TextBlock Grid.Row="1" Text="{loc:Localize Key=AccountDialog_Microsoft}" FontSize="16" FontWeight="Bold" Margin="0,12,0,4"/>
<TextBlock Grid.Row="2" Text="{loc:Localize Key=AccountDialog_MicrosoftDesc}" FontSize="10" Foreground="{DynamicResource SecondaryText}" TextWrapping="Wrap"/>
</Grid>
</Border>
</ListBoxItem>
</ListBox>
</StackPanel>
<!-- Step 2: Credential Entry (Offline/ElyBy) -->
<StackPanel x:Name="Step2Container" Spacing="24" IsVisible="False">
<TextBlock Text="{loc:Localize Key=AccountDialog_Step2}" Classes="PageDescription" FontSize="11" FontWeight="Bold" LetterSpacing="1"/>
<!-- Form Area -->
<StackPanel Spacing="24">
<StackPanel Spacing="10">
<TextBlock x:Name="FieldLabel" Text="{loc:Localize Key=AccountDialog_Username}" Classes="FieldLabel"/>
<TextBox x:Name="UsernameTextBox" Watermark="{loc:Localize Key=Account_PlayerNamePlaceholder}" Padding="14"/>
</StackPanel>
<StackPanel x:Name="PasswordContainer" Spacing="10" IsVisible="False">
<TextBlock Text="{loc:Localize Key=AccountDialog_Password}" Classes="FieldLabel"/>
<TextBox x:Name="PasswordTextBox" PasswordChar="*" Watermark="{loc:Localize Key=Account_PasswordPlaceholder}" Padding="14"/>
</StackPanel>
<Border Background="{DynamicResource WindowBackground}" CornerRadius="16" Padding="20" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1">
<StackPanel Spacing="8">
<StackPanel Orientation="Horizontal" Spacing="10">
<i:Icon x:Name="Step2Icon" Value="fa-solid fa-info-circle" Foreground="{DynamicResource SuccessBrush}"/>
<TextBlock x:Name="Step2InfoTitle" Text="{loc:Localize Key=AccountDialog_OfflineAccount}" FontSize="14" FontWeight="Bold" Foreground="{DynamicResource SuccessBrush}"/>
</StackPanel>
<TextBlock x:Name="Step2InfoBody" Text="{loc:Localize Key=AccountDialog_OfflineInfo}" FontSize="12" Foreground="{DynamicResource SecondaryText}" TextWrapping="Wrap" Opacity="0.8"/>
</StackPanel>
</Border>
</StackPanel>
</StackPanel>
<!-- Step 3: Microsoft Browser Login -->
<StackPanel x:Name="Step3Container" Spacing="24" IsVisible="False">
<TextBlock Text="MICROSOFT AUTHENTICATION" Classes="PageDescription" FontSize="11" FontWeight="Bold" LetterSpacing="1"/>
<StackPanel Spacing="20">
<TextBlock Text="Please follow these steps to log in:" FontSize="14" FontWeight="Bold"/>
<Border Background="{DynamicResource WindowBackground}" CornerRadius="12" Padding="15" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1">
<StackPanel Spacing="15">
<StackPanel Spacing="5">
<TextBlock Text="1. VISIT THE LOGIN PAGE" FontSize="10" Foreground="{DynamicResource SecondaryText}" FontWeight="Bold"/>
<TextBlock x:Name="LoginUrlText" Text="https://microsoft.com/link" FontSize="14" Foreground="{DynamicResource AccentBrush}" FontWeight="Bold"/>
</StackPanel>
<Separator Background="{DynamicResource BorderBrush}"/>
<StackPanel Spacing="5">
<TextBlock Text="2. ENTER THIS CODE" FontSize="10" Foreground="{DynamicResource SecondaryText}" FontWeight="Bold"/>
<Grid ColumnDefinitions="*,Auto">
<TextBlock x:Name="UserCodeText" Text="XXXX-XXXX" FontSize="28" FontWeight="Black" LetterSpacing="2" VerticalAlignment="Center"/>
<Button x:Name="CopyCodeButton" Grid.Column="1" Classes="Secondary" Content="Copy Code" Padding="10,5"/>
</Grid>
</StackPanel>
</StackPanel>
</Border>
<StackPanel Orientation="Horizontal" Spacing="10" HorizontalAlignment="Center">
<ProgressBar IsIndeterminate="True" Width="20" Height="20" Theme="{StaticResource {x:Type ProgressBar}}"/>
<TextBlock Text="Waiting for your login in the browser..." VerticalAlignment="Center" Opacity="0.7" FontSize="12"/>
</StackPanel>
</StackPanel>
</StackPanel>
</Grid>
<!-- Footer -->
<Grid Grid.Row="2" ColumnDefinitions="Auto,*,Auto" Margin="0,32,0,0">
<Button x:Name="BackButton" Content="{loc:Localize Key=AccountDialog_Back}" Classes="Secondary" MinWidth="100" IsVisible="False"/>
<StackPanel Grid.Column="2" Orientation="Horizontal" Spacing="12">
<Button x:Name="CancelButton" Content="{loc:Localize Key=AccountDialog_Cancel}" Classes="Secondary" MinWidth="100"/>
<Button x:Name="NextButton" Content="{loc:Localize Key=AccountDialog_Next}" Classes="Primary" MinWidth="140"/>
<Button x:Name="SaveButton" Content="{loc:Localize Key=AccountDialog_LoginSave}" Classes="Primary" MinWidth="160" IsVisible="False"/>
</StackPanel>
</Grid>
</Grid>
</Border>
</UserControl>