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