| using CommunityToolkit.Mvvm.ComponentModel; |
| using CommunityToolkit.Mvvm.Input; |
| using System.Collections.ObjectModel; |
|
|
| namespace SilkroadBot.UI.ViewModels; |
|
|
| public partial class MainViewModel : ObservableObject |
| { |
| [ObservableProperty] private string _currentPage = "Dashboard"; |
| [ObservableProperty] private string _statusText = "Ready"; |
| [ObservableProperty] private int _activeBotCount; |
| } |
|
|
| public partial class DashboardViewModel : ObservableObject |
| { |
| [ObservableProperty] private int _activeBotsCount; |
| [ObservableProperty] private int _connectedCount; |
| [ObservableProperty] private int _pluginsCount; |
| [ObservableProperty] private string _uptime = "00:00:00"; |
| public ObservableCollection<string> RecentLogs { get; } = new(); |
| } |
|
|
| public partial class ProfilesViewModel : ObservableObject |
| { |
| [ObservableProperty] private string _selectedProfileId = ""; |
| public ObservableCollection<ProfileListItem> Profiles { get; } = new(); |
| } |
|
|
| public record ProfileListItem(string Id, string Name, string Status); |
|
|
| public partial class PluginsViewModel : ObservableObject |
| { |
| public ObservableCollection<PluginListItem> Plugins { get; } = new(); |
| } |
|
|
| public record PluginListItem(string Name, string Version, string Author, bool IsRunning, string Description); |
|
|
| public partial class PacketMonitorViewModel : ObservableObject |
| { |
| [ObservableProperty] private bool _isCapturing = true; |
| [ObservableProperty] private string _opcodeFilter = ""; |
| public ObservableCollection<PacketEntry> Packets { get; } = new(); |
| } |
|
|
| public record PacketEntry(string Time, string Direction, string Opcode, string Name, int Size, string HexData); |
|
|
| public partial class LogsViewModel : ObservableObject |
| { |
| [ObservableProperty] private string _levelFilter = "All"; |
| public ObservableCollection<string> Logs { get; } = new(); |
| } |
|
|