| | | 1 | | using LOCKnet.Core.DataAbstractions; |
| | | 2 | | using System.Collections.ObjectModel; |
| | | 3 | | |
| | | 4 | | namespace LOCKnet.App.ViewModels; |
| | | 5 | | |
| | | 6 | | /// <summary> |
| | | 7 | | /// Statische Design-Time-Daten für den Avalonia-Previewer. |
| | | 8 | | /// Wird ausschließlich über Design.DataContext referenziert — nie zur Laufzeit verwendet. |
| | | 9 | | /// </summary> |
| | | 10 | | public static class DesignData |
| | | 11 | | { |
| | | 12 | | /// <summary>Sample-ViewModel für die Credential-Liste (Designer-Vorschau).</summary> |
| | 2 | 13 | | public static CredentialListDesignViewModel CredentialList { get; } = new(); |
| | | 14 | | } |
| | | 15 | | |
| | | 16 | | /// <summary> |
| | | 17 | | /// Design-Time-Variante des CredentialListViewModel. |
| | | 18 | | /// Initialisiert ohne AppServices — enthält nur statische Sample-Daten. |
| | | 19 | | /// </summary> |
| | | 20 | | public sealed class CredentialListDesignViewModel : ViewModelBase |
| | | 21 | | { |
| | | 22 | | public ObservableCollection<CredentialRecord> Credentials { get; } = |
| | | 23 | | [ |
| | | 24 | | new CredentialRecord |
| | | 25 | | { |
| | | 26 | | Id = 1, |
| | | 27 | | Title = "GitHub", |
| | | 28 | | Username = "Alhasan Ramadan", |
| | | 29 | | Url = "https://github.com/alhasan-ramadan/LOCKnet", |
| | | 30 | | CreatedAt = DateTime.UtcNow, |
| | | 31 | | UpdatedAt = DateTime.UtcNow, |
| | | 32 | | }, |
| | | 33 | | new CredentialRecord |
| | | 34 | | { |
| | | 35 | | Id = 2, |
| | | 36 | | Title = "Beispiel-Eintrag", |
| | | 37 | | Username = "nutzer@example.com", |
| | | 38 | | Url = "https://example.com", |
| | | 39 | | CreatedAt = DateTime.UtcNow, |
| | | 40 | | UpdatedAt = DateTime.UtcNow, |
| | | 41 | | CredentialType = CredentialType.ApiKey, |
| | | 42 | | }, |
| | | 43 | | ]; |
| | | 44 | | |
| | | 45 | | public CredentialRecord? SelectedCredential { get; set; } |
| | | 46 | | public string SearchText { get; set; } = string.Empty; |
| | | 47 | | public string StatusMessage { get; set; } = string.Empty; |
| | | 48 | | public string LockTimerText { get; set; } = "⏱ 0:58"; |
| | | 49 | | } |