Multi-Platform Package Manager for Stable Diffusion
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

25 lines
738 B

using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using StabilityMatrix.Avalonia.Models.HuggingFace;
using StabilityMatrix.Avalonia.ViewModels.Base;
namespace StabilityMatrix.Avalonia.ViewModels.HuggingFacePage;
public partial class HuggingfaceItemViewModel : ViewModelBase
{
[ObservableProperty]
private HuggingfaceItem item;
[ObservableProperty]
private bool isSelected;
public string LicenseUrl =>
$"https://huggingface.co/{Item.RepositoryPath}/blob/main/{Item.LicensePath ?? "README.md"}";
public string RepoUrl => $"https://huggingface.co/{Item.RepositoryPath}";
[RelayCommand]
private void ToggleSelected()
{
IsSelected = !IsSelected;
}
}