remove AI integration and account limits
This commit is contained in:
@@ -15,14 +15,12 @@ public partial class WinoAddOnItemViewModel : ObservableObject
|
||||
|
||||
public string IconGlyph => ProductType switch
|
||||
{
|
||||
WinoAddOnProductType.AI_PACK => "\uE945",
|
||||
WinoAddOnProductType.UNLIMITED_ACCOUNTS => "\uE716",
|
||||
_ => "\uE10F"
|
||||
};
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(ShowPurchaseState))]
|
||||
[NotifyPropertyChangedFor(nameof(ShowUsageSummary))]
|
||||
public partial bool IsPurchased { get; set; }
|
||||
|
||||
public ICommand? PurchaseCommand { get; set; }
|
||||
@@ -30,7 +28,6 @@ public partial class WinoAddOnItemViewModel : ObservableObject
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(ShowLoadingState))]
|
||||
[NotifyPropertyChangedFor(nameof(ShowPurchaseState))]
|
||||
[NotifyPropertyChangedFor(nameof(ShowUsageSummary))]
|
||||
[NotifyPropertyChangedFor(nameof(ShowErrorState))]
|
||||
public partial bool IsLoading { get; set; }
|
||||
|
||||
@@ -39,43 +36,31 @@ public partial class WinoAddOnItemViewModel : ObservableObject
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(ShowErrorState))]
|
||||
[NotifyPropertyChangedFor(nameof(ShowUsageSummary))]
|
||||
public partial bool HasUsageData { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(ShowErrorState))]
|
||||
[NotifyPropertyChangedFor(nameof(ShowUsageSummary))]
|
||||
public partial string ErrorText { get; set; } = string.Empty;
|
||||
|
||||
[ObservableProperty]
|
||||
public partial int UsageCount { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(ShowUsageSummary))]
|
||||
public partial int UsageLimit { get; set; } = 1;
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(ShowUsageSummary))]
|
||||
public partial double UsagePercentage { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(ShowUsageSummary))]
|
||||
public partial string RenewalText { get; set; } = string.Empty;
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(ShowUsageSummary))]
|
||||
public partial string UsageResetText { get; set; } = string.Empty;
|
||||
|
||||
public bool ShowLoadingState => IsLoading;
|
||||
|
||||
public bool ShowPurchaseState => !IsLoading && string.IsNullOrWhiteSpace(ErrorText);
|
||||
|
||||
public bool ShowUsageSummary => ProductType == WinoAddOnProductType.AI_PACK &&
|
||||
IsPurchased &&
|
||||
!IsLoading &&
|
||||
string.IsNullOrWhiteSpace(ErrorText) &&
|
||||
HasUsageData;
|
||||
|
||||
public bool ShowErrorState => !IsLoading && !string.IsNullOrWhiteSpace(ErrorText);
|
||||
|
||||
public WinoAddOnItemViewModel(WinoAddOnProductType productType)
|
||||
|
||||
Reference in New Issue
Block a user