- add: Custom names of servers
This commit is contained in:
26
Nebula.Launcher/Views/Popup/EditServerNameView.axaml
Normal file
26
Nebula.Launcher/Views/Popup/EditServerNameView.axaml
Normal file
@@ -0,0 +1,26 @@
|
||||
<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:popup="clr-namespace:Nebula.Launcher.ViewModels.Popup"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="Nebula.Launcher.Views.Popup.EditServerNameView"
|
||||
x:DataType="popup:EditServerNameViewModel">
|
||||
<Design.DataContext>
|
||||
<popup:EditServerNameViewModel />
|
||||
</Design.DataContext>
|
||||
|
||||
<StackPanel Margin="15" Spacing="10">
|
||||
<Border BoxShadow="{StaticResource DefaultShadow}">
|
||||
<TextBlock Text="{Binding IpInput}" Margin="10,8,10,8"/>
|
||||
</Border>
|
||||
<Border BoxShadow="{StaticResource DefaultShadow}">
|
||||
<TextBox Text="{Binding NameInput}" Watermark="custom server name" />
|
||||
</Border>
|
||||
<Border Background="{StaticResource DefaultSelected}" BoxShadow="{StaticResource DefaultShadow}">
|
||||
<Button Command="{Binding OnEnter}" HorizontalAlignment="Stretch">
|
||||
<Label HorizontalAlignment="Center">Set name</Label>
|
||||
</Button>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
20
Nebula.Launcher/Views/Popup/EditServerNameView.axaml.cs
Normal file
20
Nebula.Launcher/Views/Popup/EditServerNameView.axaml.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Nebula.Launcher.ViewModels.Popup;
|
||||
|
||||
namespace Nebula.Launcher.Views.Popup;
|
||||
|
||||
public partial class EditServerNameView : UserControl
|
||||
{
|
||||
public EditServerNameView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public EditServerNameView(EditServerNameViewModel viewModel)
|
||||
: this()
|
||||
{
|
||||
DataContext = viewModel;
|
||||
}
|
||||
}
|
||||
@@ -36,9 +36,14 @@
|
||||
Margin="10,0,0,0"
|
||||
VerticalScrollBarVisibility="Disabled"
|
||||
x:Name="AutoScrollViewer">
|
||||
<Label VerticalAlignment="Center">
|
||||
<TextBlock Text="{Binding Name}" />
|
||||
</Label>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label VerticalAlignment="Center">
|
||||
<TextBlock Text="{Binding Name}" />
|
||||
</Label>
|
||||
<Label VerticalAlignment="Center">
|
||||
<TextBlock Text="{Binding Message}" />
|
||||
</Label>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
||||
<Panel
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
CornerRadius="10"
|
||||
Margin="5">
|
||||
|
||||
<Grid ColumnDefinitions="*,80,50,50" RowDefinitions="35,*,*">
|
||||
<Grid ColumnDefinitions="*,80,50,50,50" RowDefinitions="35,*,*">
|
||||
<Border
|
||||
Background="Transparent"
|
||||
BoxShadow="0 3 3 -2 #121212"
|
||||
@@ -47,7 +47,7 @@
|
||||
VerticalScrollBarVisibility="Disabled"
|
||||
x:Name="AutoScrollViewer">
|
||||
<Label VerticalAlignment="Center">
|
||||
<TextBlock Text="{Binding Status.Name}" />
|
||||
<TextBlock Text="{Binding RealName}" />
|
||||
</Label>
|
||||
</ScrollViewer>
|
||||
</Button>
|
||||
@@ -67,9 +67,19 @@
|
||||
</Label>
|
||||
</StackPanel>
|
||||
|
||||
<Panel
|
||||
<Button
|
||||
Grid.Column="2"
|
||||
Grid.Row="0"
|
||||
Command="{Binding EditName}"
|
||||
CornerRadius="10,10,10,10"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch">
|
||||
<Svg Margin="4" Path="/Assets/svg/pencil.svg" />
|
||||
</Button>
|
||||
|
||||
<Panel
|
||||
Grid.Column="3"
|
||||
Grid.Row="0"
|
||||
Margin="5,0,0,0">
|
||||
<Button
|
||||
Command="{Binding ToggleFavorites}"
|
||||
@@ -90,7 +100,7 @@
|
||||
</Panel>
|
||||
|
||||
<Panel
|
||||
Grid.Column="3"
|
||||
Grid.Column="4"
|
||||
Grid.Row="0"
|
||||
Margin="5,0,0,0">
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user