enhance: disable blame on submodules

This commit is contained in:
leo 2024-07-01 13:45:48 +08:00
parent 0da30b6b89
commit de1a4d14e8
No known key found for this signature in database
2 changed files with 1 additions and 2 deletions

View file

@ -319,6 +319,7 @@ namespace SourceGit.ViewModels
var blame = new MenuItem(); var blame = new MenuItem();
blame.Header = App.Text("Blame"); blame.Header = App.Text("Blame");
blame.Icon = App.CreateMenuIcon("Icons.Blame"); blame.Icon = App.CreateMenuIcon("Icons.Blame");
blame.IsEnabled = file.Type == Models.ObjectType.Blob;
blame.Click += (o, ev) => blame.Click += (o, ev) =>
{ {
var window = new Views.Blame() { DataContext = new Blame(_repo, file.Path, _commit.SHA) }; var window = new Views.Blame() { DataContext = new Blame(_repo, file.Path, _commit.SHA) };

View file

@ -9,8 +9,6 @@ using Avalonia.Controls.Primitives;
using Avalonia.Controls.Templates; using Avalonia.Controls.Templates;
using Avalonia.Interactivity; using Avalonia.Interactivity;
using Avalonia.Media; using Avalonia.Media;
using Avalonia.Media.Imaging;
using Avalonia.Styling;
using AvaloniaEdit; using AvaloniaEdit;
using AvaloniaEdit.Document; using AvaloniaEdit.Document;