-Ftp Seite überarbeitet mit path auswahl und zurück plus weiter button. Fehlt noch logik zum speichern vom path in global variable (: um sie zu laden evtl local zwischen speichern damit nicht jedes mal eine anfrage zum server kommt. -Server Dashboard beispiel mod config hinzugefügt um ftp string zu lesen und schreiben. Plugin unterstützung fehlt hier noch plus plugin muss erstmal geschrieben werden das er es kann :P
85 lines
3.4 KiB
XML
85 lines
3.4 KiB
XML
<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:vm="clr-namespace:Valheim_Dashboard.ViewModels"
|
|
xmlns:views="clr-namespace:Valheim_Dashboard.Views"
|
|
mc:Ignorable="d"
|
|
x:Class="Valheim_Dashboard.Views.FtpView"
|
|
x:DataType="vm:FtpViewModel">
|
|
|
|
<!-- Äußerer Border für Padding -->
|
|
<Border Padding="20">
|
|
<Grid RowDefinitions="Auto,*,Auto">
|
|
|
|
<!-- Header mit Zurück-Button + Pfad -->
|
|
<Grid Grid.Row="0" ColumnDefinitions="Auto,*" Margin="0,0,0,20">
|
|
|
|
<Button x:Name="CurrentPathBack"
|
|
Grid.Column="0"
|
|
Content="←"
|
|
FontSize="36"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Width="100" Height="100"
|
|
IsVisible="{Binding CanGoBack}"
|
|
Command="{Binding $parent[views:FtpView].ViewModel.FolderBackClickedCommand}"/>
|
|
|
|
<TextBox x:Name="CurrentPathTextBox"
|
|
Grid.Column="1"
|
|
Text="{Binding CurrentPath}"
|
|
FontSize="28"
|
|
IsReadOnly="True"
|
|
VerticalContentAlignment="Center"
|
|
HorizontalContentAlignment="Left"
|
|
Height="100"
|
|
BorderThickness="2"
|
|
BorderBrush="Gray"
|
|
CornerRadius="8"
|
|
Padding="20,0"/>
|
|
</Grid>
|
|
|
|
<!-- Dateiliste -->
|
|
<ScrollViewer Grid.Row="1" Margin="0,0,0,20">
|
|
<ListBox x:Name="FtpFileList"
|
|
ItemsSource="{Binding Files}"
|
|
BorderThickness="0">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Button Command="{Binding $parent[views:FtpView].ViewModel.FolderClickedCommand}"
|
|
CommandParameter="{Binding}"
|
|
Background="Transparent"
|
|
BorderBrush="Transparent"
|
|
HorizontalAlignment="Stretch"
|
|
Height="100"
|
|
Padding="20">
|
|
<TextBlock Text="{Binding Name}"
|
|
FontSize="28"
|
|
VerticalAlignment="Center"/>
|
|
</Button>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</ScrollViewer>
|
|
|
|
<!-- Weiter-Button unten -->
|
|
<Button Grid.Row="2"
|
|
x:Name="weiter"
|
|
Content="Weiter"
|
|
FontSize="28"
|
|
FontWeight="Bold"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Bottom"
|
|
Width="200" Height="100"
|
|
VerticalContentAlignment="Center"
|
|
HorizontalContentAlignment="Center"
|
|
CornerRadius="12"
|
|
Background="#3B82F6"
|
|
Foreground="White"
|
|
Margin="0,0,0,10"
|
|
IsEnabled="True"
|
|
Click="Weiter_Clicked"/>
|
|
</Grid>
|
|
</Border>
|
|
</UserControl>
|