settings_re4

This commit is contained in:
lincube
2026-03-13 22:20:12 +08:00
parent 3b3f060f33
commit 5fdaa2539b
89 changed files with 5778 additions and 192 deletions

View File

@@ -0,0 +1,57 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using Avalonia.Controls;
using FluentIcons.Common;
namespace LanMountainDesktop.ViewModels;
public sealed class ComponentLibraryWindowViewModel : ViewModelBase
{
public string Title { get; set; } = "Widgets";
public ObservableCollection<ComponentLibraryCategoryViewModel> Categories { get; } = [];
public ObservableCollection<ComponentLibraryItemViewModel> Components { get; } = [];
}
public sealed class ComponentLibraryCategoryViewModel
{
public ComponentLibraryCategoryViewModel(
string id,
string title,
Symbol icon,
IReadOnlyList<ComponentLibraryItemViewModel> components)
{
Id = id;
Title = title;
Icon = icon;
Components = components;
}
public string Id { get; }
public string Title { get; }
public Symbol Icon { get; }
public IReadOnlyList<ComponentLibraryItemViewModel> Components { get; }
}
public sealed class ComponentLibraryItemViewModel
{
public ComponentLibraryItemViewModel(
string componentId,
string displayName,
Control? previewControl)
{
ComponentId = componentId;
DisplayName = displayName;
PreviewControl = previewControl;
}
public string ComponentId { get; }
public string DisplayName { get; }
public Control? PreviewControl { get; }
}

File diff suppressed because it is too large Load Diff