diff --git a/src/Artemis.Core/Plugins/PluginInfo.cs b/src/Artemis.Core/Plugins/PluginInfo.cs
index 1eebd03c6..91e49eeab 100644
--- a/src/Artemis.Core/Plugins/PluginInfo.cs
+++ b/src/Artemis.Core/Plugins/PluginInfo.cs
@@ -29,6 +29,8 @@ public class PluginInfo : CorePropertyChanged, IPrerequisitesSubject
private Uri? _website;
private Uri? _helpPage;
private bool _hotReloadSupported;
+ private Uri? _license;
+ private string? _licenseName;
internal PluginInfo()
{
@@ -103,6 +105,26 @@ public class PluginInfo : CorePropertyChanged, IPrerequisitesSubject
get => _helpPage;
set => SetAndNotify(ref _helpPage, value);
}
+
+ ///
+ /// Gets or sets the help page of this plugin
+ ///
+ [JsonProperty]
+ public Uri? License
+ {
+ get => _license;
+ set => SetAndNotify(ref _license, value);
+ }
+
+ ///
+ /// Gets or sets the author of this plugin
+ ///
+ [JsonProperty]
+ public string? LicenseName
+ {
+ get => _licenseName;
+ set => SetAndNotify(ref _licenseName, value);
+ }
///
/// The plugins display icon that's shown in the settings see for
diff --git a/src/Artemis.UI.Shared/Controls/ArtemisIcon.axaml.cs b/src/Artemis.UI.Shared/Controls/ArtemisIcon.axaml.cs
index 6e174235d..7aadc91bf 100644
--- a/src/Artemis.UI.Shared/Controls/ArtemisIcon.axaml.cs
+++ b/src/Artemis.UI.Shared/Controls/ArtemisIcon.axaml.cs
@@ -43,30 +43,18 @@ public partial class ArtemisIcon : UserControl
// If it's a string there are several options
else if (Icon is string iconString)
{
+ // An URI pointing to an image
+ if (ImageRegex.IsMatch(iconString))
+ {
+ Image image = new() {Source = new Bitmap(iconString), VerticalAlignment = VerticalAlignment.Stretch, HorizontalAlignment = HorizontalAlignment.Stretch};
+ RenderOptions.SetBitmapInterpolationMode(image, BitmapInterpolationMode.HighQuality);
+ Content = image;
+ }
// An enum defined as a string
- if (Enum.TryParse(iconString, true, out MaterialIconKind parsedIcon))
+ else if (Enum.TryParse(iconString, true, out MaterialIconKind parsedIcon))
{
Content = new MaterialIcon {Kind = parsedIcon, Width = Bounds.Width, Height = Bounds.Height};
}
- // An URI pointing to an image
- else if (ImageRegex.IsMatch(iconString))
- {
- if (!Fill)
- Content = new Image
- {
- Source = new Bitmap(iconString),
- VerticalAlignment = VerticalAlignment.Stretch,
- HorizontalAlignment = HorizontalAlignment.Stretch
- };
- else
- Content = new Border
- {
- Background = TextElement.GetForeground(this),
- VerticalAlignment = VerticalAlignment.Stretch,
- HorizontalAlignment = HorizontalAlignment.Stretch,
- OpacityMask = new ImageBrush(new Bitmap(iconString))
- };
- }
else
{
Content = new MaterialIcon {Kind = MaterialIconKind.QuestionMark, Width = Bounds.Width, Height = Bounds.Height};
@@ -87,10 +75,10 @@ public partial class ArtemisIcon : UserControl
contentControl.Height = Bounds.Height;
}
}
-
+
private void OnPropertyChanged(object? sender, AvaloniaPropertyChangedEventArgs e)
{
- if (e.Property == IconProperty || e.Property == FillProperty)
+ if (e.Property == IconProperty)
Update();
}
@@ -119,21 +107,5 @@ public partial class ArtemisIcon : UserControl
set => SetValue(IconProperty, value);
}
- ///
- /// Gets or sets a boolean indicating whether or not the icon should be filled in with the primary text color of the
- /// theme
- ///
- public static readonly StyledProperty FillProperty = AvaloniaProperty.Register(nameof(Icon));
-
- ///
- /// Gets or sets a boolean indicating whether or not the icon should be filled in with the primary text color of the
- /// theme
- ///
- public bool Fill
- {
- get => GetValue(FillProperty);
- set => SetValue(FillProperty, value);
- }
-
#endregion
}
\ No newline at end of file
diff --git a/src/Artemis.UI.Shared/Styles/Artemis.axaml b/src/Artemis.UI.Shared/Styles/Artemis.axaml
index 988213ad4..e41674945 100644
--- a/src/Artemis.UI.Shared/Styles/Artemis.axaml
+++ b/src/Artemis.UI.Shared/Styles/Artemis.axaml
@@ -33,4 +33,5 @@
+
\ No newline at end of file
diff --git a/src/Artemis.UI.Shared/Styles/Plugins.axaml b/src/Artemis.UI.Shared/Styles/Plugins.axaml
new file mode 100644
index 000000000..05a5db2d1
--- /dev/null
+++ b/src/Artemis.UI.Shared/Styles/Plugins.axaml
@@ -0,0 +1,5 @@
+
+
+
\ No newline at end of file
diff --git a/src/Artemis.UI.Shared/Styles/TextBlock.axaml b/src/Artemis.UI.Shared/Styles/TextBlock.axaml
index 4a2a605e2..9d3cf6ab4 100644
--- a/src/Artemis.UI.Shared/Styles/TextBlock.axaml
+++ b/src/Artemis.UI.Shared/Styles/TextBlock.axaml
@@ -45,4 +45,9 @@
+
diff --git a/src/Artemis.UI/Screens/Device/DeviceSettingsView.axaml b/src/Artemis.UI/Screens/Device/DeviceSettingsView.axaml
index 080b36def..064ea7154 100644
--- a/src/Artemis.UI/Screens/Device/DeviceSettingsView.axaml
+++ b/src/Artemis.UI/Screens/Device/DeviceSettingsView.axaml
@@ -9,13 +9,13 @@
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:DataType="local:DeviceSettingsViewModel"
x:Class="Artemis.UI.Screens.Device.DeviceSettingsView">
-
-
+
+
@@ -28,7 +28,7 @@
Command="{CompiledBinding IdentifyDevice}">
-
+
diff --git a/src/Artemis.UI/Screens/Plugins/PluginSettingsWindowView.axaml b/src/Artemis.UI/Screens/Plugins/PluginSettingsWindowView.axaml
index 7943954b6..66dcbb1c0 100644
--- a/src/Artemis.UI/Screens/Plugins/PluginSettingsWindowView.axaml
+++ b/src/Artemis.UI/Screens/Plugins/PluginSettingsWindowView.axaml
@@ -4,6 +4,9 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:windowing="clr-namespace:FluentAvalonia.UI.Windowing;assembly=FluentAvalonia"
xmlns:plugins="clr-namespace:Artemis.UI.Screens.Plugins"
+ xmlns:controls="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
+ xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
+ xmlns:shared="clr-namespace:Artemis.UI.Shared;assembly=Artemis.UI.Shared"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Artemis.UI.Screens.Plugins.PluginSettingsWindowView"
x:DataType="plugins:PluginSettingsWindowViewModel"
@@ -11,9 +14,63 @@
Title="{CompiledBinding DisplayName}"
Width="800"
Height="800"
+ MaxWidth="800"
WindowStartupLocation="CenterOwner">
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Artemis.UI/Screens/Plugins/PluginSettingsWindowViewModel.cs b/src/Artemis.UI/Screens/Plugins/PluginSettingsWindowViewModel.cs
index 401deb4c0..2ef07a933 100644
--- a/src/Artemis.UI/Screens/Plugins/PluginSettingsWindowViewModel.cs
+++ b/src/Artemis.UI/Screens/Plugins/PluginSettingsWindowViewModel.cs
@@ -16,4 +16,5 @@ public class PluginSettingsWindowViewModel : ActivatableViewModelBase
public PluginConfigurationViewModel ConfigurationViewModel { get; }
public Plugin Plugin { get; }
+ public string LicenseButtonText => Plugin.Info.LicenseName ?? "View license";
}
\ No newline at end of file
diff --git a/src/Artemis.UI/Screens/Plugins/PluginView.axaml b/src/Artemis.UI/Screens/Plugins/PluginView.axaml
index f35e54630..b9dc83c55 100644
--- a/src/Artemis.UI/Screens/Plugins/PluginView.axaml
+++ b/src/Artemis.UI/Screens/Plugins/PluginView.axaml
@@ -12,7 +12,6 @@
-
+
-
-
+
+
+
+
+
+
-
-
+
+
\ No newline at end of file
diff --git a/src/Artemis.UI/Screens/Settings/Tabs/AboutTabView.axaml b/src/Artemis.UI/Screens/Settings/Tabs/AboutTabView.axaml
index d0d5aed6e..6d21dc30e 100644
--- a/src/Artemis.UI/Screens/Settings/Tabs/AboutTabView.axaml
+++ b/src/Artemis.UI/Screens/Settings/Tabs/AboutTabView.axaml
@@ -11,7 +11,14 @@
-
+
Artemis 2
diff --git a/src/Artemis.UI/Screens/Settings/Tabs/DevicesTabView.axaml b/src/Artemis.UI/Screens/Settings/Tabs/DevicesTabView.axaml
index bea3fad48..5f0af446a 100644
--- a/src/Artemis.UI/Screens/Settings/Tabs/DevicesTabView.axaml
+++ b/src/Artemis.UI/Screens/Settings/Tabs/DevicesTabView.axaml
@@ -6,26 +6,22 @@
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Artemis.UI.Screens.Settings.DevicesTabView"
x:DataType="settings:DevicesTabViewModel">
-
-
+
+
Device management
-
+
Below you view and manage the devices that were detected by Artemis.
-
-
+
Disabling a device will cause it to stop updating. Some SDKs will even go back to using manufacturer lighting (Artemis restart may be required).
-
-
-
-
+
+
-
-
-
+
+
\ No newline at end of file
diff --git a/src/Artemis.UI/Screens/Settings/Tabs/GeneralTabView.axaml b/src/Artemis.UI/Screens/Settings/Tabs/GeneralTabView.axaml
index 002d2cb66..9d2fd980c 100644
--- a/src/Artemis.UI/Screens/Settings/Tabs/GeneralTabView.axaml
+++ b/src/Artemis.UI/Screens/Settings/Tabs/GeneralTabView.axaml
@@ -14,8 +14,12 @@
+ General settings
+
+ Here you can change the general settings op the application, for plugin and device specific settings, see the other tabs.
+
-
+
General
@@ -95,7 +99,7 @@
-
+
Web server
@@ -138,7 +142,7 @@
-
+
Updating
@@ -191,7 +195,7 @@
-
+
Profile editor
@@ -262,7 +266,7 @@
-
+
Rendering
@@ -335,7 +339,7 @@
-
+
Tools
diff --git a/src/Artemis.UI/Screens/Settings/Tabs/PluginsTabView.axaml b/src/Artemis.UI/Screens/Settings/Tabs/PluginsTabView.axaml
index cdaf065aa..0627e9f73 100644
--- a/src/Artemis.UI/Screens/Settings/Tabs/PluginsTabView.axaml
+++ b/src/Artemis.UI/Screens/Settings/Tabs/PluginsTabView.axaml
@@ -9,7 +9,7 @@
x:Class="Artemis.UI.Screens.Settings.PluginsTabView"
x:DataType="settings:PluginsTabViewModel">
-
+
@@ -25,7 +25,7 @@
-
+
diff --git a/src/Artemis.UI/Screens/StartupWizard/Steps/SettingsStep.axaml b/src/Artemis.UI/Screens/StartupWizard/Steps/SettingsStep.axaml
index 0636a3483..de06af76b 100644
--- a/src/Artemis.UI/Screens/StartupWizard/Steps/SettingsStep.axaml
+++ b/src/Artemis.UI/Screens/StartupWizard/Steps/SettingsStep.axaml
@@ -19,7 +19,7 @@
-
+
Auto-run
@@ -69,7 +69,7 @@
-
+
Updating