Files

225 lines
12 KiB
Plaintext
Raw Permalink Normal View History

2024-12-21 13:11:30 +03:00
<UserControl
d:DesignHeight="450"
2025-07-15 18:38:53 +03:00
d:DesignWidth="1000"
2024-12-21 13:11:30 +03:00
mc:Ignorable="d"
2024-12-21 15:15:04 +03:00
x:Class="Nebula.Launcher.Views.Pages.AccountInfoView"
2025-01-14 22:10:16 +03:00
x:DataType="pages:AccountInfoViewModel"
2024-12-21 13:11:30 +03:00
xmlns="https://github.com/avaloniaui"
2025-06-23 16:39:30 +03:00
xmlns:customControls="clr-namespace:Nebula.Launcher.Controls"
2024-12-21 13:11:30 +03:00
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
2025-01-23 20:43:52 +03:00
xmlns:pages="clr-namespace:Nebula.Launcher.ViewModels.Pages"
2025-07-02 21:32:51 +03:00
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
2025-08-06 21:29:00 +03:00
xmlns:auth="clr-namespace:Nebula.Launcher.Models.Auth"
xmlns:converters="clr-namespace:Nebula.Launcher.Converters">
2024-12-22 21:38:19 +03:00
<Design.DataContext>
2025-01-14 22:10:16 +03:00
<pages:AccountInfoViewModel />
2024-12-22 21:38:19 +03:00
</Design.DataContext>
2024-12-27 19:15:33 +03:00
<Grid
2025-03-12 14:51:47 +03:00
ColumnDefinitions="3*,2*"
2024-12-27 19:15:33 +03:00
Margin="15"
RowDefinitions="*">
2024-12-21 13:11:30 +03:00
<StackPanel Grid.Column="1" Grid.Row="0">
<Border
2025-01-28 19:59:35 +03:00
BoxShadow="0 -1 15 -2 #121212"
2024-12-21 13:11:30 +03:00
CornerRadius="10,10,0,0"
Margin="5,5,5,0"
Padding="5">
2025-02-02 10:57:29 +03:00
<Border.Background>
<LinearGradientBrush EndPoint="50%,100%" StartPoint="50%,0%">
<GradientStop Color="#222222" Offset="0.0" />
<GradientStop Color="#292222" Offset="1.0" />
</LinearGradientBrush>
</Border.Background>
2025-06-23 16:39:30 +03:00
<customControls:LocalizedLabel HorizontalAlignment="Center" LocalId="account-profiles"/>
2024-12-21 13:11:30 +03:00
</Border>
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
2025-01-07 19:14:42 +03:00
<ItemsControl
2024-12-22 21:38:19 +03:00
Background="#00000000"
ItemsSource="{Binding Accounts}"
2024-12-27 19:15:33 +03:00
Padding="0">
2025-01-07 19:14:42 +03:00
<ItemsControl.ItemTemplate>
2025-11-08 13:42:11 +03:00
<DataTemplate DataType="{x:Type auth:ProfileEntry}">
2025-07-15 18:38:53 +03:00
<Grid ColumnDefinitions="4*,*">
<Border
BoxShadow="0 1 15 -2 #121212"
CornerRadius="0,10,0,10"
Margin="5,5,5,0">
<Border.Background>
<LinearGradientBrush EndPoint="100%,50%" StartPoint="20%,50%">
2025-08-06 21:29:00 +03:00
<GradientStop Color="{Binding Credentials.AuthServer,
Converter={x:Static converters:TypeConverters.NameColorRepresentation}}" Offset="0.0" />
2025-07-15 18:38:53 +03:00
<GradientStop Color="#222222" Offset="1.0" />
</LinearGradientBrush>
</Border.Background>
<Label>
<TextBlock Text="{Binding AuthName}" Margin="5"/>
</Label>
</Border>
<Border Grid.Column="0"
CornerRadius="0,10,0,10"
Margin="5,5,5,0">
<Border.Background>
<LinearGradientBrush EndPoint="100%,50%" StartPoint="20%,50%">
<GradientStop Color="#aa222222" Offset="0.0" />
<GradientStop Color="#222222" Offset="0.4" />
</LinearGradientBrush>
</Border.Background>
<Button
HorizontalAlignment="Stretch"
Command="{Binding OnSelect}">
2024-12-27 19:15:33 +03:00
<Label>
2025-07-15 18:38:53 +03:00
<TextBlock Text="{Binding Credentials.Login}" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,5,0"/>
2024-12-27 19:15:33 +03:00
</Label>
2025-07-15 18:38:53 +03:00
</Button>
</Border>
<Border
BoxShadow="0 1 15 -2 #121212"
CornerRadius="0,10,0,10"
Margin="0,5,5,0" Grid.Column="1" Padding="0">
<Border.Background>
<LinearGradientBrush EndPoint="100%,50%" StartPoint="20%,50%">
<GradientStop Color="#292222" Offset="1.0" />
<GradientStop Color="#222222" Offset="1.0" />
</LinearGradientBrush>
</Border.Background>
<Button Command="{Binding OnDelete}" CornerRadius="0,10,0,10" HorizontalAlignment="Stretch">
<Svg
Height="15"
Path="/Assets/svg/delete.svg"
Width="15" />
</Button>
</Border>
</Grid>
2024-12-22 21:38:19 +03:00
</DataTemplate>
2025-01-07 19:14:42 +03:00
</ItemsControl.ItemTemplate>
</ItemsControl>
2024-12-21 13:11:30 +03:00
</ScrollViewer>
</StackPanel>
2024-12-27 19:15:33 +03:00
<StackPanel
Grid.Column="0"
Grid.ColumnSpan="{Binding AuthViewSpan}"
Grid.Row="0">
<Border
2025-01-28 19:59:35 +03:00
BoxShadow="{StaticResource DefaultShadow}"
2024-12-27 19:15:33 +03:00
CornerRadius="10"
Margin="5"
Padding="15">
2025-02-02 10:57:29 +03:00
<Border.Background>
<LinearGradientBrush EndPoint="50%,100%" StartPoint="50%,0%">
<GradientStop Color="#292222" Offset="0.0" />
<GradientStop Color="#222222" Offset="1.0" />
</LinearGradientBrush>
</Border.Background>
2024-12-27 19:15:33 +03:00
<Panel>
<StackPanel IsVisible="{Binding !IsLogged}" Spacing="15">
2025-01-18 18:20:11 +03:00
<Svg
2024-12-27 19:15:33 +03:00
Height="100"
Margin="0,0,0,20"
2025-01-23 20:43:52 +03:00
Path="/Assets/svg/user.svg" />
2024-12-27 19:15:33 +03:00
<StackPanel HorizontalAlignment="Center">
2025-06-20 16:27:42 +03:00
<StackPanel IsVisible="{Binding DoRetryAuth}">
<Border Background="{StaticResource DefaultSelected}" BoxShadow="{StaticResource DefaultShadow}">
<Button
Command="{Binding DoCurrentAuth}"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Center">
2025-06-23 16:39:30 +03:00
<customControls:LocalizedLabel LocalId="account-auth-retry"/>
2025-06-20 16:27:42 +03:00
</Button>
</Border>
2025-06-23 16:39:30 +03:00
<customControls:LocalizedLabel HorizontalAlignment="Center" LocalId="account-auth-try-another"/>
2025-06-20 16:27:42 +03:00
</StackPanel>
2024-12-27 19:15:33 +03:00
<StackPanel Orientation="Horizontal">
2025-06-23 16:39:30 +03:00
<customControls:LocalizedLabel VerticalAlignment="Center" LocalId="account-auth-login"/>
2025-03-12 14:51:47 +03:00
<TextBox Text="{Binding CurrentLogin}" MinWidth="200" />
2024-12-27 19:15:33 +03:00
</StackPanel>
<StackPanel Orientation="Horizontal">
2025-06-23 16:39:30 +03:00
<customControls:LocalizedLabel HorizontalAlignment="Left" VerticalAlignment="Center" LocalId="account-auth-password"/>
2025-03-12 14:51:47 +03:00
<TextBox PasswordChar="#" MinWidth="200" Text="{Binding CurrentPassword}" />
2024-12-27 19:15:33 +03:00
</StackPanel>
<StackPanel Orientation="Horizontal">
2025-06-23 16:39:30 +03:00
<customControls:LocalizedLabel VerticalAlignment="Center" LocalId="account-auth-server"/>
2025-08-06 21:29:00 +03:00
<Button Command="{Binding OnExpandAuthUrl}" VerticalAlignment="Stretch">
2024-12-27 19:15:33 +03:00
<Label>+</Label>
</Button>
</StackPanel>
</StackPanel>
<Border
2025-01-28 19:59:35 +03:00
BoxShadow="{StaticResource DefaultShadow}"
2024-12-27 19:15:33 +03:00
CornerRadius="10"
IsVisible="{Binding AuthUrlConfigExpand}">
<ScrollViewer Height="80">
<ListBox
Background="#00000000"
ItemsSource="{Binding AuthUrls}"
Margin="5"
2024-12-30 22:23:55 +03:00
SelectedItem="{Binding AuthItemSelect}"
2025-03-12 14:51:47 +03:00
SelectionMode="Single">
2024-12-27 19:15:33 +03:00
<ListBox.ItemTemplate>
<DataTemplate>
<Label>
2025-05-03 18:20:24 +03:00
<TextBlock Text="{Binding Name}" />
2024-12-27 19:15:33 +03:00
</Label>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</ScrollViewer>
</Border>
2025-01-28 19:59:35 +03:00
<Border Background="{StaticResource DefaultSelected}" BoxShadow="{StaticResource DefaultShadow}">
2025-01-23 20:43:52 +03:00
<Button
Command="{Binding DoAuth}"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Center">
2025-06-23 16:39:30 +03:00
<customControls:LocalizedLabel LocalId="account-auth-button"/>
2025-01-23 20:43:52 +03:00
</Button>
</Border>
2025-08-06 21:29:00 +03:00
<Button Command="{Binding OnExpandAuthView}" HorizontalAlignment="Right">
2024-12-27 19:15:33 +03:00
<Label>
>
</Label>
</Button>
</StackPanel>
<StackPanel IsVisible="{Binding IsLogged}">
2025-01-18 18:20:11 +03:00
<Svg
2024-12-27 19:15:33 +03:00
Height="100"
Margin="0,0,0,20"
2025-01-23 20:43:52 +03:00
Path="/Assets/svg/user.svg" />
2024-12-27 19:15:33 +03:00
<Label>
<StackPanel Spacing="15">
2025-07-15 18:38:53 +03:00
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal" Spacing="5">
<customControls:LocalizedLabel LocalId="account-auth-hello"/>
2025-08-07 22:34:25 +03:00
<TextBlock Text="{Binding Credentials.Value.Login}" />
2025-07-15 18:38:53 +03:00
</StackPanel>
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal" Spacing="5">
<customControls:LocalizedLabel LocalId="account-auth-current-server"/>
<TextBlock Text="{Binding AuthServerName}" />
2025-07-15 18:38:53 +03:00
</StackPanel>
2024-12-27 19:15:33 +03:00
</StackPanel>
</Label>
<StackPanel
HorizontalAlignment="Center"
2025-01-18 18:20:11 +03:00
Margin="5,20,5,5"
2024-12-27 19:15:33 +03:00
Orientation="Horizontal"
Spacing="5">
2025-01-28 19:59:35 +03:00
<Border BoxShadow="{StaticResource DefaultShadow}">
2025-01-23 20:43:52 +03:00
<Button Command="{Binding Logout}">
2025-06-23 16:39:30 +03:00
<customControls:LocalizedLabel LocalId="account-auth-logout"/>
2025-01-23 20:43:52 +03:00
</Button>
</Border>
2025-11-08 13:42:11 +03:00
<Border BoxShadow="{StaticResource DefaultShadow}"
IsVisible="{Binding CurrentPassword,
Converter={x:Static converters:TypeConverters.StringIsNotEmpty}}">
2025-08-06 21:29:00 +03:00
<Button Command="{Binding OnSaveProfile}">
2025-06-23 16:39:30 +03:00
<customControls:LocalizedLabel LocalId="account-auth-save"/>
2025-01-23 20:43:52 +03:00
</Button>
</Border>
2024-12-27 19:15:33 +03:00
</StackPanel>
</StackPanel>
</Panel>
</Border>
</StackPanel>
2024-12-21 13:11:30 +03:00
</Grid>
2025-01-14 22:10:16 +03:00
</UserControl>