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.
27 lines
709 B
27 lines
709 B
using System; |
|
using System.Linq; |
|
using CommunityToolkit.Mvvm.ComponentModel; |
|
using StabilityMatrix.Avalonia.ViewModels.Base; |
|
using StabilityMatrix.Core.Models.Api; |
|
|
|
namespace StabilityMatrix.Avalonia.ViewModels.Dialogs; |
|
|
|
public partial class RecommendedModelItemViewModel : ViewModelBase |
|
{ |
|
[ObservableProperty] |
|
private bool isSelected; |
|
|
|
[ObservableProperty] |
|
private string author; |
|
|
|
[ObservableProperty] |
|
private CivitModelVersion modelVersion; |
|
|
|
[ObservableProperty] |
|
private CivitModel civitModel; |
|
|
|
public Uri ThumbnailUrl => |
|
ModelVersion.Images?.FirstOrDefault()?.Url == null |
|
? Assets.NoImage |
|
: new Uri(ModelVersion.Images.First().Url); |
|
}
|
|
|