1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-12 13:28:33 +00:00

Merge branch 'development'

This commit is contained in:
Robert 2023-09-17 12:14:02 +02:00
commit ce927d320f
24 changed files with 139 additions and 94 deletions

17
.github/workflows/pr-branch.yml vendored Normal file
View File

@ -0,0 +1,17 @@
name: Check pull request branch
on:
pull_request_target:
types:
- opened
- reopened
- synchronize
jobs:
check-branches:
runs-on: ubuntu-latest
steps:
- name: Check branches
run: |
if [ ${{ github.head_ref }} != "development" ] && [ ${{ github.base_ref }} == "master" ]; then
echo "Merge requests to master are only allowed from development."
exit 1
fi

View File

@ -38,18 +38,18 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="DryIoc.dll" Version="5.4.0" />
<PackageReference Include="DryIoc.dll" Version="5.4.1" />
<PackageReference Include="EmbedIO" Version="3.5.2" />
<PackageReference Include="HidSharp" Version="2.1.0" />
<PackageReference Include="Humanizer.Core" Version="2.14.1" />
<PackageReference Include="JetBrains.Annotations" Version="2022.3.1" />
<PackageReference Include="LiteDB" Version="5.0.16" />
<PackageReference Include="JetBrains.Annotations" Version="2023.2.0" />
<PackageReference Include="LiteDB" Version="5.0.17" />
<PackageReference Include="McMaster.NETCore.Plugins" Version="1.4.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="RGB.NET.Core" Version="$(RGBDotNetVersion)" />
<PackageReference Include="RGB.NET.Layout" Version="$(RGBDotNetVersion)" />
<PackageReference Include="RGB.NET.Presets" Version="$(RGBDotNetVersion)" />
<PackageReference Include="Serilog" Version="2.12.0" />
<PackageReference Include="Serilog" Version="3.0.1" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
<PackageReference Include="Serilog.Sinks.Debug" Version="2.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />

View File

@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="LiteDB" Version="5.0.16" />
<PackageReference Include="Serilog" Version="2.12.0" />
<PackageReference Include="LiteDB" Version="5.0.17" />
<PackageReference Include="Serilog" Version="3.0.1" />
</ItemGroup>
</Project>

View File

@ -23,7 +23,7 @@
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" />
<PackageReference Include="Avalonia.ReactiveUI" Version="$(AvaloniaVersion)" />
<PackageReference Include="ReactiveUI" Version="18.4.26" />
<PackageReference Include="ReactiveUI" Version="19.4.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Artemis.Core\Artemis.Core.csproj" />

View File

@ -22,7 +22,7 @@
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" />
<PackageReference Include="Avalonia.ReactiveUI" Version="$(AvaloniaVersion)" />
<PackageReference Include="ReactiveUI" Version="18.4.26" />
<PackageReference Include="ReactiveUI" Version="19.4.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Artemis.Core\Artemis.Core.csproj" />

View File

@ -18,10 +18,10 @@
<PackageReference Include="Avalonia.Controls.ItemsRepeater" Version="$(AvaloniaVersion)" />
<PackageReference Include="Avalonia.ReactiveUI" Version="$(AvaloniaVersion)" />
<PackageReference Include="Avalonia.Xaml.Behaviors" Version="$(AvaloniaBehavioursVersion)" />
<PackageReference Include="DynamicData" Version="7.13.1" />
<PackageReference Include="DynamicData" Version="7.14.2" />
<PackageReference Include="FluentAvaloniaUI" Version="$(FluentAvaloniaVersion)" />
<PackageReference Include="Material.Icons.Avalonia" Version="2.0.1" />
<PackageReference Include="ReactiveUI" Version="18.4.26" />
<PackageReference Include="ReactiveUI" Version="19.4.1" />
<PackageReference Include="ReactiveUI.Validation" Version="3.1.7" />
<PackageReference Include="RGB.NET.Core" Version="$(RGBDotNetVersion)" />
<PackageReference Include="SkiaSharp" Version="$(SkiaSharpVersion)" />

View File

@ -45,4 +45,5 @@
<StyleInclude Source="/Styles/NumberBox.axaml" />
<StyleInclude Source="/Styles/TreeView.axaml" />
<StyleInclude Source="/Styles/Plugins.axaml" />
<StyleInclude Source="/Styles/ScrollViewer.axaml" />
</Styles>

View File

@ -0,0 +1,15 @@
<Style xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Design.PreviewWith>
<Border Padding="20">
<ScrollViewer Classes="with-padding" Height="100">
<Rectangle Fill="Blue" Width="50" Height="200"></Rectangle>
</ScrollViewer>
</Border>
</Design.PreviewWith>
<!-- Add Styles Here -->
<Style Selector="ScrollViewer.with-padding /template/ ScrollContentPresenter#PART_ContentPresenter">
<Setter Property="Grid.ColumnSpan" Value="1"></Setter>
</Style>
</Style>

View File

@ -31,9 +31,9 @@
<PackageReference Include="Avalonia.Win32" Version="$(AvaloniaVersion)" />
<PackageReference Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.3" />
<PackageReference Include="Microsoft.Win32" Version="2.0.1" />
<PackageReference Include="Microsoft.Windows.Compatibility" Version="7.0.3" />
<PackageReference Include="Microsoft.Windows.Compatibility" Version="7.0.5" />
<PackageReference Include="RawInput.Sharp" Version="0.1.1" />
<PackageReference Include="ReactiveUI" Version="18.4.26" />
<PackageReference Include="ReactiveUI" Version="19.4.1" />
<PackageReference Include="SkiaSharp.Vulkan.SharpVk" Version="$(SkiaSharpVersion)" />
</ItemGroup>
<ItemGroup>

View File

@ -30,22 +30,20 @@
<PackageReference Include="Avalonia.Xaml.Behaviors" Version="$(AvaloniaBehavioursVersion)" />
<PackageReference Include="Avalonia.Skia.Lottie" Version="11.0.0" />
<PackageReference Include="AvaloniaEdit.TextMate" Version="11.0.1" />
<PackageReference Include="DryIoc.dll" Version="5.4.0" />
<PackageReference Include="DynamicData" Version="7.13.1" />
<PackageReference Include="DryIoc.dll" Version="5.4.1" />
<PackageReference Include="DynamicData" Version="7.14.2" />
<PackageReference Include="FluentAvaloniaUI" Version="$(FluentAvaloniaVersion)" />
<PackageReference Include="Flurl.Http" Version="3.2.4" />
<PackageReference Include="Markdown.Avalonia.Svg" Version="11.0.1" />
<PackageReference Include="Markdown.Avalonia.Tight" Version="11.0.1" />
<PackageReference Include="Markdown.Avalonia.Tight" Version="11.0.2" />
<PackageReference Include="Material.Icons.Avalonia" Version="2.0.1" />
<PackageReference Include="Octopus.Octodiff" Version="2.0.261" />
<PackageReference Include="ReactiveUI" Version="18.4.26" />
<PackageReference Include="Octopus.Octodiff" Version="2.0.326" />
<PackageReference Include="ReactiveUI" Version="19.4.1" />
<PackageReference Include="ReactiveUI.Validation" Version="3.1.7" />
<PackageReference Include="RGB.NET.Core" Version="$(RGBDotNetVersion)" />
<PackageReference Include="RGB.NET.Layout" Version="$(RGBDotNetVersion)" />
<PackageReference Include="SkiaSharp" Version="$(SkiaSharpVersion)" />
<PackageReference Include="Splat.DryIoc" Version="14.6.8" />
<PackageReference Include="System.Reactive" Version="5.0.0" />
<PackageReference Include="TextMateSharp.Grammars" Version="1.0.55" />
<PackageReference Include="Splat.DryIoc" Version="14.7.1" />
<PackageReference Include="TextMateSharp.Grammars" Version="1.0.56" />
</ItemGroup>
<ItemGroup>

View File

@ -20,6 +20,12 @@ public class RemoteController : WebApiController
_mainWindowService = mainWindowService;
}
[Route(HttpVerbs.Any, "/status")]
public void GetStatus()
{
HttpContext.Response.StatusCode = 200;
}
[Route(HttpVerbs.Post, "/remote/bring-to-foreground")]
public void PostBringToForeground()
{

View File

@ -7,9 +7,6 @@
x:Class="Artemis.UI.Screens.ProfileEditor.ProfileTree.ContentDialogs.ProfileElementRenameView"
x:DataType="contentDialogs:ProfileElementRenameViewModel">
<StackPanel>
<StackPanel.KeyBindings>
<KeyBinding Gesture="Enter" Command="{CompiledBinding Enter}" />
</StackPanel.KeyBindings>
<TextBox Name="NameTextBox" Text="{CompiledBinding ProfileElementName}" Watermark="Profile element name" />
</StackPanel>
</UserControl>

View File

@ -22,7 +22,6 @@ public class ProfileElementRenameViewModel : ContentDialogViewModelBase
_profileElementName = profileElement.Name;
Confirm = ReactiveCommand.Create(ExecuteConfirm, ValidationContext.Valid);
Enter = ReactiveCommand.Create(() => ContentDialog?.Hide(ContentDialogResult.Primary), Confirm.CanExecute);
this.ValidationRule(vm => vm.ProfileElementName, name => !string.IsNullOrWhiteSpace(name), "You must specify a valid name");
}
@ -33,7 +32,6 @@ public class ProfileElementRenameViewModel : ContentDialogViewModelBase
}
public ReactiveCommand<Unit, Unit> Enter { get; }
public ReactiveCommand<Unit, Unit> Confirm { get; }
private void ExecuteConfirm()

View File

@ -7,9 +7,6 @@
x:Class="Artemis.UI.Screens.ProfileEditor.Properties.Tree.ContentDialogs.LayerEffectRenameView"
x:DataType="contentDialogs:LayerEffectRenameViewModel">
<StackPanel>
<StackPanel.KeyBindings>
<KeyBinding Gesture="Enter" Command="{CompiledBinding Enter}" />
</StackPanel.KeyBindings>
<TextBox Name="NameTextBox" Text="{CompiledBinding LayerEffectName}" Watermark="Layer effect name" />
</StackPanel>
</UserControl>

View File

@ -22,7 +22,6 @@ public class LayerEffectRenameViewModel : ContentDialogViewModelBase
_layerEffectName = layerEffect.Name;
Confirm = ReactiveCommand.Create(ExecuteConfirm, ValidationContext.Valid);
Enter = ReactiveCommand.Create(() => ContentDialog?.Hide(ContentDialogResult.Primary), Confirm.CanExecute);
this.ValidationRule(vm => vm.LayerEffectName, categoryName => !string.IsNullOrWhiteSpace(categoryName), "You must specify a valid name");
}
@ -33,7 +32,6 @@ public class LayerEffectRenameViewModel : ContentDialogViewModelBase
}
public ReactiveCommand<Unit, Unit> Confirm { get; }
public ReactiveCommand<Unit, Unit> Enter { get; }
private void ExecuteConfirm()
{

View File

@ -7,9 +7,6 @@
x:Class="Artemis.UI.Screens.Sidebar.SidebarCategoryEditView"
x:DataType="sidebar:SidebarCategoryEditViewModel">
<StackPanel>
<StackPanel.KeyBindings>
<KeyBinding Gesture="Enter" Command="{CompiledBinding Enter}" />
</StackPanel.KeyBindings>
<TextBox Text="{CompiledBinding CategoryName}" Watermark="Category name"/>
<TextBox Name="NameTextBox" Text="{CompiledBinding CategoryName}" Watermark="Category name"/>
</StackPanel>
</UserControl>

View File

@ -1,6 +1,7 @@
using System.Threading.Tasks;
using Artemis.UI.Shared.Extensions;
using Avalonia.Markup.Xaml;
using Avalonia.ReactiveUI;
using Avalonia.Threading;
using ReactiveUI;
namespace Artemis.UI.Screens.Sidebar;
@ -10,7 +11,18 @@ public partial class SidebarCategoryEditView : ReactiveUserControl<SidebarCatego
public SidebarCategoryEditView()
{
InitializeComponent();
this.WhenActivated(_ => this.ClearAllDataValidationErrors());
this.WhenActivated(_ =>
{
this.ClearAllDataValidationErrors();
Dispatcher.UIThread.Post(DelayedAutoFocus);
});
}
private async void DelayedAutoFocus()
{
// Don't ask
await Task.Delay(200);
NameTextBox.SelectAll();
NameTextBox.Focus();
}
}

View File

@ -24,7 +24,6 @@ public class SidebarCategoryEditViewModel : ContentDialogViewModelBase
_categoryName = _category.Name;
Confirm = ReactiveCommand.Create(ExecuteConfirm, ValidationContext.Valid);
Enter = ReactiveCommand.Create(() => ContentDialog?.Hide(ContentDialogResult.Primary), Confirm.CanExecute);
this.ValidationRule(vm => vm.CategoryName, categoryName => !string.IsNullOrWhiteSpace(categoryName?.Trim()), "You must specify a valid name");
this.ValidationRule(vm => vm.CategoryName, categoryName => profileService.ProfileCategories.All(c => c.Name != categoryName?.Trim()), "You must specify a unique name");
}
@ -36,7 +35,6 @@ public class SidebarCategoryEditViewModel : ContentDialogViewModelBase
}
public ReactiveCommand<Unit, Unit> Confirm { get; }
public ReactiveCommand<Unit, Unit> Enter { get; }
private void ExecuteConfirm()
{

View File

@ -31,37 +31,46 @@
Learn more about adaption hints
</controls:HyperlinkButton>
<ItemsRepeater ItemsSource="{CompiledBinding Layers}" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Margin="0 10 0 0">
<ItemsRepeater.ItemTemplate>
<DataTemplate DataType="profile:ProfileAdaptionHintsLayerViewModel">
<StackPanel>
<Border Classes="card-separator" />
<Grid ColumnDefinitions="Auto,*,Auto" RowDefinitions="*,*">
<avalonia:MaterialIcon Grid.Column="0"
Grid.Row="0"
Grid.RowSpan="2"
Width="25"
Height="25"
Margin="5 0 10 0"
Kind="{CompiledBinding Layer.LayerBrush.Descriptor.Icon, FallbackValue=QuestionMark}" />
<TextBlock Grid.Column="1" Grid.Row="0" Text="{CompiledBinding Layer.Name}" />
<TextBlock Grid.Column="1"
Grid.Row="1"
VerticalAlignment="Top"
Classes="subtitle"
Classes.danger="{CompiledBinding !AdaptionHintCount}"
Text="{CompiledBinding AdaptionHintText}">
</TextBlock>
<Button Grid.Column="2"
Grid.Row="0"
Grid.RowSpan="2"
Command="{Binding EditAdaptionHints}">
Edit hints
</Button>
</Grid>
</StackPanel>
</DataTemplate>
</ItemsRepeater.ItemTemplate>
</ItemsRepeater>
<ScrollViewer Grid.Row="2"
Grid.Column="0"
Grid.ColumnSpan="2"
Margin="0 10 0 0"
Classes="with-padding"
HorizontalScrollBarVisibility="Disabled"
VerticalScrollBarVisibility="Auto"
VerticalAlignment="Top">
<ItemsRepeater ItemsSource="{CompiledBinding Layers}">
<ItemsRepeater.ItemTemplate>
<DataTemplate DataType="profile:ProfileAdaptionHintsLayerViewModel">
<StackPanel>
<Border Classes="card-separator" />
<Grid ColumnDefinitions="Auto,*,Auto" RowDefinitions="*,*">
<avalonia:MaterialIcon Grid.Column="0"
Grid.Row="0"
Grid.RowSpan="2"
Width="25"
Height="25"
Margin="5 0 10 0"
Kind="{CompiledBinding Layer.LayerBrush.Descriptor.Icon, FallbackValue=QuestionMark}" />
<TextBlock Grid.Column="1" Grid.Row="0" Text="{CompiledBinding Layer.Name}" />
<TextBlock Grid.Column="1"
Grid.Row="1"
VerticalAlignment="Top"
Classes="subtitle"
Classes.danger="{CompiledBinding !AdaptionHintCount}"
Text="{CompiledBinding AdaptionHintText}">
</TextBlock>
<Button Grid.Column="2"
Grid.Row="0"
Grid.RowSpan="2"
Command="{Binding EditAdaptionHints}">
Edit hints
</Button>
</Grid>
</StackPanel>
</DataTemplate>
</ItemsRepeater.ItemTemplate>
</ItemsRepeater>
</ScrollViewer>
</Grid>
</UserControl>

View File

@ -12,9 +12,9 @@
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)" />
<PackageReference Include="Avalonia.ReactiveUI" Version="$(AvaloniaVersion)" />
<PackageReference Include="Avalonia.Xaml.Behaviors" Version="$(AvaloniaBehavioursVersion)" />
<PackageReference Include="DryIoc.dll" Version="5.4.0" />
<PackageReference Include="DryIoc.dll" Version="5.4.1" />
<PackageReference Include="NoStringEvaluating" Version="2.5.2" />
<PackageReference Include="ReactiveUI" Version="18.4.26" />
<PackageReference Include="ReactiveUI" Version="19.4.1" />
<PackageReference Include="ReactiveUI.Validation" Version="3.1.7" />
<PackageReference Include="SkiaSharp" Version="$(SkiaSharpVersion)" />
</ItemGroup>

View File

@ -5,14 +5,15 @@
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Platforms>x64</Platforms>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DryIoc.dll" Version="5.4.0" />
<PackageReference Include="DryIoc.dll" Version="5.4.1" />
<PackageReference Include="DryIoc.Microsoft.DependencyInjection" Version="6.2.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
<PackageReference Include="StrawberryShake.Server" Version="13.0.5" />
<PackageReference Include="StrawberryShake.Server" Version="13.5.1" />
</ItemGroup>
<ItemGroup>

View File

@ -5,18 +5,19 @@
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Platforms>x64</Platforms>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DryIoc.dll" Version="5.4.0" />
<PackageReference Include="DryIoc.dll" Version="5.4.1" />
<PackageReference Include="DryIoc.Microsoft.DependencyInjection" Version="6.2.0" />
<PackageReference Include="IdentityModel" Version="6.1.0" />
<PackageReference Include="IdentityModel" Version="6.2.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
<PackageReference Include="ReactiveUI" Version="18.4.26" />
<PackageReference Include="StrawberryShake.Server" Version="13.0.5" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.31.0" />
<PackageReference Include="System.Reactive" Version="5.0.0" />
<PackageReference Include="ReactiveUI" Version="19.4.1" />
<PackageReference Include="StrawberryShake.Server" Version="13.5.1" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.0.0" />
<PackageReference Include="System.Reactive" Version="6.0.0" />
</ItemGroup>
<ItemGroup>

View File

@ -2,8 +2,8 @@
<PropertyGroup>
<AvaloniaVersion>11.0.4</AvaloniaVersion>
<AvaloniaBehavioursVersion>11.0.2</AvaloniaBehavioursVersion>
<FluentAvaloniaVersion>2.0.1</FluentAvaloniaVersion>
<FluentAvaloniaVersion>2.0.4</FluentAvaloniaVersion>
<RGBDotNetVersion>2.0.0-prerelease.101</RGBDotNetVersion>
<SkiaSharpVersion>2.88.3</SkiaSharpVersion>
<SkiaSharpVersion>2.88.5</SkiaSharpVersion>
</PropertyGroup>
</Project>

View File

@ -68,14 +68,14 @@ Global
{412B921A-26F5-4AE6-8B32-0C19BE54F421}.Debug|x64.Build.0 = Debug|x64
{412B921A-26F5-4AE6-8B32-0C19BE54F421}.Release|x64.ActiveCfg = Release|x64
{412B921A-26F5-4AE6-8B32-0C19BE54F421}.Release|x64.Build.0 = Release|x64
{7C8C6F50-0CC8-45B3-B608-A7218C005E4B}.Debug|x64.ActiveCfg = Debug|Any CPU
{7C8C6F50-0CC8-45B3-B608-A7218C005E4B}.Debug|x64.Build.0 = Debug|Any CPU
{7C8C6F50-0CC8-45B3-B608-A7218C005E4B}.Release|x64.ActiveCfg = Release|Any CPU
{7C8C6F50-0CC8-45B3-B608-A7218C005E4B}.Release|x64.Build.0 = Release|Any CPU
{2B982C2E-3CBC-4DAB-9167-CCCA4C78E92B}.Debug|x64.ActiveCfg = Debug|Any CPU
{2B982C2E-3CBC-4DAB-9167-CCCA4C78E92B}.Debug|x64.Build.0 = Debug|Any CPU
{2B982C2E-3CBC-4DAB-9167-CCCA4C78E92B}.Release|x64.ActiveCfg = Release|Any CPU
{2B982C2E-3CBC-4DAB-9167-CCCA4C78E92B}.Release|x64.Build.0 = Release|Any CPU
{7C8C6F50-0CC8-45B3-B608-A7218C005E4B}.Debug|x64.ActiveCfg = Debug|x64
{7C8C6F50-0CC8-45B3-B608-A7218C005E4B}.Debug|x64.Build.0 = Debug|x64
{7C8C6F50-0CC8-45B3-B608-A7218C005E4B}.Release|x64.ActiveCfg = Release|x64
{7C8C6F50-0CC8-45B3-B608-A7218C005E4B}.Release|x64.Build.0 = Release|x64
{2B982C2E-3CBC-4DAB-9167-CCCA4C78E92B}.Debug|x64.ActiveCfg = Debug|x64
{2B982C2E-3CBC-4DAB-9167-CCCA4C78E92B}.Debug|x64.Build.0 = Debug|x64
{2B982C2E-3CBC-4DAB-9167-CCCA4C78E92B}.Release|x64.ActiveCfg = Release|x64
{2B982C2E-3CBC-4DAB-9167-CCCA4C78E92B}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE