Added layout archive generation

This commit is contained in:
RobertBeekman committed 2023-11-02 22:29:42 +01:00
1 parent 59fe1df40f
commit 6b4e84c95a
18 files changed
+224 -68

No files matched your search

@@ -9,6 +9,7 @@ using Artemis.Core.Services;
using Artemis.UI.Screens.Workshop.Layout.Dialogs;
using Artemis.UI.Shared;
using Artemis.UI.Shared.Services;
using Artemis.WebClient.Workshop.Handlers.UploadHandlers;
using PropertyChanged.SourceGenerator;
using ReactiveUI;
using ReactiveUI.Validation.Extensions;
@@ -24,7 +25,7 @@ public partial class LayoutInfoViewModel : ValidatableViewModelBase
[Notify] private Guid _deviceProviderId;
[Notify] private string? _deviceProviderIdInput;
[Notify] private ICommand? _remove;
public LayoutInfoViewModel(ArtemisLayout layout,
IDeviceService deviceService,
IWindowService windowService,
@@ -65,4 +66,14 @@ public partial class LayoutInfoViewModel : ValidatableViewModelBase
if (deviceProvider != null)
DeviceProviderId = deviceProvider.Plugin.Guid;
}
public LayoutInfo ToLayoutInfo()
{
return new LayoutInfo
{
Model = Model ?? string.Empty,
Vendor = Vendor ?? string.Empty,
DeviceProviderId = DeviceProviderId
};
}
}