temp: broken push to laptop

This commit is contained in:
alphafetus committed 2026-06-19 12:31:12 -04:00
1 parent 0a0ea86d25
commit 3a819ce180
32 files changed
+503 -573

No files matched your search

+14 -26
View File
@@ -1,30 +1,18 @@
using ReactiveUI;
using System.Reactive;
using System.Diagnostics;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
namespace PcgsInvUi.ViewModels;
public class ApiKeyViewModel : ViewModelBase {
public string ApiKeyInput {
get => _apiKeyInput;
set => this.RaiseAndSetIfChanged(ref _apiKeyInput, value);
public partial class ApiKeyViewModel : ViewModelBase {
[ObservableProperty]
public partial string ApiKeyInput { get; set; }
[ObservableProperty]
public partial bool OkEnabled { get; set; }
[RelayCommand]
public void OkCommand() {
Debug.WriteLine("Running OkCommand from ApiKeyViewModel");
}
private string _apiKeyInput = "";
public bool OkEnabled {
get => _okEnabled;
set => this.RaiseAndSetIfChanged(ref _okEnabled, value);
}
private bool _okEnabled;
public ReactiveCommand<Unit, string> OkCommand { get; }
public ApiKeyViewModel() {
var okEnabled = this.WhenAnyValue(
x => x.ApiKeyInput,
x => !string.IsNullOrWhiteSpace(x));
// Get the API key from the user.
OkCommand = ReactiveCommand.Create(() => ApiKeyInput, okEnabled);
}
}
}