mirror of
https://github.com/frosch95/K8sFileBrowser.git
synced 2026-04-11 12:58:22 +02:00
Compare commits
4 Commits
v0.0.4-alp
...
v0.0.5-alp
| Author | SHA1 | Date | |
|---|---|---|---|
| ec60e55c7f | |||
| a4fb00010e | |||
|
|
6ad58270a9 | ||
|
|
e284e3f532 |
@@ -28,6 +28,8 @@
|
||||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
||||
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.1" />
|
||||
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.1" />
|
||||
<PackageReference Include="Avalonia.Xaml.Interactions" Version="11.0.2" />
|
||||
<PackageReference Include="Avalonia.Xaml.Interactivity" Version="11.0.2" />
|
||||
<PackageReference Include="KubernetesClient" Version="11.0.44" />
|
||||
<PackageReference Include="Serilog" Version="3.0.1" />
|
||||
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
|
||||
|
||||
@@ -6,6 +6,7 @@ public class FileInformation
|
||||
{
|
||||
public string Parent { get; set; } = string.Empty;
|
||||
public FileType Type { get; set; } = FileType.File;
|
||||
public string DisplayName => Parent.Length < 2 ? Name[Parent.Length..] : Name[( Parent.Length + 1)..];
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Size { get; set; } = string.Empty;
|
||||
public DateTimeOffset Date { get; set; } = DateTimeOffset.MinValue;
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
BorderThickness="1"
|
||||
SelectionMode="Single"
|
||||
SelectedItem="{Binding SelectedFile}"
|
||||
>
|
||||
Focusable="False">
|
||||
<DataGrid.Styles>
|
||||
<Style Selector="DataGridColumnHeader">
|
||||
<Setter Property="FontSize" Value="14"></Setter>
|
||||
@@ -116,19 +116,63 @@
|
||||
<DataGridTemplateColumn Header="Type">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="models:FileInformation">
|
||||
<Border ToolTip.Tip="{Binding Type}" VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||
<StackPanel>
|
||||
<Border ToolTip.Tip="{Binding Type}" Background="Transparent">
|
||||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||
<PathIcon Data="{StaticResource folder_regular}" IsVisible="{Binding IsDirectory}"></PathIcon>
|
||||
<PathIcon Data="{StaticResource document_regular}" IsVisible="{Binding IsFile}"></PathIcon>
|
||||
<PathIcon Data="{StaticResource document_unknown_regular}" IsVisible="{Binding IsUnknown}"></PathIcon>
|
||||
</StackPanel>
|
||||
<Interaction.Behaviors>
|
||||
<EventTriggerBehavior EventName="DoubleTapped">
|
||||
<InvokeCommandAction Command="{Binding ((vm:MainWindowViewModel)DataContext).OpenCommand, RelativeSource={RelativeSource AncestorType=Window }}" />
|
||||
</EventTriggerBehavior>
|
||||
</Interaction.Behaviors>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn Header="Name" Width="*">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="models:FileInformation">
|
||||
<Border Background="Transparent">
|
||||
<TextBlock Text="{Binding DisplayName}" VerticalAlignment="Center"/>
|
||||
<Interaction.Behaviors>
|
||||
<EventTriggerBehavior EventName="DoubleTapped">
|
||||
<InvokeCommandAction Command="{Binding ((vm:MainWindowViewModel)DataContext).OpenCommand, RelativeSource={RelativeSource AncestorType=Window }}" />
|
||||
</EventTriggerBehavior>
|
||||
</Interaction.Behaviors>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn Header="Size" Width="*">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="models:FileInformation">
|
||||
<Border Background="Transparent">
|
||||
<TextBlock Text="{Binding Size}" VerticalAlignment="Center"/>
|
||||
<Interaction.Behaviors>
|
||||
<EventTriggerBehavior EventName="DoubleTapped">
|
||||
<InvokeCommandAction Command="{Binding ((vm:MainWindowViewModel)DataContext).OpenCommand, RelativeSource={RelativeSource AncestorType=Window }}" />
|
||||
</EventTriggerBehavior>
|
||||
</Interaction.Behaviors>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn Header="Date" Width="*">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="models:FileInformation">
|
||||
<Border Background="Transparent">
|
||||
<TextBlock Text="{Binding Date}" VerticalAlignment="Center"/>
|
||||
<Interaction.Behaviors>
|
||||
<EventTriggerBehavior EventName="DoubleTapped">
|
||||
<InvokeCommandAction Command="{Binding ((vm:MainWindowViewModel)DataContext).OpenCommand, RelativeSource={RelativeSource AncestorType=Window }}" />
|
||||
</EventTriggerBehavior>
|
||||
</Interaction.Behaviors>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn Header="Name" Width="*" Binding="{Binding Name}" />
|
||||
<DataGridTextColumn Header="Size" Binding="{Binding Size}" />
|
||||
<DataGridTextColumn Header="Date" Binding="{Binding Date}" />
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</Grid>
|
||||
|
||||
Reference in New Issue
Block a user