1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-12 21:38:38 +00:00

Wizard UI improvements and further implementation of default entries step

This commit is contained in:
Robert 2025-11-23 15:54:56 +01:00
parent b351f685f7
commit 7c435fb037
17 changed files with 272 additions and 367 deletions

View File

@ -7,7 +7,8 @@
xmlns:prerequisites="clr-namespace:Artemis.UI.Screens.Plugins.Prerequisites" xmlns:prerequisites="clr-namespace:Artemis.UI.Screens.Plugins.Prerequisites"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Artemis.UI.Screens.Plugins.PluginPrerequisitesInstallDialogView" x:Class="Artemis.UI.Screens.Plugins.PluginPrerequisitesInstallDialogView"
x:DataType="plugins:PluginPrerequisitesInstallDialogViewModel"> x:DataType="plugins:PluginPrerequisitesInstallDialogViewModel"
Width="800">
<UserControl.Styles> <UserControl.Styles>
<Styles> <Styles>
<Style Selector="Border.status-border"> <Style Selector="Border.status-border">
@ -24,7 +25,7 @@
</Style> </Style>
</Styles> </Styles>
</UserControl.Styles> </UserControl.Styles>
<Grid ColumnDefinitions="350,*" Width="800"> <Grid ColumnDefinitions="350,*">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition MinHeight="200" /> <RowDefinition MinHeight="200" />
</Grid.RowDefinitions> </Grid.RowDefinitions>

View File

@ -7,7 +7,8 @@
xmlns:prerequisites="clr-namespace:Artemis.UI.Screens.Plugins.Prerequisites" xmlns:prerequisites="clr-namespace:Artemis.UI.Screens.Plugins.Prerequisites"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Artemis.UI.Screens.Plugins.PluginPrerequisitesUninstallDialogView" x:Class="Artemis.UI.Screens.Plugins.PluginPrerequisitesUninstallDialogView"
x:DataType="plugins:PluginPrerequisitesUninstallDialogViewModel"> x:DataType="plugins:PluginPrerequisitesUninstallDialogViewModel"
Width="800">
<UserControl.Styles> <UserControl.Styles>
<Styles> <Styles>
<Style Selector="Border.status-border"> <Style Selector="Border.status-border">
@ -24,7 +25,7 @@
</Style> </Style>
</Styles> </Styles>
</UserControl.Styles> </UserControl.Styles>
<Grid ColumnDefinitions="350,*" Width="800"> <Grid ColumnDefinitions="350,*">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition MinHeight="200" /> <RowDefinition MinHeight="200" />
</Grid.RowDefinitions> </Grid.RowDefinitions>

View File

@ -11,7 +11,7 @@
x:DataType="startupWizard:StartupWizardViewModel" x:DataType="startupWizard:StartupWizardViewModel"
Icon="/Assets/Images/Logo/application.ico" Icon="/Assets/Images/Logo/application.ico"
Title="Artemis | Startup wizard" Title="Artemis | Startup wizard"
Width="1000" Width="1050"
Height="735" Height="735"
WindowStartupLocation="CenterOwner"> WindowStartupLocation="CenterOwner">
<Grid Margin="15" RowDefinitions="Auto,*,Auto" ColumnDefinitions="Auto,*"> <Grid Margin="15" RowDefinitions="Auto,*,Auto" ColumnDefinitions="Auto,*">

View File

@ -6,53 +6,61 @@
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Artemis.UI.Screens.StartupWizard.Steps.DefaultEntriesStepView" x:Class="Artemis.UI.Screens.StartupWizard.Steps.DefaultEntriesStepView"
x:DataType="steps:DefaultEntriesStepViewModel"> x:DataType="steps:DefaultEntriesStepViewModel">
<Border Classes="card"> <Panel>
<Grid RowDefinitions="*,Auto"> <!-- Selection stage -->
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto"> <Grid RowDefinitions="Auto,*,Auto" IsVisible="{CompiledBinding CurrentEntry, Converter={x:Static ObjectConverters.IsNull}}">
<StackPanel> <TextBlock Grid.Row="0" TextWrapping="Wrap">
<TextBlock TextWrapping="Wrap"> Below is a list of default features that can be installed to get you started with Artemis. You can always install or uninstall features later via the Workshop.
Below is a list of default features that can be installed to get you started with Artemis. You can always install or uninstall features later via the Workshop. </TextBlock>
</TextBlock>
<TextBlock Classes="card-title" IsVisible="{CompiledBinding DeviceProviderEntryViewModels.Count}"> <ProgressBar Grid.Row="1" IsVisible="{CompiledBinding FetchingDefaultEntries}" IsIndeterminate="True" />
Device providers
</TextBlock>
<ItemsControl ItemsSource="{CompiledBinding DeviceProviderEntryViewModels}" Margin="0,0,5,0">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="2" ColumnSpacing="5" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
<TextBlock Classes="card-title" IsVisible="{CompiledBinding EssentialEntryViewModels.Count}"> <ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
Essentials <StackPanel>
</TextBlock> <TextBlock Classes="card-title" IsVisible="{CompiledBinding DeviceProviderEntryViewModels.Count}">
<ItemsControl ItemsSource="{CompiledBinding EssentialEntryViewModels}" Margin="0,0,5,0"> Device providers
<ItemsControl.ItemsPanel> </TextBlock>
<ItemsPanelTemplate> <ItemsControl ItemsSource="{CompiledBinding DeviceProviderEntryViewModels}" Margin="0,0,5,0">
<UniformGrid Columns="2" ColumnSpacing="5"/> <ItemsControl.ItemsPanel>
</ItemsPanelTemplate> <ItemsPanelTemplate>
</ItemsControl.ItemsPanel> <UniformGrid Columns="2" ColumnSpacing="5" />
</ItemsControl> </ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
<TextBlock Classes="card-title" IsVisible="{CompiledBinding OtherEntryViewModels.Count}"> <TextBlock Classes="card-title" IsVisible="{CompiledBinding EssentialEntryViewModels.Count}">
Other features Essentials
</TextBlock> </TextBlock>
<ItemsControl ItemsSource="{CompiledBinding OtherEntryViewModels}" Margin="0,0,5,0"> <ItemsControl ItemsSource="{CompiledBinding EssentialEntryViewModels}" Margin="0,0,5,0">
<ItemsControl.ItemsPanel> <ItemsControl.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<UniformGrid Columns="2" ColumnSpacing="5"/> <UniformGrid Columns="2" ColumnSpacing="5" />
</ItemsPanelTemplate> </ItemsPanelTemplate>
</ItemsControl.ItemsPanel> </ItemsControl.ItemsPanel>
</ItemsControl> </ItemsControl>
</StackPanel>
</ScrollViewer> <TextBlock Classes="card-title" IsVisible="{CompiledBinding OtherEntryViewModels.Count}">
<ProgressBar Grid.Row="1" Other features
Minimum="0" </TextBlock>
Maximum="{CompiledBinding TotalEntries}" <ItemsControl ItemsSource="{CompiledBinding OtherEntryViewModels}" Margin="0,0,5,0">
IsIndeterminate="{CompiledBinding FetchingDefaultEntries}" <ItemsControl.ItemsPanel>
Value="{CompiledBinding CurrentEntries}" /> <ItemsPanelTemplate>
</Grid> <UniformGrid Columns="2" ColumnSpacing="5" />
</Border> </ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
</StackPanel>
</ScrollViewer>
</Grid>
<!-- Installation stage -->
<StackPanel IsVisible="{CompiledBinding CurrentEntry, Converter={x:Static ObjectConverters.IsNotNull}}">
<TextBlock Classes="card-title">
Currently installing
</TextBlock>
<ContentControl Content="{CompiledBinding CurrentEntry}"/>
<ProgressBar ShowProgressText="True" ProgressTextFormat="{}{0}/{3} Features Installed ({1:0}%)" Minimum="0" Maximum="{CompiledBinding TotalEntries}" Value="{CompiledBinding InstalledEntries}"/>
</StackPanel>
</Panel>
</UserControl> </UserControl>

View File

@ -20,10 +20,11 @@ public partial class DefaultEntriesStepViewModel : WizardStepViewModel
{ {
[Notify] private bool _workshopReachable; [Notify] private bool _workshopReachable;
[Notify] private bool _fetchingDefaultEntries; [Notify] private bool _fetchingDefaultEntries;
[Notify] private bool _installed; [Notify] private int _installedEntries;
[Notify] private int _currentEntries;
[Notify] private int _totalEntries = 1; [Notify] private int _totalEntries = 1;
[Notify] private DefaultEntryItemViewModel? _currentEntry;
private readonly IDeviceService _deviceService;
private readonly IWorkshopClient _client; private readonly IWorkshopClient _client;
private readonly Func<IEntrySummary, DefaultEntryItemViewModel> _getDefaultEntryItemViewModel; private readonly Func<IEntrySummary, DefaultEntryItemViewModel> _getDefaultEntryItemViewModel;
@ -34,24 +35,17 @@ public partial class DefaultEntriesStepViewModel : WizardStepViewModel
public DefaultEntriesStepViewModel(IWorkshopService workshopService, IDeviceService deviceService, IWorkshopClient client, public DefaultEntriesStepViewModel(IWorkshopService workshopService, IDeviceService deviceService, IWorkshopClient client,
Func<IEntrySummary, DefaultEntryItemViewModel> getDefaultEntryItemViewModel) Func<IEntrySummary, DefaultEntryItemViewModel> getDefaultEntryItemViewModel)
{ {
_deviceService = deviceService;
_client = client; _client = client;
_getDefaultEntryItemViewModel = getDefaultEntryItemViewModel; _getDefaultEntryItemViewModel = getDefaultEntryItemViewModel;
ContinueText = "Install selected entries"; ContinueText = "Install selected entries";
Continue = ReactiveCommand.CreateFromTask(async ct => Continue = ReactiveCommand.CreateFromTask(async ct =>
{ {
if (Installed) await Install(ct);
Wizard.ChangeScreen<SettingsStepViewModel>(); ExecuteContinue();
else
await Install(ct);
});
GoBack = ReactiveCommand.Create(() =>
{
if (deviceService.EnabledDevices.Count == 0)
Wizard.ChangeScreen<DevicesStepViewModel>();
else
Wizard.ChangeScreen<SurfaceStepViewModel>();
}); });
GoBack = ReactiveCommand.Create(() => Wizard.ChangeScreen<WelcomeStepViewModel>());
this.WhenActivatedAsync(async d => this.WhenActivatedAsync(async d =>
{ {
@ -63,41 +57,40 @@ public partial class DefaultEntriesStepViewModel : WizardStepViewModel
}); });
} }
private async Task Install(CancellationToken cancellationToken) private void ExecuteContinue()
{ {
// Remove entries that aren't to be installed // Without devices skip to the last step
RemoveUnselectedEntries(DeviceProviderEntryViewModels); if (_deviceService.EnabledDevices.Count == 0)
RemoveUnselectedEntries(EssentialEntryViewModels); Wizard.ChangeScreen<SettingsStepViewModel>();
RemoveUnselectedEntries(OtherEntryViewModels); else
Wizard.ChangeScreen<LayoutsStepViewModel>();
TotalEntries = DeviceProviderEntryViewModels.Count + EssentialEntryViewModels.Count + OtherEntryViewModels.Count;
CurrentEntries = 0;
// Install entries one by one, removing them from the list as we go
List<DefaultEntryItemViewModel> entries = [..DeviceProviderEntryViewModels, ..EssentialEntryViewModels, ..OtherEntryViewModels];
foreach (DefaultEntryItemViewModel defaultEntryItemViewModel in entries)
{
cancellationToken.ThrowIfCancellationRequested();
bool removeFromList = await defaultEntryItemViewModel.InstallEntry(cancellationToken);
if (!removeFromList)
break;
DeviceProviderEntryViewModels.Remove(defaultEntryItemViewModel);
EssentialEntryViewModels.Remove(defaultEntryItemViewModel);
OtherEntryViewModels.Remove(defaultEntryItemViewModel);
CurrentEntries++;
}
Installed = true;
ContinueText = "Continue";
} }
private void RemoveUnselectedEntries(ObservableCollection<DefaultEntryItemViewModel> entryViewModels) private async Task Install(CancellationToken cancellationToken)
{ {
List<DefaultEntryItemViewModel> toRemove = entryViewModels.Where(e => !e.ShouldInstall).ToList(); List<DefaultEntryItemViewModel> entries =
foreach (DefaultEntryItemViewModel defaultEntryItemViewModel in toRemove) [
entryViewModels.Remove(defaultEntryItemViewModel); ..DeviceProviderEntryViewModels.Where(e => e.ShouldInstall && !e.IsInstalled),
..EssentialEntryViewModels.Where(e => e.ShouldInstall && !e.IsInstalled),
..OtherEntryViewModels.Where(e => e.ShouldInstall && !e.IsInstalled)
];
InstalledEntries = 0;
TotalEntries = entries.Count;
// Continue to the next screen if there are no entries to install
if (TotalEntries == 0)
return;
foreach (DefaultEntryItemViewModel defaultEntryItemViewModel in entries)
{
cancellationToken.ThrowIfCancellationRequested();
CurrentEntry = defaultEntryItemViewModel;
await defaultEntryItemViewModel.InstallEntry(cancellationToken);
InstalledEntries++;
}
await Task.Delay(1000, cancellationToken);
CurrentEntry = null;
} }
private async Task GetDefaultEntries(CancellationToken cancellationToken) private async Task GetDefaultEntries(CancellationToken cancellationToken)
@ -126,7 +119,7 @@ public partial class DefaultEntriesStepViewModel : WizardStepViewModel
DefaultEntryItemViewModel viewModel = _getDefaultEntryItemViewModel(entry); DefaultEntryItemViewModel viewModel = _getDefaultEntryItemViewModel(entry);
viewModel.ShouldInstall = entry.DefaultEntryInfo.IsEssential; viewModel.ShouldInstall = entry.DefaultEntryInfo.IsEssential;
if (entry.DefaultEntryInfo.IsDeviceProvider) if (entry.DefaultEntryInfo.IsDeviceProvider)
DeviceProviderEntryViewModels.Add(viewModel); DeviceProviderEntryViewModels.Add(viewModel);
else if (entry.DefaultEntryInfo.IsEssential) else if (entry.DefaultEntryInfo.IsEssential)

View File

@ -49,8 +49,8 @@ public partial class DefaultEntryItemViewModel : ActivatableViewModelBase
if (IsInstalled || !ShouldInstall || Entry.LatestRelease == null) if (IsInstalled || !ShouldInstall || Entry.LatestRelease == null)
return true; return true;
// Most entries install so quick it looks broken without a small delay // Most entries install so fast it looks broken without a small delay
Task minimumDelay = Task.Delay(100, cancellationToken); Task minimumDelay = Task.Delay(200, cancellationToken);
EntryInstallResult result = await _workshopService.InstallEntry(Entry, Entry.LatestRelease, _progress, cancellationToken); EntryInstallResult result = await _workshopService.InstallEntry(Entry, Entry.LatestRelease, _progress, cancellationToken);
await minimumDelay; await minimumDelay;

View File

@ -1,43 +0,0 @@
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:steps="clr-namespace:Artemis.UI.Screens.StartupWizard.Steps"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Artemis.UI.Screens.StartupWizard.Steps.DevicesStepView"
x:DataType="steps:DevicesStepViewModel">
<Border Classes="card">
<Grid RowDefinitions="Auto,*,Auto,Auto">
<StackPanel Grid.Row="0">
<TextBlock TextWrapping="Wrap">
Devices are supported through the use of device providers.
</TextBlock>
<TextBlock TextWrapping="Wrap">
In the list below you can enable device providers for each brand you own by checking "Enable feature".
</TextBlock>
</StackPanel>
<ScrollViewer Grid.Row="1" Margin="0 15">
<ItemsControl ItemsSource="{CompiledBinding DeviceProviders}" Margin="-4 0 8 0">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="2" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border Classes="card-condensed" Margin="4">
<ContentControl Content="{CompiledBinding}"></ContentControl>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
<TextBlock Grid.Row="2" Foreground="#FFB9A40A" TextWrapping="Wrap">
Note: To avoid possible instability it's recommended to disable the device providers of brands you don't own.
</TextBlock>
</Grid>
</Border>
</UserControl>

View File

@ -1,14 +0,0 @@
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using Avalonia.ReactiveUI;
namespace Artemis.UI.Screens.StartupWizard.Steps;
public partial class DevicesStepView : ReactiveUserControl<DevicesStepViewModel>
{
public DevicesStepView()
{
InitializeComponent();
}
}

View File

@ -1,33 +0,0 @@
using ReactiveUI;
using System;
using System.Collections.ObjectModel;
using System.Linq;
using Artemis.Core;
using Artemis.Core.DeviceProviders;
using Artemis.Core.Services;
namespace Artemis.UI.Screens.StartupWizard.Steps;
public class DevicesStepViewModel : WizardStepViewModel
{
public DevicesStepViewModel(IPluginManagementService pluginManagementService, Func<PluginFeatureInfo, WizardPluginFeatureViewModel> getPluginFeatureViewModel, IDeviceService deviceService)
{
// Take all compatible device providers and create a view model for them
DeviceProviders = new ObservableCollection<WizardPluginFeatureViewModel>(pluginManagementService.GetAllPlugins()
.Where(p => p.Info.IsCompatible)
.SelectMany(p => p.Features.Where(f => f.FeatureType.IsAssignableTo(typeof(DeviceProvider))))
.OrderBy(f => f.Name)
.Select(getPluginFeatureViewModel));
Continue = ReactiveCommand.Create(() =>
{
if (deviceService.EnabledDevices.Count == 0)
Wizard.ChangeScreen<DefaultEntriesStepViewModel>();
else
Wizard.ChangeScreen<LayoutsStepViewModel>();
});
GoBack = ReactiveCommand.Create(() => Wizard.ChangeScreen<WelcomeStepViewModel>());
}
public ObservableCollection<WizardPluginFeatureViewModel> DeviceProviders { get; }
}

View File

@ -2,52 +2,51 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:startupWizard="clr-namespace:Artemis.UI.Screens.StartupWizard"
xmlns:controls="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
xmlns:steps="clr-namespace:Artemis.UI.Screens.StartupWizard.Steps" xmlns:steps="clr-namespace:Artemis.UI.Screens.StartupWizard.Steps"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Artemis.UI.Screens.StartupWizard.Steps.FinishStepView" x:Class="Artemis.UI.Screens.StartupWizard.Steps.FinishStepView"
x:DataType="steps:FinishStepViewModel"> x:DataType="steps:FinishStepViewModel">
<Border Classes="card" VerticalAlignment="Top"> <StackPanel>
<StackPanel> <TextBlock Classes="h4">All finished!</TextBlock>
<TextBlock Classes="h4">All finished!</TextBlock> <Border Classes="card" VerticalAlignment="Top">
<StackPanel>
<TextBlock TextWrapping="Wrap">
You are now ready to start using Artemis, enjoy! 😁
</TextBlock>
<TextBlock TextWrapping="Wrap">
To learn more about Artemis and how to use it you may find these resources useful:
</TextBlock>
<TextBlock TextWrapping="Wrap"> <Grid ColumnDefinitions="Auto,*" Margin="0 15 0 0">
You are now ready to start using Artemis, enjoy! 😁 <Grid.Styles>
</TextBlock> <Style Selector="TextBlock.link-name">
<TextBlock TextWrapping="Wrap"> <Setter Property="Margin" Value="0 7 15 6" />
To learn more about Artemis and how to use it you may find these resources useful: <Setter Property="FontWeight" Value="600" />
</TextBlock> </Style>
</Grid.Styles>
<Grid ColumnDefinitions="Auto,*" Margin="0 15 0 0"> <StackPanel Grid.Row="0" Grid.Column="0">
<Grid.Styles> <TextBlock Classes="link-name">Artemis wiki</TextBlock>
<Style Selector="TextBlock.link-name"> <TextBlock Classes="link-name">Getting started guide</TextBlock>
<Setter Property="Margin" Value="0 7 15 6" /> <TextBlock Classes="link-name">GitHub</TextBlock>
<Setter Property="FontWeight" Value="600" /> <TextBlock Classes="link-name">Discord</TextBlock>
</Style> </StackPanel>
</Grid.Styles> <StackPanel Grid.Column="1">
<HyperlinkButton NavigateUri="https://wiki.artemis-rgb.com/?mtm_campaign=artemis&amp;mtm_kwd=wizard">
<StackPanel Grid.Row="0" Grid.Column="0"> https://wiki.artemis-rgb.com/
<TextBlock Classes="link-name">Artemis wiki</TextBlock> </HyperlinkButton>
<TextBlock Classes="link-name">Getting started guide</TextBlock> <HyperlinkButton NavigateUri="https://wiki.artemis-rgb.com/en/guides/user/introduction?mtm_campaign=artemis&amp;mtm_kwd=wizard">
<TextBlock Classes="link-name">GitHub</TextBlock> https://wiki.artemis-rgb.com/en/guides/user/introduction
<TextBlock Classes="link-name">Discord</TextBlock> </HyperlinkButton>
</StackPanel> <HyperlinkButton NavigateUri="https://github.com/Artemis-RGB/Artemis">
<StackPanel Grid.Column="1"> https://github.com/Artemis-RGB/Artemis
<HyperlinkButton NavigateUri="https://wiki.artemis-rgb.com/?mtm_campaign=artemis&amp;mtm_kwd=wizard"> </HyperlinkButton>
https://wiki.artemis-rgb.com/ <HyperlinkButton NavigateUri="https://discord.gg/S3MVaC9">
</HyperlinkButton> https://discord.gg/S3MVaC9
<HyperlinkButton NavigateUri="https://wiki.artemis-rgb.com/en/guides/user/introduction?mtm_campaign=artemis&amp;mtm_kwd=wizard"> </HyperlinkButton>
https://wiki.artemis-rgb.com/en/guides/user/introduction </StackPanel>
</HyperlinkButton> </Grid>
<HyperlinkButton NavigateUri="https://github.com/Artemis-RGB/Artemis"> </StackPanel>
https://github.com/Artemis-RGB/Artemis </Border>
</HyperlinkButton> </StackPanel>
<HyperlinkButton NavigateUri="https://discord.gg/S3MVaC9">
https://discord.gg/S3MVaC9
</HyperlinkButton>
</StackPanel>
</Grid>
</StackPanel>
</Border>
</UserControl> </UserControl>

View File

@ -7,26 +7,25 @@
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Artemis.UI.Screens.StartupWizard.Steps.LayoutsStepView" x:Class="Artemis.UI.Screens.StartupWizard.Steps.LayoutsStepView"
x:DataType="steps:LayoutsStepViewModel"> x:DataType="steps:LayoutsStepViewModel">
<Border Classes="card"> <StackPanel Spacing="10">
<Grid RowDefinitions="Auto,Auto,*"> <TextBlock TextWrapping="Wrap">
<StackPanel Grid.Row="0"> Device layouts provide Artemis with an image of your devices and exact LED positions. <LineBreak />
<TextBlock TextWrapping="Wrap"> While not strictly necessary, this helps to create effects that are perfectly aligned with your hardware.
Device layouts provide Artemis with an image of your devices and exact LED positions. <LineBreak /> </TextBlock>
While not strictly necessary, this helps to create effects that are perfectly aligned with your hardware. <TextBlock TextWrapping="Wrap" Margin="0 10">
</TextBlock> Below you can automatically search the Artemis Workshop for device layouts of your devices.
<TextBlock TextWrapping="Wrap" Margin="0 10"> </TextBlock>
Below you can automatically search the Artemis Workshop for device layouts of your devices. <Button
</TextBlock> Content="Auto-install layouts"
Command="{CompiledBinding LayoutFinderViewModel.SearchAll}"
ToolTip.Tip="Search layouts and if found install them automatically"
HorizontalAlignment="Right" />
<Border Classes="card">
<StackPanel>
<ScrollViewer>
<ContentControl Content="{CompiledBinding LayoutFinderViewModel}"></ContentControl>
</ScrollViewer>
</StackPanel> </StackPanel>
</Border>
<Button Grid.Row="1" </StackPanel>
Content="Auto-install layouts"
Command="{CompiledBinding LayoutFinderViewModel.SearchAll}"
ToolTip.Tip="Search layouts and if found install them automatically"
HorizontalAlignment="Right"/>
<ScrollViewer Grid.Row="2" Margin="0 15">
<ContentControl Content="{CompiledBinding LayoutFinderViewModel}"></ContentControl>
</ScrollViewer>
</Grid>
</Border>
</UserControl> </UserControl>

View File

@ -10,7 +10,7 @@ public class LayoutsStepViewModel : WizardStepViewModel
LayoutFinderViewModel = layoutFinderViewModel; LayoutFinderViewModel = layoutFinderViewModel;
Continue = ReactiveCommand.Create(() => Wizard.ChangeScreen<SurfaceStepViewModel>()); Continue = ReactiveCommand.Create(() => Wizard.ChangeScreen<SurfaceStepViewModel>());
GoBack = ReactiveCommand.Create(() => Wizard.ChangeScreen<DevicesStepViewModel>()); GoBack = ReactiveCommand.Create(() => Wizard.ChangeScreen<DefaultEntriesStepViewModel>());
} }
public LayoutFinderViewModel LayoutFinderViewModel { get; } public LayoutFinderViewModel LayoutFinderViewModel { get; }

View File

@ -9,118 +9,116 @@
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Artemis.UI.Screens.StartupWizard.Steps.SettingsStepView" x:Class="Artemis.UI.Screens.StartupWizard.Steps.SettingsStepView"
x:DataType="steps:SettingsStepViewModel"> x:DataType="steps:SettingsStepViewModel">
<Border Classes="card" VerticalAlignment="Top"> <ScrollViewer>
<ScrollViewer> <StackPanel>
<StackPanel> <TextBlock>
<TextBlock> Artemis comes with a variety of settings you can change to tweak everything to your liking.
Artemis comes with a variety of settings you can change to tweak everything to your liking. </TextBlock>
<TextBlock>
Below you can find a few relevant settings, many more can be changed later on the settings page.
</TextBlock>
<!-- Auto-run settings -->
<StackPanel IsVisible="{CompiledBinding IsAutoRunSupported}">
<TextBlock Classes="card-title">
Auto-run
</TextBlock> </TextBlock>
<TextBlock> <Border Classes="card" VerticalAlignment="Stretch" Margin="0,0,5,0">
Below you can find a few relevant settings, many more can be changed later on the settings page. <StackPanel>
</TextBlock> <StackPanel IsVisible="{CompiledBinding IsAutoRunSupported}">
<!-- Auto-run settings -->
<StackPanel IsVisible="{CompiledBinding IsAutoRunSupported}">
<TextBlock Classes="card-title">
Auto-run
</TextBlock>
<Border Classes="card" VerticalAlignment="Stretch" Margin="0,0,5,0">
<StackPanel>
<StackPanel IsVisible="{CompiledBinding IsAutoRunSupported}">
<Grid RowDefinitions="*,*" ColumnDefinitions="*,Auto">
<StackPanel Grid.Column="0">
<TextBlock>Auto-run on startup</TextBlock>
</StackPanel>
<ToggleSwitch Grid.Row="0" Grid.Column="1" VerticalAlignment="Center" IsChecked="{CompiledBinding UIAutoRun.Value}" MinWidth="0" Margin="0 -10" />
</Grid>
<Border Classes="card-separator" />
<Grid RowDefinitions="*,*" ColumnDefinitions="*,Auto">
<StackPanel Grid.Column="0">
<TextBlock>Hide window on auto-run</TextBlock>
</StackPanel>
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
<ToggleSwitch IsChecked="{CompiledBinding !UIShowOnStartup.Value}" IsEnabled="{CompiledBinding UIAutoRun.Value}" MinWidth="0" Margin="0 -10" />
</StackPanel>
</Grid>
<Border Classes="card-separator" />
<Grid RowDefinitions="*,*" ColumnDefinitions="*,Auto">
<StackPanel Grid.Column="0">
<TextBlock>Associate with Artemis links</TextBlock>
<TextBlock Classes="subtitle" TextWrapping="Wrap">
Open Artemis when navigating to artemis:// links, allows opening workshop entries from your browser.
</TextBlock>
</StackPanel>
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
<ToggleSwitch IsChecked="{CompiledBinding UIUseProtocol.Value}" OnContent="Yes" OffContent="No" MinWidth="0" Margin="0 -10" />
</StackPanel>
</Grid>
<Border Classes="card-separator" />
<Grid RowDefinitions="*,*" ColumnDefinitions="*,Auto">
<StackPanel Grid.Column="0">
<TextBlock>Startup delay</TextBlock>
<TextBlock Classes="subtitle" TextWrapping="Wrap">
Set the amount of seconds to wait before auto-running Artemis.
</TextBlock>
<TextBlock Classes="subtitle" TextWrapping="Wrap">
If some devices don't work because Artemis starts before the manufacturer's software, try increasing this value.
</TextBlock>
</StackPanel>
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center" Orientation="Horizontal">
<controls:NumberBox IsEnabled="{CompiledBinding UIAutoRun.Value}" Width="120">
<Interaction.Behaviors>
<behaviors:LostFocusNumberBoxBindingBehavior Value="{CompiledBinding UIAutoRunDelay.Value}" />
</Interaction.Behaviors>
</controls:NumberBox>
<TextBlock VerticalAlignment="Center" TextAlignment="Right" Width="30">sec</TextBlock>
</StackPanel>
</Grid>
</StackPanel>
</StackPanel>
</Border>
</StackPanel>
<!-- Update settings -->
<StackPanel>
<TextBlock Classes="card-title">
Updating
</TextBlock>
<Border Classes="card" VerticalAlignment="Stretch" Margin="0,0,5,0">
<StackPanel>
<Grid RowDefinitions="*,*" ColumnDefinitions="*,Auto"> <Grid RowDefinitions="*,*" ColumnDefinitions="*,Auto">
<StackPanel Grid.Column="0"> <StackPanel Grid.Column="0">
<TextBlock> <TextBlock>Auto-run on startup</TextBlock>
Check for updates </StackPanel>
</TextBlock> <ToggleSwitch Grid.Row="0" Grid.Column="1" VerticalAlignment="Center" IsChecked="{CompiledBinding UIAutoRun.Value}" MinWidth="0" Margin="0 -10" />
<TextBlock Classes="subtitle" TextWrapping="Wrap"> </Grid>
If enabled, we'll check for updates on startup and periodically while running. <Border Classes="card-separator" />
</TextBlock>
<Grid RowDefinitions="*,*" ColumnDefinitions="*,Auto">
<StackPanel Grid.Column="0">
<TextBlock>Hide window on auto-run</TextBlock>
</StackPanel> </StackPanel>
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"> <StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
<ToggleSwitch IsChecked="{CompiledBinding UICheckForUpdates.Value}" MinWidth="0" /> <ToggleSwitch IsChecked="{CompiledBinding !UIShowOnStartup.Value}" IsEnabled="{CompiledBinding UIAutoRun.Value}" MinWidth="0" Margin="0 -10" />
</StackPanel> </StackPanel>
</Grid> </Grid>
<Border Classes="card-separator" /> <Border Classes="card-separator" />
<Grid RowDefinitions="*,*" ColumnDefinitions="*,Auto"> <Grid RowDefinitions="*,*" ColumnDefinitions="*,Auto">
<StackPanel Grid.Column="0"> <StackPanel Grid.Column="0">
<TextBlock> <TextBlock>Associate with Artemis links</TextBlock>
Auto-install updates
</TextBlock>
<TextBlock Classes="subtitle" TextWrapping="Wrap"> <TextBlock Classes="subtitle" TextWrapping="Wrap">
If enabled, new updates will automatically be installed. Open Artemis when navigating to artemis:// links, allows opening workshop entries from your browser.
</TextBlock> </TextBlock>
</StackPanel> </StackPanel>
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"> <StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
<ToggleSwitch IsEnabled="{CompiledBinding UICheckForUpdates.Value}" IsChecked="{CompiledBinding UIAutoUpdate.Value}" MinWidth="0" /> <ToggleSwitch IsChecked="{CompiledBinding UIUseProtocol.Value}" OnContent="Yes" OffContent="No" MinWidth="0" Margin="0 -10" />
</StackPanel>
</Grid>
<Border Classes="card-separator" />
<Grid RowDefinitions="*,*" ColumnDefinitions="*,Auto">
<StackPanel Grid.Column="0">
<TextBlock>Startup delay</TextBlock>
<TextBlock Classes="subtitle" TextWrapping="Wrap">
Set the amount of seconds to wait before auto-running Artemis.
</TextBlock>
<TextBlock Classes="subtitle" TextWrapping="Wrap">
If some devices don't work because Artemis starts before the manufacturer's software, try increasing this value.
</TextBlock>
</StackPanel>
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center" Orientation="Horizontal">
<controls:NumberBox IsEnabled="{CompiledBinding UIAutoRun.Value}" Width="120">
<Interaction.Behaviors>
<behaviors:LostFocusNumberBoxBindingBehavior Value="{CompiledBinding UIAutoRunDelay.Value}" />
</Interaction.Behaviors>
</controls:NumberBox>
<TextBlock VerticalAlignment="Center" TextAlignment="Right" Width="30">sec</TextBlock>
</StackPanel> </StackPanel>
</Grid> </Grid>
</StackPanel> </StackPanel>
</Border> </StackPanel>
</StackPanel> </Border>
</StackPanel> </StackPanel>
</ScrollViewer>
</Border> <!-- Update settings -->
<StackPanel>
<TextBlock Classes="card-title">
Updating
</TextBlock>
<Border Classes="card" VerticalAlignment="Stretch" Margin="0,0,5,0">
<StackPanel>
<Grid RowDefinitions="*,*" ColumnDefinitions="*,Auto">
<StackPanel Grid.Column="0">
<TextBlock>
Check for updates
</TextBlock>
<TextBlock Classes="subtitle" TextWrapping="Wrap">
If enabled, we'll check for updates on startup and periodically while running.
</TextBlock>
</StackPanel>
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
<ToggleSwitch IsChecked="{CompiledBinding UICheckForUpdates.Value}" MinWidth="0" />
</StackPanel>
</Grid>
<Border Classes="card-separator" />
<Grid RowDefinitions="*,*" ColumnDefinitions="*,Auto">
<StackPanel Grid.Column="0">
<TextBlock>
Auto-install updates
</TextBlock>
<TextBlock Classes="subtitle" TextWrapping="Wrap">
If enabled, new updates will automatically be installed.
</TextBlock>
</StackPanel>
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
<ToggleSwitch IsEnabled="{CompiledBinding UICheckForUpdates.Value}" IsChecked="{CompiledBinding UIAutoUpdate.Value}" MinWidth="0" />
</StackPanel>
</Grid>
</StackPanel>
</Border>
</StackPanel>
</StackPanel>
</ScrollViewer>
</UserControl> </UserControl>

View File

@ -37,8 +37,9 @@ public class SettingsStepViewModel : WizardStepViewModel
Continue = ReactiveCommand.Create(() => Wizard.ChangeScreen<FinishStepViewModel>()); Continue = ReactiveCommand.Create(() => Wizard.ChangeScreen<FinishStepViewModel>());
GoBack = ReactiveCommand.Create(() => GoBack = ReactiveCommand.Create(() =>
{ {
// Without devices, skip to the default entries screen
if (deviceService.EnabledDevices.Count == 0) if (deviceService.EnabledDevices.Count == 0)
Wizard.ChangeScreen<DevicesStepViewModel>(); Wizard.ChangeScreen<DefaultEntriesStepViewModel>();
else else
Wizard.ChangeScreen<SurfaceStepViewModel>(); Wizard.ChangeScreen<SurfaceStepViewModel>();
}); });

View File

@ -8,18 +8,15 @@
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Artemis.UI.Screens.StartupWizard.Steps.SurfaceStepView" x:Class="Artemis.UI.Screens.StartupWizard.Steps.SurfaceStepView"
x:DataType="steps:SurfaceStepViewModel"> x:DataType="steps:SurfaceStepViewModel">
<Grid RowDefinitions="Auto,*,Auto,Auto" ColumnDefinitions="*,*"> <Grid RowDefinitions="Auto,*,Auto,Auto" ColumnDefinitions="*,*">
<Border Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Classes="card"> <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Spacing="10">
<StackPanel> <TextBlock TextWrapping="Wrap">
<TextBlock TextWrapping="Wrap"> Artemis uses "spatial awareness" to create realistic effects across multiple devices.
Artemis uses "spatial awareness" to create realistic effects across multiple devices. </TextBlock>
</TextBlock> <TextBlock TextWrapping="Wrap">
<TextBlock TextWrapping="Wrap"> In order to do this correctly, we need to know where your devices are located on your desk. Select one of the two presets below, after the setup wizard finishes you can tweak this in detail in the surface editor.
In order to do this correctly, we need to know where your devices are located on your desk. Select one of the two presets below, after the setup wizard finishes you can tweak this in detail in the surface editor. </TextBlock>
</TextBlock> </StackPanel>
</StackPanel>
</Border>
<Button Grid.Row="1" <Button Grid.Row="1"
Grid.Column="0" Grid.Column="0"

View File

@ -6,19 +6,17 @@
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Artemis.UI.Screens.StartupWizard.Steps.WelcomeStepView" x:Class="Artemis.UI.Screens.StartupWizard.Steps.WelcomeStepView"
x:DataType="steps:WelcomeStepViewModel"> x:DataType="steps:WelcomeStepViewModel">
<Border Classes="card"> <StackPanel Margin="0 50 0 0">
<StackPanel> <TextBlock Classes="h4" TextAlignment="Center">Welcome to the Artemis startup wizard!</TextBlock>
<TextBlock Classes="h4">Welcome to the Artemis startup wizard!</TextBlock>
<TextBlock TextWrapping="Wrap"> <TextBlock TextWrapping="Wrap" TextAlignment="Center">
In this wizard we'll walk you through the initial configuration of Artemis. In this wizard we'll walk you through the initial configuration of Artemis.
</TextBlock> </TextBlock>
<TextBlock TextWrapping="Wrap"> <TextBlock TextWrapping="Wrap" TextAlignment="Center">
Before you can start you need to tell Artemis which devices you want to use and where they are placed on your desk. Before you can start you need to tell Artemis which devices you want to use and where they are placed on your desk.
</TextBlock> </TextBlock>
<TextBlock Classes="subtitle" TextWrapping="Wrap" Margin="0 15 0 0"> <TextBlock Classes="subtitle" TextWrapping="Wrap" Margin="0 15 0 0" TextAlignment="Center">
PS: You can also skip the wizard and set things up yourself. PS: You can also skip the wizard and set things up yourself.
</TextBlock> </TextBlock>
</StackPanel> </StackPanel>
</Border>
</UserControl> </UserControl>

View File

@ -6,7 +6,7 @@ public class WelcomeStepViewModel : WizardStepViewModel
{ {
public WelcomeStepViewModel() public WelcomeStepViewModel()
{ {
Continue = ReactiveCommand.Create(() => Wizard.ChangeScreen<DevicesStepViewModel>()); Continue = ReactiveCommand.Create(() => Wizard.ChangeScreen<DefaultEntriesStepViewModel>());
ShowGoBack = false; ShowGoBack = false;
} }
} }