Loading fix, CopyPath, Open in explorer

This commit is contained in:
2022-05-25 14:05:14 +02:00
parent 06f79ddfa9
commit 96158160bd
12 changed files with 96 additions and 8 deletions

View File

@@ -49,7 +49,7 @@ public static class MainConfiguration
//new CommandBindingConfiguration(ConfigCommand.Compress, new[] { Key.Y, Key.C }),
new CommandBindingConfiguration(CopyCommand.CommandName, new[] { Key.Y, Key.Y }),
//new CommandBindingConfiguration(ConfigCommand.CopyHash, new[] { Key.C, Key.H }),
//new CommandBindingConfiguration(ConfigCommand.CopyPath, new[] { Key.C, Key.P }),
new CommandBindingConfiguration(CopyNativePathCommand.CommandName, new[] { Key.C, Key.P }),
new CommandBindingConfiguration(CreateContainer.CommandName, Key.F7),
new CommandBindingConfiguration(CreateContainer.CommandName, new[] { Key.C, Key.C }),
new CommandBindingConfiguration(CreateElement.CommandName, new[] { Key.C, Key.E }),
@@ -69,7 +69,7 @@ public static class MainConfiguration
new CommandBindingConfiguration(MoveCursorToFirstCommand.CommandName, new[] { Key.G, Key.G }),
//new CommandBindingConfiguration(ConfigCommand.NextTimelineBlock, Key.L ),
//new CommandBindingConfiguration(ConfigCommand.NextTimelineCommand, Key.J ),
//new CommandBindingConfiguration(ConfigCommand.OpenInFileBrowser, new[] { Key.O, Key.E }),
new CommandBindingConfiguration(OpenInDefaultFileExplorerCommand.CommandName, new[] { Key.O, Key.E }),
new CommandBindingConfiguration(PasteCommand.PasteMergeCommandName, new[] { Key.P, Key.P }),
new CommandBindingConfiguration(PasteCommand.PasteOverwriteCommandName, new[] { Key.P, Key.O }),
new CommandBindingConfiguration(PasteCommand.PasteSkipCommandName, new[] { Key.P, Key.S }),

View File

@@ -39,6 +39,7 @@ public static class Startup
serviceCollection.TryAddSingleton<IIconProvider, MaterialIconProvider>();
serviceCollection.TryAddSingleton<IModalService, ModalService>();
serviceCollection.TryAddSingleton<IDialogService, DialogService>();
serviceCollection.TryAddSingleton<ISystemClipboardService, SystemClipboardService>();
serviceCollection.TryAddSingleton<IInputInterface>(s => s.GetRequiredService<IDialogService>());
return serviceCollection

View File

@@ -0,0 +1,14 @@
using FileTime.App.Core.Services;
namespace FileTime.GuiApp.Services;
public class SystemClipboardService : ISystemClipboardService
{
public async Task CopyToClipboardAsync(string text)
{
if (global::Avalonia.Application.Current?.Clipboard is { } clipboard)
{
await clipboard.SetTextAsync(text);
}
}
}

View File

@@ -28,11 +28,12 @@
<Grid Background="{DynamicResource AppBackgroundBrush}">
<Grid
x:DataType="vm:MainWindowViewModel">
x:DataType="vm:MainWindowViewModel"
IsVisible="{Binding Loading, Converter={x:Static BoolConverters.Not}, FallbackValue=False}">
<Grid
ColumnDefinitions="250,*"
RowDefinitions="Auto,*"
IsVisible="{Binding Loading, Converter={x:Static BoolConverters.Not}}">
RowDefinitions="Auto,*">
<Grid PointerPressed="HeaderPointerPressed">
<Rectangle Fill="#01000000" />