110 lines
5.5 KiB
XML
110 lines
5.5 KiB
XML
<UserControl
|
|
d:DesignHeight="450"
|
|
d:DesignWidth="800"
|
|
mc:Ignorable="d"
|
|
x:Class="Nebula.Launcher.Views.Pages.AccountInfoView"
|
|
x:DataType="viewModels:AccountInfoViewModel"
|
|
xmlns="https://github.com/avaloniaui"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:viewModels="clr-namespace:Nebula.Launcher.ViewModels" IsEnabled="{Binding PageEnabled}">
|
|
<Design.DataContext>
|
|
<viewModels:AccountInfoViewModel />
|
|
</Design.DataContext>
|
|
<Grid ColumnDefinitions="*,1.5*" RowDefinitions="*" Margin="15">
|
|
<StackPanel Grid.Column="0" Grid.Row="0">
|
|
<Border
|
|
CornerRadius="10"
|
|
Margin="5"
|
|
Padding="15">
|
|
<StackPanel HorizontalAlignment="Center" Spacing="15">
|
|
<Image
|
|
Height="100"
|
|
Margin="0,0,0,20"
|
|
Source="/Assets/account.png" />
|
|
<Grid ColumnDefinitions="100, 100" RowDefinitions="Auto, Auto, Auto, Auto" VerticalAlignment="Center">
|
|
<Label Grid.Column="0" Grid.Row="0" VerticalAlignment="Center">Login:</Label>
|
|
<TextBox
|
|
Grid.Column="1"
|
|
Grid.Row="0"
|
|
Text="{Binding CurrentLogin}"/>
|
|
<Label Grid.Column="0" Grid.Row="1" VerticalAlignment="Center">Password:</Label>
|
|
<TextBox
|
|
Grid.Column="1"
|
|
Grid.Row="1"
|
|
PasswordChar="#"
|
|
Text="{Binding CurrentPassword}" />
|
|
<Label Grid.Column="0" Grid.Row="2" VerticalAlignment="Center">Auth server:</Label>
|
|
<TextBox
|
|
Grid.Column="1"
|
|
Grid.Row="2"
|
|
Text="{Binding CurrentAuthServer}"/>
|
|
<ScrollViewer Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="2" Height="80">
|
|
<ListBox Margin="15" Background="#00000000" ItemsSource="{Binding AuthUrls}" SelectedItem="{Binding AuthItemSelect}">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Label><TextBlock Text="{Binding}"/></Label>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</ScrollViewer>
|
|
</Grid>
|
|
<StackPanel
|
|
HorizontalAlignment="Center"
|
|
Margin="5" Spacing="5"
|
|
Orientation="Horizontal">
|
|
<Button Command="{Binding OnSaveProfile}"><Label>Save profile</Label></Button>
|
|
<Button Command="{Binding DoAuth}"><Label>Auth</Label></Button>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Border>
|
|
</StackPanel>
|
|
|
|
<StackPanel Grid.Column="1" Grid.Row="0">
|
|
<Border
|
|
CornerRadius="10,10,0,0"
|
|
Margin="5,5,5,0"
|
|
Padding="5">
|
|
<Label HorizontalAlignment="Center">Profiles:</Label>
|
|
</Border>
|
|
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
|
<ListBox
|
|
Background="#00000000"
|
|
ItemsSource="{Binding Accounts}"
|
|
Padding="0" Classes="AccountSelector">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate DataType="{x:Type viewModels:AuthLoginPasswordModel}">
|
|
<Border Margin="5,5,5,0"
|
|
CornerRadius="0,10,0,10"
|
|
VerticalAlignment="Center">
|
|
<Panel>
|
|
<StackPanel Margin="10,5,5,5" Orientation="Horizontal">
|
|
<Label>Name:</Label>
|
|
<Label><TextBlock Text="{Binding Login}"/></Label>
|
|
</StackPanel>
|
|
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
|
|
<Button CornerRadius="0,0,0,10" Padding="5" Command="{Binding OnSelect}">
|
|
<Label>
|
|
Select
|
|
</Label>
|
|
</Button>
|
|
<Button
|
|
BorderThickness="2,0,0,0"
|
|
CornerRadius="0,10,0,0"
|
|
Padding="5" Command="{Binding OnDelete}">
|
|
<Label>
|
|
Delete
|
|
</Label>
|
|
</Button>
|
|
</StackPanel>
|
|
</Panel>
|
|
</Border>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</ScrollViewer>
|
|
</StackPanel>
|
|
</Grid>
|
|
</UserControl>
|