- Editor gefixt :) Sauberes Syntax hervorheben nun Fehler war, avalonia etc zu updaten! regelmäßig updates machen also xD
- UI Überarbeitet im ServerDashboard, bepinex status wird jetzt kleiner wenn nix weiter angezeigt wird und modliste größer. Löschen und update buttons eingefügt in modsliste TODO: Update und Delete function Mods, Ladeanimation für Modupload und so :P - Lschen und Update buttons in liste sollen ganz rechts immer sein!
This commit is contained in:
@@ -7,77 +7,114 @@
|
||||
mc:Ignorable="d" d:DesignWidth="1424" d:DesignHeight="714"
|
||||
x:Class="Valheim_Dashboard.Views.ServerDashboardView"
|
||||
x:DataType="vm:ServerDashboardViewModel"
|
||||
xmlns:ae="clr-namespace:AvaloniaEdit;assembly=AvaloniaEdit">
|
||||
xmlns:ae="clr-namespace:AvaloniaEdit;assembly=AvaloniaEdit"
|
||||
xmlns:icons="clr-namespace:Lucide.Avalonia;assembly=Lucide.Avalonia">
|
||||
|
||||
|
||||
<Grid ColumnDefinitions="2*,3*">
|
||||
<!-- Linke Spalte -->
|
||||
<StackPanel Margin="20" Spacing="20">
|
||||
<Grid Margin="20" RowDefinitions="Auto,*" RowSpacing="20">
|
||||
|
||||
<!-- BepInEx Status -->
|
||||
<Border BorderBrush="Gray" BorderThickness="2" CornerRadius="12" Padding="20">
|
||||
<StackPanel Spacing="10" Height="120">
|
||||
<TextBlock Text="BepInEx Status" FontSize="28" FontWeight="Bold"/>
|
||||
<Border BorderBrush="Gray" BorderThickness="2" CornerRadius="12" Padding="20"
|
||||
Grid.Row="0">
|
||||
<StackPanel Spacing="10">
|
||||
<Grid>
|
||||
<TextBlock Text="BepInEx Status" FontSize="28" FontWeight="Bold"/>
|
||||
<Ellipse Width="20" Height="20" Fill="{Binding BepInExStatusBrush}" Stroke="Black" StrokeThickness="1"
|
||||
VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
<TextBlock Text="{Binding BepInExStatus}" FontSize="20"/>
|
||||
<ProgressBar IsVisible="{Binding IsLoading}" />
|
||||
<Button Content="Installieren"
|
||||
HorizontalContentAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
Command="{Binding InstallBepInExCommand}"
|
||||
IsVisible="{Binding ShowInstallButton}"
|
||||
HorizontalContentAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
Height="80"/>
|
||||
<Button Content="Update"
|
||||
Command="{Binding UpdateBepInExCommand}"
|
||||
IsVisible="{Binding ShowUpdateButton}"
|
||||
HorizontalContentAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
Height="80"/>
|
||||
<ProgressBar Minimum="0" Maximum="100" Value="{Binding ProgressValue}" IsVisible="{Binding IsProgress}" Height="20"/>
|
||||
<ProgressBar Minimum="0" Maximum="100" Value="{Binding ProgressValue}"
|
||||
IsVisible="{Binding IsProgress}" Height="20"/>
|
||||
<TextBlock Text="{Binding ProgressText}" Margin="0,5,0,0" IsVisible="{Binding IsProgress}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Mods Liste -->
|
||||
<Border BorderBrush="Gray" BorderThickness="2" CornerRadius="12" Padding="20">
|
||||
<StackPanel Height="450">
|
||||
<TextBlock Text="Mods" FontSize="28" FontWeight="Bold"/>
|
||||
<ListBox ItemsSource="{Binding Mods}" SelectedItem="{Binding SelectedMod}" Height="330">
|
||||
<Border BorderBrush="Gray" BorderThickness="2" CornerRadius="12" Padding="20"
|
||||
Grid.Row="1">
|
||||
<Grid RowDefinitions="Auto,*,Auto" RowSpacing="10">
|
||||
<TextBlock Text="Mods" FontSize="28" FontWeight="Bold" Grid.Row="0"/>
|
||||
|
||||
<!-- ListBox füllt jetzt automatisch den Rest -->
|
||||
<ListBox ItemsSource="{Binding Mods}" SelectedItem="{Binding SelectedMod}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding Name}" FontWeight="Bold" Margin="0,0,5,0"/>
|
||||
<TextBlock Text="{Binding Version}" Foreground="Gray"/>
|
||||
</StackPanel>
|
||||
<DockPanel Margin="5">
|
||||
<!-- Links: Name + Version -->
|
||||
<StackPanel Orientation="Horizontal" DockPanel.Dock="Left">
|
||||
<TextBlock Text="{Binding Name}" FontWeight="Bold" Margin="0,0,10,0"/>
|
||||
<TextBlock Text="{Binding Version}" Foreground="Gray"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Rechts: Icon-Buttons -->
|
||||
<StackPanel Orientation="Horizontal" Spacing="8" DockPanel.Dock="Right">
|
||||
<!-- Update nur wenn HasUpdate true -->
|
||||
<Button Command="{Binding $parent[UserControl].DataContext.UpdateModCommand}"
|
||||
CommandParameter="{Binding}"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
ToolTip.Tip="Update verfügbar"
|
||||
IsVisible="{Binding HasUpdate}"
|
||||
HorizontalAlignment="Right"
|
||||
Content="{LucideIconContent ArrowUp}">
|
||||
|
||||
</Button>
|
||||
|
||||
<!-- Löschen -->
|
||||
<Button Command="{Binding $parent[UserControl].DataContext.RemoveModCommand}"
|
||||
CommandParameter="{Binding}"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
ToolTip.Tip="Mod entfernen"
|
||||
HorizontalAlignment="Right"
|
||||
Content="{LucideIconContent Trash2}">
|
||||
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
|
||||
</ListBox>
|
||||
<Grid Margin="0,20,0,0">
|
||||
|
||||
<Button Content="Mod hochladen" Command="{Binding UploadModCommand}" Height="80" HorizontalAlignment="Left"/>
|
||||
<Button Content="Aus Store installieren" Command="{Binding InstallFromStoreCommand}" Height="80" HorizontalAlignment="Right"/>
|
||||
|
||||
<Grid Grid.Row="2">
|
||||
<Button Content="Mod hochladen" Command="{Binding UploadModCommand}" Height="80" VerticalContentAlignment="Center" HorizontalAlignment="Center" />
|
||||
<Button Content="Aus Store installieren" Command="{Binding InstallFromStoreCommand}" Height="80" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<!-- Rechte Spalte (Config Editor) -->
|
||||
<StackPanel Grid.Column="1" Margin="20" Spacing="20">
|
||||
<TextBlock Text="{Binding SelectedMod.Name}" FontSize="28" FontWeight="Bold"/>
|
||||
<ae:TextEditor
|
||||
Document="{Binding ConfigDocument}"
|
||||
x:Name="MyEditorName"
|
||||
IsVisible="True"
|
||||
BorderBrush="Black"
|
||||
BorderThickness="20"
|
||||
ShowLineNumbers="True"
|
||||
Background="Red"
|
||||
Foreground="Yellow"
|
||||
FontFamily="Cascadia Code, Consolas, Menlo, monospace"
|
||||
FontSize="20"
|
||||
HorizontalScrollBarVisibility="Auto"
|
||||
VerticalScrollBarVisibility="Auto" Height="520" />
|
||||
<ae:TextEditor
|
||||
Document="{Binding ConfigDocument}"
|
||||
ShowLineNumbers="True"
|
||||
FontSize="16"
|
||||
HorizontalScrollBarVisibility="Auto"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
SyntaxHighlighting="CfgDark"
|
||||
Background="{DynamicResource Cfg.BgBrush}"
|
||||
Foreground="{DynamicResource Cfg.FgBrush}"
|
||||
Height="520"
|
||||
/>
|
||||
<Grid>
|
||||
<Button Content="Speichern" Command="{Binding SaveConfigCommand}" Height="80" HorizontalAlignment="Left"/>
|
||||
<Button Content="Mod entfernen" Command="{Binding RemoveModCommand}" Height="80" Background="Red" HorizontalAlignment="Right"/>
|
||||
<Button Content="Speichern" Command="{Binding SaveConfigCommand}" Height="80" HorizontalAlignment="Right" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"/>
|
||||
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
||||
Reference in New Issue
Block a user