Files
NebulaLauncher/Nebula.Launcher/Views/MainView.axaml

152 lines
6.9 KiB
Plaintext
Raw Normal View History

2024-12-21 13:11:30 +03:00
<UserControl
2025-01-20 16:35:48 +03:00
Background="{StaticResource DefaultBackground}"
2024-12-21 13:11:30 +03:00
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d"
x:Class="Nebula.Launcher.Views.MainView"
x:DataType="viewModels:MainViewModel"
xmlns="https://github.com/avaloniaui"
xmlns:converters="clr-namespace:Nebula.Launcher.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
2025-01-05 17:05:23 +03:00
xmlns:models="clr-namespace:Nebula.Shared.Models;assembly=Nebula.Shared"
2024-12-21 13:11:30 +03:00
xmlns:viewModels="clr-namespace:Nebula.Launcher.ViewModels"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
2024-12-21 15:15:04 +03:00
<Design.DataContext>
<viewModels:MainViewModel />
</Design.DataContext>
2024-12-26 18:54:37 +03:00
<Panel>
<Grid
ColumnDefinitions="65,*"
IsEnabled="{Binding IsEnabled}"
Margin="0"
2024-12-27 19:15:33 +03:00
RowDefinitions="*,30">
2024-12-26 18:54:37 +03:00
<TransitioningContentControl
Content="{Binding CurrentPage}"
Grid.Column="1"
Grid.Row="0" />
<SplitView
CompactPaneLength="65"
DisplayMode="CompactInline"
Grid.Column="0"
Grid.ColumnSpan="2"
Grid.Row="0"
IsPaneOpen="{Binding IsPaneOpen}"
PaneBackground="#00000000">
<SplitView.Pane>
<Border
2025-01-22 21:06:05 +03:00
Background="{StaticResource DefaultForeground}"
2024-12-26 18:54:37 +03:00
BorderThickness="0,0,2,0"
2025-01-22 21:06:05 +03:00
CornerRadius="0,8,8,0"
2024-12-26 18:54:37 +03:00
Grid.Column="0"
Grid.Row="0"
Margin="0,0,5,0"
Padding="0">
<Grid ColumnDefinitions="*" RowDefinitions="*,40">
<ListBox
Background="#00000000"
ItemsSource="{Binding Items}"
Padding="0"
SelectedItem="{Binding SelectedListItem}">
<ListBox.ItemTemplate>
<DataTemplate DataType="{x:Type models:ListItemTemplate}">
<StackPanel Orientation="Horizontal" Spacing="17">
2025-01-20 16:35:48 +03:00
<Svg
Height="40"
Path="{Binding IconKey, Converter={x:Static converters:TypeConverters.IconConverter}}"
Width="40" />
2024-12-26 18:54:37 +03:00
<TextBlock Text="{Binding Label}" VerticalAlignment="Center" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Button
Classes="ViewSelectButton"
Command="{Binding TriggerPaneCommand}"
Grid.Row="1"
2025-01-15 19:47:27 +03:00
HorizontalAlignment="Stretch"
Padding="5,0,5,0"
2024-12-26 18:54:37 +03:00
VerticalAlignment="Stretch">
<Label HorizontalAlignment="Center" VerticalAlignment="Center">|||</Label>
</Button>
</Grid>
</Border>
</SplitView.Pane>
</SplitView>
<Border
BorderThickness="0,2,0,0"
CornerRadius="0,0,0,0"
2025-01-22 21:06:05 +03:00
Background="{StaticResource DefaultForeground}"
2024-12-26 18:54:37 +03:00
Grid.Column="0"
Grid.ColumnSpan="2"
Grid.Row="1"
Margin="0,0,0,0"
Padding="5">
2024-12-27 19:15:33 +03:00
<Label FontSize="10" Foreground="#777777">
<Panel>
2025-01-20 16:35:48 +03:00
<Button
Background="#00000000"
Command="{Binding OpenLink}"
CornerRadius="0"
HorizontalAlignment="Left"
Margin="0"
Padding="0"
VerticalAlignment="Center">
2025-01-22 21:06:05 +03:00
<TextBlock Foreground="#777777" HorizontalAlignment="Left" VerticalAlignment="Center">https://cinka.ru/nebula-launcher/</TextBlock>
2024-12-28 08:29:01 +03:00
</Button>
<TextBlock HorizontalAlignment="Right" VerticalAlignment="Center">prototype-product-v0.01</TextBlock>
2024-12-27 19:15:33 +03:00
</Panel>
</Label>
2024-12-26 18:54:37 +03:00
</Border>
</Grid>
<Panel IsVisible="{Binding Popup}">
<Border Background="#111" Opacity="50" />
2025-01-21 20:44:36 +03:00
<Border CornerRadius="10" Margin="40" Background="{StaticResource DefaultBackground}">
2024-12-27 08:22:17 +03:00
<Grid RowDefinitions="35,*,20">
<Border
BorderThickness="0,0,0,2"
CornerRadius="10,10,0,0"
Grid.Row="0">
<Panel Margin="12,0,0,0" VerticalAlignment="Center">
<StackPanel HorizontalAlignment="Left" VerticalAlignment="Center">
2024-12-27 19:15:33 +03:00
<Label Content="{Binding CurrentTitle}" VerticalAlignment="Center" />
2024-12-27 08:22:17 +03:00
</StackPanel>
<Button
2024-12-27 19:15:33 +03:00
Command="{Binding ClosePopupCommand}"
2024-12-27 08:22:17 +03:00
Content="X"
CornerRadius="0,10,0,0"
HorizontalAlignment="Right"
2025-01-20 16:35:48 +03:00
IsVisible="{Binding IsPopupClosable}"
2024-12-27 19:15:33 +03:00
Margin="0"
2024-12-27 08:22:17 +03:00
Padding="10,8,10,8"
2024-12-27 19:15:33 +03:00
VerticalAlignment="Stretch" />
2024-12-27 08:22:17 +03:00
</Panel>
</Border>
<TransitioningContentControl Content="{Binding CurrentPopup}" Grid.Row="1" />
<Border
BorderThickness="0,2,0,2"
CornerRadius="0,0,10,10"
Grid.Row="2">
<Panel Margin="12,0,12,0" VerticalAlignment="Center">
<StackPanel HorizontalAlignment="Left" VerticalAlignment="Center">
<Label
FontSize="8"
Foreground="#666666"
VerticalAlignment="Center">
Дальше бога нет...
</Label>
</StackPanel>
</Panel>
</Border>
</Grid>
2024-12-26 18:54:37 +03:00
</Border>
</Panel>
</Panel>
2025-01-14 22:10:16 +03:00
</UserControl>