2024-02-05 23:08:37 -08:00
|
|
|
using Avalonia.Controls;
|
|
|
|
using Avalonia.Input;
|
2024-08-23 21:06:38 -07:00
|
|
|
using Avalonia.Interactivity;
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-03-17 18:37:06 -07:00
|
|
|
namespace SourceGit.Views
|
|
|
|
{
|
2024-06-12 20:54:10 -07:00
|
|
|
public partial class FileHistories : ChromelessWindow
|
2024-03-17 18:37:06 -07:00
|
|
|
{
|
2024-10-31 06:36:51 -07:00
|
|
|
public FileHistories()
|
2024-03-17 18:37:06 -07:00
|
|
|
{
|
2024-10-31 06:36:51 -07:00
|
|
|
InitializeComponent();
|
2024-03-14 03:23:36 -07:00
|
|
|
}
|
2024-08-23 20:36:02 -07:00
|
|
|
|
|
|
|
private void OnPressCommitSHA(object sender, PointerPressedEventArgs e)
|
|
|
|
{
|
|
|
|
if (sender is TextBlock { DataContext: Models.Commit commit } &&
|
|
|
|
DataContext is ViewModels.FileHistories vm)
|
|
|
|
{
|
|
|
|
vm.NavigateToCommit(commit);
|
|
|
|
}
|
|
|
|
|
|
|
|
e.Handled = true;
|
|
|
|
}
|
2024-08-23 21:06:38 -07:00
|
|
|
|
|
|
|
private void OnResetToSelectedRevision(object _, RoutedEventArgs e)
|
|
|
|
{
|
|
|
|
if (DataContext is ViewModels.FileHistories vm)
|
|
|
|
{
|
|
|
|
vm.ResetToSelectedRevision();
|
|
|
|
NotifyDonePanel.IsVisible = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
e.Handled = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
private void OnCloseNotifyPanel(object _, PointerPressedEventArgs e)
|
|
|
|
{
|
|
|
|
NotifyDonePanel.IsVisible = false;
|
|
|
|
e.Handled = true;
|
|
|
|
}
|
2024-02-05 23:08:37 -08:00
|
|
|
}
|
2024-03-31 01:54:29 -07:00
|
|
|
}
|