- add: Log
This commit is contained in:
@@ -98,8 +98,7 @@
|
||||
<Border Background="#111" Opacity="50" />
|
||||
<Border
|
||||
CornerRadius="10"
|
||||
Height="320"
|
||||
Width="520">
|
||||
Margin="40">
|
||||
<Grid RowDefinitions="35,*,20">
|
||||
<Border
|
||||
BorderThickness="0,0,0,2"
|
||||
|
||||
@@ -24,12 +24,11 @@
|
||||
<Label HorizontalAlignment="Center">Profiles:</Label>
|
||||
</Border>
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
||||
<ListBox
|
||||
<ItemsControl
|
||||
Background="#00000000"
|
||||
Classes="AccountSelector"
|
||||
ItemsSource="{Binding Accounts}"
|
||||
Padding="0">
|
||||
<ListBox.ItemTemplate>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type viewModels:AuthLoginPasswordModel}">
|
||||
<Border
|
||||
CornerRadius="0,10,0,10"
|
||||
@@ -64,8 +63,8 @@
|
||||
</Panel>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
|
||||
<Grid ColumnDefinitions="*" RowDefinitions="*,40">
|
||||
<ScrollViewer Margin="0,0,0,10" Padding="0,0,8,0">
|
||||
<ListBox
|
||||
<ItemsControl
|
||||
Background="#00000000"
|
||||
ItemsSource="{Binding ServerInfos}"
|
||||
Padding="0">
|
||||
<ListBox.ItemTemplate>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type viewModels:ServerEntryModelView}">
|
||||
<Grid
|
||||
ColumnDefinitions="*,120"
|
||||
@@ -153,8 +153,8 @@
|
||||
</Panel>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
|
||||
<Border
|
||||
|
||||
39
Nebula.Launcher/Views/Popup/LogPopupView.axaml
Normal file
39
Nebula.Launcher/Views/Popup/LogPopupView.axaml
Normal file
@@ -0,0 +1,39 @@
|
||||
<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:viewModels="clr-namespace:Nebula.Launcher.ViewModels"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="Nebula.Launcher.Views.Popup.LogPopupView"
|
||||
x:DataType="viewModels:LogPopupModelView">
|
||||
<Design.DataContext>
|
||||
<viewModels:LogPopupModelView />
|
||||
</Design.DataContext>
|
||||
|
||||
<ScrollViewer Margin="10" Padding="0,0,8,0">
|
||||
<ItemsControl
|
||||
Background="#00000000"
|
||||
ItemsSource="{Binding Logs}"
|
||||
Padding="0">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type viewModels:LogInfo}">
|
||||
<Border CornerRadius="5" Margin="0,0,0,5">
|
||||
<StackPanel Orientation="Horizontal" Spacing="5" Margin="0">
|
||||
<Border MinWidth="100"
|
||||
Background="{Binding CategoryColor}"
|
||||
CornerRadius="5,0,0,5"
|
||||
Padding="10,0,12,0" BorderThickness="2,0,2,0">
|
||||
<Label FontSize="15" VerticalAlignment="Center">
|
||||
<TextBlock Text="{Binding Category }"></TextBlock>
|
||||
</Label>
|
||||
</Border>
|
||||
<Label FontSize="12" VerticalAlignment="Center">
|
||||
<TextBlock Text="{Binding Message }"></TextBlock>
|
||||
</Label>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
19
Nebula.Launcher/Views/Popup/LogPopupView.axaml.cs
Normal file
19
Nebula.Launcher/Views/Popup/LogPopupView.axaml.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Nebula.Launcher.ViewModels;
|
||||
|
||||
namespace Nebula.Launcher.Views.Popup;
|
||||
|
||||
public partial class LogPopupView : UserControl
|
||||
{
|
||||
public LogPopupView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public LogPopupView(LogPopupModelView viewModel) : this()
|
||||
{
|
||||
DataContext = viewModel;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user