mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Merge branch 'development' into feature/workshop
This commit is contained in:
commit
c6a318b6e3
@ -13,7 +13,10 @@ internal class LoggerFactory : ILoggerFactory
|
|||||||
internal static readonly ILogger Logger = new LoggerConfiguration()
|
internal static readonly ILogger Logger = new LoggerConfiguration()
|
||||||
.Enrich.FromLogContext()
|
.Enrich.FromLogContext()
|
||||||
.WriteTo.File(Path.Combine(Constants.LogsFolder, "Artemis log-.log"),
|
.WriteTo.File(Path.Combine(Constants.LogsFolder, "Artemis log-.log"),
|
||||||
|
fileSizeLimitBytes: 5 * 1024 * 1024,
|
||||||
|
rollOnFileSizeLimit: true,
|
||||||
rollingInterval: RollingInterval.Day,
|
rollingInterval: RollingInterval.Day,
|
||||||
|
retainedFileCountLimit: 14,
|
||||||
outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss.fff} [{Level:u3}] [{SourceContext}] {Message:lj}{NewLine}{Exception}")
|
outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss.fff} [{Level:u3}] [{SourceContext}] {Message:lj}{NewLine}{Exception}")
|
||||||
.WriteTo.Console()
|
.WriteTo.Console()
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
|||||||
@ -50,8 +50,8 @@ public partial class ProfileConfigurationIcon : UserControl, IDisposable
|
|||||||
{
|
{
|
||||||
Dispatcher.UIThread.Post(() =>
|
Dispatcher.UIThread.Post(() =>
|
||||||
{
|
{
|
||||||
Stream? stream = ConfigurationIcon.GetIconStream();
|
Stream? stream = ConfigurationIcon?.GetIconStream();
|
||||||
if (stream == null)
|
if (stream == null || ConfigurationIcon == null)
|
||||||
Content = new MaterialIcon {Kind = MaterialIconKind.QuestionMark};
|
Content = new MaterialIcon {Kind = MaterialIconKind.QuestionMark};
|
||||||
else
|
else
|
||||||
LoadFromBitmap(ConfigurationIcon, stream);
|
LoadFromBitmap(ConfigurationIcon, stream);
|
||||||
|
|||||||
@ -44,28 +44,4 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AvaloniaResource Include="Assets\**" />
|
<AvaloniaResource Include="Assets\**" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<AdditionalFiles Include="Screens\Workshop\Layout\LayoutDetailsView.axaml" />
|
|
||||||
<AdditionalFiles Include="Screens\Workshop\Layout\LayoutListView.axaml" />
|
|
||||||
<AdditionalFiles Include="Screens\Workshop\Profile\ProfileDetailsView.axaml" />
|
|
||||||
<AdditionalFiles Include="Screens\Workshop\Profile\ProfileListView.axaml" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<UpToDateCheckInput Remove="Screens\Workshop\Categories\Profile\ProfileDetailsView.axaml" />
|
|
||||||
<UpToDateCheckInput Remove="Screens\Workshop\Categories\Profile\ProfileListView.axaml" />
|
|
||||||
<UpToDateCheckInput Remove="Controls\AcrylicBlur\AcrylicBlur.axaml" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Update="Screens\Workshop\Enries\EntryListView.axaml.cs">
|
|
||||||
<DependentUpon>ProfileListEntryView.axaml</DependentUpon>
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Update="Screens\Workshop\SubmissionWizard\SubmissionWizardView.axaml.cs">
|
|
||||||
<DependentUpon>StartupWizardView.axaml</DependentUpon>
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
</Project>
|
||||||
@ -16,6 +16,7 @@ public static class Routes
|
|||||||
public static List<IRouterRegistration> ArtemisRoutes = new()
|
public static List<IRouterRegistration> ArtemisRoutes = new()
|
||||||
{
|
{
|
||||||
new RouteRegistration<HomeViewModel>("home"),
|
new RouteRegistration<HomeViewModel>("home"),
|
||||||
|
#if DEBUG
|
||||||
new RouteRegistration<WorkshopViewModel>("workshop")
|
new RouteRegistration<WorkshopViewModel>("workshop")
|
||||||
{
|
{
|
||||||
Children = new List<IRouterRegistration>()
|
Children = new List<IRouterRegistration>()
|
||||||
@ -26,6 +27,7 @@ public static class Routes
|
|||||||
new RouteRegistration<LayoutDetailsViewModel>("layouts/{entryId:guid}")
|
new RouteRegistration<LayoutDetailsViewModel>("layouts/{entryId:guid}")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
#endif
|
||||||
new RouteRegistration<SurfaceEditorViewModel>("surface-editor"),
|
new RouteRegistration<SurfaceEditorViewModel>("surface-editor"),
|
||||||
new RouteRegistration<SettingsViewModel>("settings")
|
new RouteRegistration<SettingsViewModel>("settings")
|
||||||
{
|
{
|
||||||
|
|||||||
@ -111,7 +111,6 @@ public class PropertiesViewModel : ActivatableViewModelBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
public RenderProfileElement? ProfileElement => _profileElement?.Value;
|
public RenderProfileElement? ProfileElement => _profileElement?.Value;
|
||||||
public Layer? Layer => _profileElement?.Value as Layer;
|
|
||||||
public ILayerProperty? LayerProperty => _layerProperty?.Value;
|
public ILayerProperty? LayerProperty => _layerProperty?.Value;
|
||||||
public bool SuspendedEditing => _suspendedEditing?.Value ?? false;
|
public bool SuspendedEditing => _suspendedEditing?.Value ?? false;
|
||||||
|
|
||||||
@ -133,26 +132,27 @@ public class PropertiesViewModel : ActivatableViewModelBase
|
|||||||
|
|
||||||
private void UpdatePropertyGroups()
|
private void UpdatePropertyGroups()
|
||||||
{
|
{
|
||||||
if (ProfileElement == null)
|
RenderProfileElement? profileElement = ProfileElement;
|
||||||
|
if (profileElement == null)
|
||||||
{
|
{
|
||||||
PropertyGroupViewModels.Clear();
|
PropertyGroupViewModels.Clear();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ObservableCollection<PropertyGroupViewModel> viewModels = new();
|
ObservableCollection<PropertyGroupViewModel> viewModels = new();
|
||||||
if (Layer != null)
|
if (profileElement is Layer layer)
|
||||||
{
|
{
|
||||||
// Add base VMs
|
// Add base VMs
|
||||||
viewModels.Add(GetOrCreatePropertyViewModel(Layer.General, null, null));
|
viewModels.Add(GetOrCreatePropertyViewModel(layer.General, null, null));
|
||||||
viewModels.Add(GetOrCreatePropertyViewModel(Layer.Transform, null, null));
|
viewModels.Add(GetOrCreatePropertyViewModel(layer.Transform, null, null));
|
||||||
|
|
||||||
// Add brush VM if the brush has properties
|
// Add brush VM if the brush has properties
|
||||||
if (Layer.LayerBrush?.BaseProperties != null)
|
if (layer.LayerBrush?.BaseProperties != null)
|
||||||
viewModels.Add(GetOrCreatePropertyViewModel(Layer.LayerBrush.BaseProperties, Layer.LayerBrush, null));
|
viewModels.Add(GetOrCreatePropertyViewModel(layer.LayerBrush.BaseProperties, layer.LayerBrush, null));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add effect VMs
|
// Add effect VMs
|
||||||
foreach (BaseLayerEffect layerEffect in ProfileElement.LayerEffects.OrderBy(e => e.Order))
|
foreach (BaseLayerEffect layerEffect in profileElement.LayerEffects.OrderBy(e => e.Order))
|
||||||
{
|
{
|
||||||
if (layerEffect.BaseProperties != null)
|
if (layerEffect.BaseProperties != null)
|
||||||
viewModels.Add(GetOrCreatePropertyViewModel(layerEffect.BaseProperties, null, layerEffect));
|
viewModels.Add(GetOrCreatePropertyViewModel(layerEffect.BaseProperties, null, layerEffect));
|
||||||
|
|||||||
@ -45,7 +45,7 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
<Border Classes="card-separator" />
|
<Border Classes="card-separator" />
|
||||||
|
|
||||||
<Grid RowDefinitions="*,*" ColumnDefinitions="*,Auto">
|
<Grid RowDefinitions="*,*" ColumnDefinitions="*,Auto" IsVisible="{CompiledBinding IsWindows11}">
|
||||||
<StackPanel Grid.Column="0">
|
<StackPanel Grid.Column="0">
|
||||||
<TextBlock>Enable Mica effect</TextBlock>
|
<TextBlock>Enable Mica effect</TextBlock>
|
||||||
<TextBlock Classes="subtitle" TextWrapping="Wrap">
|
<TextBlock Classes="subtitle" TextWrapping="Wrap">
|
||||||
@ -56,7 +56,7 @@
|
|||||||
<ToggleSwitch IsChecked="{CompiledBinding EnableMica.Value}" OnContent="Yes" OffContent="No" MinWidth="0" Margin="0 -10" />
|
<ToggleSwitch IsChecked="{CompiledBinding EnableMica.Value}" OnContent="Yes" OffContent="No" MinWidth="0" Margin="0 -10" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Border Classes="card-separator" />
|
<Border Classes="card-separator" IsVisible="{CompiledBinding IsWindows11}"/>
|
||||||
|
|
||||||
<Grid RowDefinitions="*,*" ColumnDefinitions="*,Auto">
|
<Grid RowDefinitions="*,*" ColumnDefinitions="*,Auto">
|
||||||
<StackPanel Grid.Column="0">
|
<StackPanel Grid.Column="0">
|
||||||
|
|||||||
@ -20,6 +20,7 @@ using Artemis.UI.Shared.Services.Builders;
|
|||||||
using Avalonia.Threading;
|
using Avalonia.Threading;
|
||||||
using DryIoc;
|
using DryIoc;
|
||||||
using DynamicData;
|
using DynamicData;
|
||||||
|
using FluentAvalonia.Interop;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
using Serilog.Events;
|
using Serilog.Events;
|
||||||
|
|
||||||
@ -95,6 +96,7 @@ public class GeneralTabViewModel : ActivatableViewModelBase
|
|||||||
public ReactiveCommand<Unit, Unit> ShowDataFolder { get; }
|
public ReactiveCommand<Unit, Unit> ShowDataFolder { get; }
|
||||||
|
|
||||||
public bool IsAutoRunSupported => _autoRunProvider != null;
|
public bool IsAutoRunSupported => _autoRunProvider != null;
|
||||||
|
public bool IsWindows11 => OSVersionHelper.IsWindows11();
|
||||||
|
|
||||||
public ObservableCollection<LayerBrushDescriptor> LayerBrushDescriptors { get; }
|
public ObservableCollection<LayerBrushDescriptor> LayerBrushDescriptors { get; }
|
||||||
public ObservableCollection<string> GraphicsContexts { get; }
|
public ObservableCollection<string> GraphicsContexts { get; }
|
||||||
|
|||||||
@ -39,11 +39,13 @@ public class SidebarViewModel : ActivatableViewModelBase
|
|||||||
SidebarScreen = new SidebarScreenViewModel(MaterialIconKind.Abacus, ROOT_SCREEN, "", null, new ObservableCollection<SidebarScreenViewModel>()
|
SidebarScreen = new SidebarScreenViewModel(MaterialIconKind.Abacus, ROOT_SCREEN, "", null, new ObservableCollection<SidebarScreenViewModel>()
|
||||||
{
|
{
|
||||||
new(MaterialIconKind.HomeOutline, "Home", "home"),
|
new(MaterialIconKind.HomeOutline, "Home", "home"),
|
||||||
|
#if DEBUG
|
||||||
new(MaterialIconKind.TestTube, "Workshop", "workshop", null, new ObservableCollection<SidebarScreenViewModel>
|
new(MaterialIconKind.TestTube, "Workshop", "workshop", null, new ObservableCollection<SidebarScreenViewModel>
|
||||||
{
|
{
|
||||||
new(MaterialIconKind.FolderVideo, "Profiles", "workshop/profiles/1", "workshop/profiles"),
|
new(MaterialIconKind.FolderVideo, "Profiles", "workshop/profiles/1", "workshop/profiles"),
|
||||||
new(MaterialIconKind.KeyboardVariant, "Layouts", "workshop/layouts/1", "workshop/layouts"),
|
new(MaterialIconKind.KeyboardVariant, "Layouts", "workshop/layouts/1", "workshop/layouts"),
|
||||||
}),
|
}),
|
||||||
|
#endif
|
||||||
new(MaterialIconKind.Devices, "Surface Editor", "surface-editor"),
|
new(MaterialIconKind.Devices, "Surface Editor", "surface-editor"),
|
||||||
new(MaterialIconKind.SettingsOutline, "Settings", "settings")
|
new(MaterialIconKind.SettingsOutline, "Settings", "settings")
|
||||||
});
|
});
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
<Styles.Resources>
|
<Styles.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<MergeResourceInclude Source="TreeView.axaml"></MergeResourceInclude>
|
<MergeResourceInclude Source="TreeView.axaml"/>
|
||||||
</ResourceDictionary.MergedDictionaries>
|
</ResourceDictionary.MergedDictionaries>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</Styles.Resources>
|
</Styles.Resources>
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<AvaloniaVersion>11.0.1</AvaloniaVersion>
|
<AvaloniaVersion>11.0.2</AvaloniaVersion>
|
||||||
<FluentAvaloniaVersion>2.0.0</FluentAvaloniaVersion>
|
<FluentAvaloniaVersion>2.0.1</FluentAvaloniaVersion>
|
||||||
<RGBDotNetVersion>2.0.0-prerelease.83</RGBDotNetVersion>
|
<RGBDotNetVersion>2.0.0-prerelease.94</RGBDotNetVersion>
|
||||||
<SkiaSharpVersion>2.88.3</SkiaSharpVersion>
|
<SkiaSharpVersion>2.88.3</SkiaSharpVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
Loading…
x
Reference in New Issue
Block a user