Files
sourcegit/src/ViewModels/ViewLogs.cs
2025-04-17 16:07:40 +08:00

34 lines
701 B
C#

using Avalonia.Collections;
using CommunityToolkit.Mvvm.ComponentModel;
namespace SourceGit.ViewModels
{
public class ViewLogs : ObservableObject
{
public AvaloniaList<CommandLog> Logs
{
get => _repo.Logs;
}
public CommandLog SelectedLog
{
get => _selectedLog;
set => SetProperty(ref _selectedLog, value);
}
public ViewLogs(Repository repo)
{
_repo = repo;
}
public void ClearAll()
{
SelectedLog = null;
Logs.Clear();
}
private Repository _repo = null;
private CommandLog _selectedLog = null;
}
}